13 Feb, 2018

3 commits

  • commit af60e207087975d069858741c44ed4f450330ac4 upstream.

    If build fails during (bin)rpm-pkg, the spec file is not cleaned by
    anyone until the next successful build of the package.

    We do not have to immediately delete the spec file in case somebody
    may want to take a look at it. Instead, make them ignored by git,
    and cleaned up by make mrproper.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Greg Kroah-Hartman

    Masahiro Yamada
     
  • commit 10b62a2f785ab55857380f0c63d9fa468fd8c676 upstream.

    Most of DT files are compiled under arch/*/boot/dts/, but we have some
    other directories, like drivers/of/unittest-data/. We often miss to
    add gitignore patterns per directory. Since there are no source files
    that end with .dtb or .dtb.S, we can ignore the patterns globally.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Rob Herring
    Signed-off-by: Greg Kroah-Hartman

    Masahiro Yamada
     
  • commit 1377dd3e29878b8f5d9f5c9000975f50a428a0cd upstream.

    We are having more and more ignore patterns. Sort the list
    alphabetically. We will easily catch duplicated patterns if any.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Rob Herring
    Signed-off-by: Greg Kroah-Hartman

    Masahiro Yamada
     

25 Apr, 2017

1 commit


03 Aug, 2016

1 commit

  • Pull misc kbuild updates from Michal Marek:

    - coccicheck script improvements by Luis Rodriguez and Deepa Dinamani

    - new coccinelle patches by Yann Droneaud and Vaishali Thakkar

    - debian packaging fixes by Wilfried Klaebe, Henning Schild and Marcin
    Mielniczuk

    * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    Fix the Debian packaging script on systems with no codename
    builddeb: fix file permissions before packaging
    scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci
    coccicheck: refer to Documentation/coccinelle.txt and wiki
    coccicheck: add support for requring a coccinelle version
    scripts: add Linux .cocciconfig for coccinelle
    coccicheck: replace --very-quiet with --quiet when debugging
    coccicheck: add support for DEBUG_FILE
    coccicheck: enable parmap support
    coccicheck: make SPFLAGS more useful
    coccicheck: move spatch binary check up
    builddeb: really include objtool binary in headers package
    coccinelle: catch krealloc() on devm_*() allocated memory
    coccinelle: recognize more devm_* memory allocation functions
    coccinelle: also catch kzfree() issues
    coccicheck: Allow for overriding spatch flags
    Coccinelle: noderef: Add new rules and correct the old rule

    Linus Torvalds
     

22 Jul, 2016

1 commit

  • Coccinelle supports reading .cocciconfig, the order of precedence for
    variables for .cocciconfig is as follows:

    o Your current user's home directory is processed first
    o Your directory from which spatch is called is processed next
    o The directory provided with the --dir option is processed last, if used

    Since coccicheck runs through make, it naturally runs from the kernel
    proper dir, as such the second rule above would be implied for picking up a
    .cocciconfig when using 'make coccicheck'.

    'make coccicheck' also supports using M= targets.If you do not supply
    any M= target, it is assumed you want to target the entire kernel.
    The kernel coccicheck script has:

    if [ "$KBUILD_EXTMOD" = "" ] ; then
    OPTIONS="--dir $srctree $COCCIINCLUDE"
    else
    OPTIONS="--dir $KBUILD_EXTMOD $COCCIINCLUDE"
    fi

    KBUILD_EXTMOD is set when an explicit target with M= is used. For both cases
    the spatch --dir argument is used, as such third rule applies when
    whether M= is used or not, and when M= is used the target directory can
    have its own .cocciconfig file. When M= is not passed as an argument to
    coccicheck the target directory is the same as the directory from where
    spatch was called.

    If not using the kernel's coccicheck target, keep the above precedence order
    logic of .cocciconfig reading. If using the kernel's coccicheck target,
    override any of the kernel's .coccicheck's settings using SPFLAGS.

    We help Coccinelle when used against Linux with a set of sensible defaults
    options for Linux with our own Linux .cocciconfig. This hints to coccinelle
    git can be used for 'git grep' queries over coccigrep. A timeout of 200
    seconds should suffice for now.

    The options picked up by coccinelle when reading a .cocciconfig do not appear
    as arguments to spatch processes running on your system, to confirm what
    options will be used by Coccinelle run:

    spatch --print-options-only

    You can override with your own preferred index option by using SPFLAGS.
    Coccinelle supports both glimpse and idutils. Glimpse had historically
    provided the best performance, however recent benchmarks reveal idutils
    is performing just as well. Due to some recent fixes however you however
    will need at least coccinelle >= 1.0.6 if using idutils.

    Coccinelle carries a script scripts/idutils_index.sh which creates the
    idutils database with as follows:

    mkid -i C --output .id-utils.index

    If using just "--use-idutils" coccinelle expects your idutils database to be
    on the top level of the kernel as a file named ".id-utils.index". If you do
    not use this you can symlink your database file to it, or you can specify the
    database file following the "--use-idutils" argument. Examples:

    make SPFLAGS=--use-idutils coccicheck

    This assumes you have $srctree/.id-utils.index, where $srctree is
    the top level of the kernel.

    make SPFLAGS="--use-idutils /full-path/to/ID" coccicheck

    Here you specify the full path of the idutils ID database. Using
    .cocciconfig is possible, however given the order of precedence followed
    by Coccinelle, and since the kernel now carries its own .cocciconfig,
    you will need to use SPFLAGS to use idutils if desired.

    v4:

    o Recommend upgrade for using idutils with coccinelle due to some
    recent fixes.

    o Refer to using --print-options-only for testing what options are
    picked up by .cocciconfig reading.

    o Expand commit log considerably explaining *why* .cocconfig from
    two precedence rules are used when using coccicheck, and how to
    properly override these if needed.

    o Expand Documentation/coccinelle.txt

    v3: Expand commit log a bit more

    Signed-off-by: Luis R. Rodriguez
    Acked-by: Julia Lawall
    Signed-off-by: Michal Marek

    Luis R. Rodriguez
     

08 Jun, 2016

1 commit

  • This patch allows to build the whole kernel with GCC plugins. It was ported from
    grsecurity/PaX. The infrastructure supports building out-of-tree modules and
    building in a separate directory. Cross-compilation is supported too.
    Currently the x86, arm, arm64 and uml architectures enable plugins.

    The directory of the gcc plugins is scripts/gcc-plugins. You can use a file or a directory
    there. The plugins compile with these options:
    * -fno-rtti: gcc is compiled with this option so the plugins must use it too
    * -fno-exceptions: this is inherited from gcc too
    * -fasynchronous-unwind-tables: this is inherited from gcc too
    * -ggdb: it is useful for debugging a plugin (better backtrace on internal
    errors)
    * -Wno-narrowing: to suppress warnings from gcc headers (ipa-utils.h)
    * -Wno-unused-variable: to suppress warnings from gcc headers (gcc_version
    variable, plugin-version.h)

    The infrastructure introduces a new Makefile target called gcc-plugins. It
    supports all gcc versions from 4.5 to 6.0. The scripts/gcc-plugin.sh script
    chooses the proper host compiler (gcc-4.7 can be built by either gcc or g++).
    This script also checks the availability of the included headers in
    scripts/gcc-plugins/gcc-common.h.

    The gcc-common.h header contains frequently included headers for GCC plugins
    and it has a compatibility layer for the supported gcc versions.

    The gcc-generate-*-pass.h headers automatically generate the registration
    structures for GIMPLE, SIMPLE_IPA, IPA and RTL passes.

    Note that 'make clean' keeps the *.so files (only the distclean or mrproper
    targets clean all) because they are needed for out-of-tree modules.

    Based on work created by the PaX Team.

    Signed-off-by: Emese Revfy
    Acked-by: Kees Cook
    Signed-off-by: Michal Marek

    Emese Revfy
     

28 Apr, 2016

1 commit

  • Git files are the files that we don't want to ignore even if
    they are dot-files. It must be "even if" but it says "even it".

    Signed-off-by: Kyeongmin Cho
    Signed-off-by: Jiri Kosina

    Kyeongmin Cho
     

09 Sep, 2015

1 commit

  • Pull misc kbuild updates from Michal Marek:
    - deb-pkg:
    + module signing fix
    + dtb files are added to the package
    + do not require `hostname -f` to work during build
    + make deb-pkg generates a source package, bindeb-pkg has been
    added to only generate the binary package
    - rpm-pkg packages /lib/modules as well
    - new coccinelle patch and updates to existing ones
    - new stackusage & stackdelta script to collect and compare stack usage
    info (using gcc's -fstack-usage)
    - make tags understands trace_*_rcuidle() macros
    - .gitignore updates, misc cleanups

    * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (27 commits)
    deb-pkg: add source package
    package/Makefile: move source tar creation to a function
    scripts: add stackdelta script
    kbuild: remove *.su files generated by -fstack-usage
    .gitignore: add *.su pattern
    scripts: add stackusage script
    kbuild: avoid listing /lib/modules in kernel spec file
    fallback to hostname in scripts/package/builddeb
    coccinelle: api: extend spatch for dropping unnecessary owner
    deb-pkg: simplify directory creation
    scripts/tags.sh: Include trace_*_rcuidle() in tags
    scripts/package/Makefile: rpmbuild is needed for rpm targets
    Kbuild: Add ID files to .gitignore
    gitignore: Add MIPS vmlinux.32 to the list
    coccinelle: simple_return: Add a blank line
    coccinelle: irqf_oneshot.cocci: Improve the generated commit log
    coccinelle: api: add vma_pages.cocci
    scripts/coccinelle/misc/irqf_oneshot.cocci: Fix grammar
    scripts/coccinelle/misc/semicolon.cocci: Use imperative mood
    coccinelle: simple_open: Use imperative mood
    ...

    Linus Torvalds
     

28 Aug, 2015

1 commit


07 Aug, 2015

1 commit

  • The current rule for generating signing_key.priv and signing_key.x509 is
    a classic example of a bad rule which has a tendency to break parallel
    make. When invoked to create *either* target, it generates the other
    target as a side-effect that make didn't predict.

    So let's switch to using a single file signing_key.pem which contains
    both key and certificate. That matches what we do in the case of an
    external key specified by CONFIG_MODULE_SIG_KEY anyway, so it's also
    slightly cleaner.

    Signed-off-by: David Woodhouse
    Signed-off-by: David Howells

    David Woodhouse
     

15 Jun, 2015

2 commits


17 Apr, 2015

1 commit

  • Running make tar-pkg results in following:

    # Untracked files:
    # (use "git add ..." to include in what will be committed)
    #
    # linux-4.0.0-rc3-next-20150313-150225--x86.tar

    This patch makes git ignore *.tar files.
    Running 'git ls-files -i --exclude-standard' does not show any
    tar files excluded from tracking after the change.

    Signed-off-by: Andrey Skvortsov
    Cc: Michal Marek
    Cc: Greg Kroah-Hartman
    Cc: Boaz Harrosh
    Cc: Andi Kleen
    Cc: Benjamin Romer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Skvortsov
     

18 Feb, 2015

1 commit

  • Using the gdb scripts leaves byte-compiled python files in the scripts/
    directory. These should be ignored by git.

    [jan.kiszka@siemens.com: drop redundant mrproper rule as suggested by Michal]
    Signed-off-by: Daniel Thompson
    Signed-off-by: Jan Kiszka
    Cc: Michal Marek
    Cc: Thomas Gleixner
    Cc: Jason Wessel
    Cc: Andi Kleen
    Cc: Ben Widawsky
    Cc: Borislav Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Thompson
     

13 Feb, 2015

1 commit


26 Nov, 2014

1 commit

  • I'm not sure what is the costume with such IDE project files.
    Most might be dot-files. It is kind of annoying for the Kdevelop4 user.

    So please consider adding *.kdev4 files to be ignored?

    Signed-off-by: Boaz Harrosh
    [mmarek: Moved at the and and added a comment]
    Signed-off-by: Michal Marek

    Boaz Harrosh
     

31 Jul, 2014

1 commit

  • This is an alternative approach to lower the overhead of debug info
    (as we discussed a few days ago)

    gcc 4.7+ and newer binutils have a new "split debug info" debug info
    model where the debug info is only written once into central ".dwo" files.

    This avoids having to copy it around multiple times, from the object
    files to the final executable. It lowers the disk space
    requirements. In addition it defaults to compressed debug data.

    More details here: http://gcc.gnu.org/wiki/DebugFission

    This patch adds a new option to enable it. It has to be an option,
    because it'll undoubtedly break everyone's debuginfo packaging scheme.
    gdb/objdump/etc. all still work, if you have new enough versions.

    I don't see big compile wins (maybe a second or two faster or so), but the
    object dirs with debuginfo get significantly smaller. My standard kernel
    config (slightly bigger than defconfig) shrinks from 2.9G disk space
    to 1.1G objdir (with non reduced debuginfo). I presume if you are IO limited
    the compile time difference will be larger.

    Only problem I've seen so far is that it doesn't play well with older
    versions of ccache (apparently fixed, see
    https://bugzilla.samba.org/show_bug.cgi?id=10005)

    v2: various fixes from Dirk Gouders. Improve commit message slightly.
    v3: Fix clean rules and improve Kconfig slightly
    v4: Fix merge error in last version (Sam Ravnborg)
    Clarify description that it mainly helps disk size.
    Cc: Dirk Gouders
    Signed-off-by: Andi Kleen
    Acked-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Andi Kleen
     

17 Apr, 2014

1 commit

  • When using `make M=/path/to/driver modules` to build a module, file
    Module.symvers will be created in that directory, so it's better to
    ignore it in all directories.

    Slightly reordered, let specific file names behind general ones.

    Cc: Andrew Morton
    Cc: Kyungsik Lee
    Cc: Markus Trippelsdorf
    Signed-off-by: Zhao, Gang
    Signed-off-by: Michal Marek

    Zhao, Gang
     

11 Feb, 2014

1 commit

  • This is used by kbuild to load preset Kconfig options. We need to
    ignore it, otherwise git clean kills it.

    Signed-off-by: Borislav Petkov
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Borislav Petkov
     

01 Aug, 2013

1 commit


18 Dec, 2012

1 commit

  • Since userspace headers were moved to generated/uapi it possible to have a
    stale copy of linux/version.h at that file's old location. This causes
    confusion after building an older kernel version, then checking out and
    building a new one; the old (stale) version header will still get picked
    up until it is manually removed. This upsets the C library.

    Since the uapi changes, include/linux/version.h is no longer generated and
    should not be ignored, so this patch removes it from .gitignore.

    Signed-off-by: Jonathan Austin
    Reported-by: Kevin Petit
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jonathan Austin
     

20 Oct, 2012

1 commit


10 Oct, 2012

1 commit


01 Jul, 2011

1 commit


29 Apr, 2011

1 commit

  • There is an increasing amount of header files
    shared between individual architectures in asm-generic.
    To avoid a lot of dummy wrapper files that just
    include the corresponding file in asm-generic provide
    some basic support in kbuild for this.

    With the following patch an architecture can maintain
    a list of files in the file arch/$(ARCH)/include/asm/Kbuild

    To use a generic file just add:

    generic-y +=

    For each file listed kbuild will generate the necessary
    wrapper in arch/$(ARCH)/include/generated/asm.

    When installing userspace headers a wrapper is likewise created.

    The original inspiration for this came from the unicore32
    patchset - although a different method is used.

    The patch includes several improvements from Arnd Bergmann.
    Michael Marek contributed Makefile.asm-generic.

    Remis Baima did an intial implementation along to achive
    the same - see https://patchwork.kernel.org/patch/13352/

    Signed-off-by: Sam Ravnborg
    Acked-by: Guan Xuetao
    Tested-by: Guan Xuetao
    Acked-by: Arnd Bergmann
    Cc: Remis Lima Baima
    Signed-off-by: Michal Marek

    Sam Ravnborg
     

23 Feb, 2011

1 commit

  • Building with CONFIG_KERNEL_XZ results in the following:

    # Untracked files:
    # (use "git add ..." to include in what will be committed)
    #
    # arch/x86/boot/compressed/vmlinux.bin.xz

    So ignore xz-compressed files at the top level like we already do for
    other compression types.

    Signed-off-by: Romain Francoise
    Signed-off-by: Linus Torvalds

    Romain Francoise
     

01 Jun, 2010

1 commit

  • * 'for-35' of git://repo.or.cz/linux-kbuild: (81 commits)
    kbuild: Revert part of e8d400a to resolve a conflict
    kbuild: Fix checking of scm-identifier variable
    gconfig: add support to show hidden options that have prompts
    menuconfig: add support to show hidden options which have prompts
    gconfig: remove show_debug option
    gconfig: remove dbg_print_ptype() and dbg_print_stype()
    kconfig: fix zconfdump()
    kconfig: some small fixes
    add random binaries to .gitignore
    kbuild: Include gen_initramfs_list.sh and the file list in the .d file
    kconfig: recalc symbol value before showing search results
    .gitignore: ignore *.lzo files
    headerdep: perlcritic warning
    scripts/Makefile.lib: Align the output of LZO
    kbuild: Generate modules.builtin in make modules_install
    Revert "kbuild: specify absolute paths for cscope"
    kbuild: Do not unnecessarily regenerate modules.builtin
    headers_install: use local file handles
    headers_check: fix perl warnings
    export_report: fix perl warnings
    ...

    Linus Torvalds
     

23 Mar, 2010

1 commit


13 Mar, 2010

1 commit

  • Some of the gitignore file patters were explicitly meant to be only for
    the top level, but weren't marked that way, so they would trigger
    recursively in subdirectories too. Normally that was harmless, but at
    least "linux" happened to trigger elsewhere too. Fix it up.

    And other patterns in that section weren't necessarily top-level at all.

    Reported-by: Jiri Slaby
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

07 Mar, 2010

1 commit

  • Tell git to ignore the generated files under um, except:

    include/shared/kern_constants.h
    include/shared/user_constants.h

    which will be moved to include/generated.

    Signed-off-by: WANG Cong
    Cc: Al Viro
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     

12 Jan, 2010

1 commit

  • MIPS compressed kernels output a vmlinuz file in the top-level directory
    (maybe others do). Add vmlinuz to the list of files to ignore by git.

    Signed-off-by: Florian Fainelli
    Cc: Ralf Baechle
    Cc: Maxime Bizon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Fainelli
     

12 Dec, 2009

7 commits


01 Dec, 2009

1 commit