1. 25 4月, 2017 1 次提交
  2. 22 7月, 2016 1 次提交
    • L
      scripts: add Linux .cocciconfig for coccinelle · dd951fc1
      Luis R. Rodriguez 提交于
      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: NLuis R. Rodriguez <mcgrof@kernel.org>
      Acked-by: NJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      dd951fc1
  3. 08 6月, 2016 1 次提交
    • E
      GCC plugin infrastructure · 6b90bd4b
      Emese Revfy 提交于
      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: NEmese Revfy <re.emese@gmail.com>
      Acked-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      6b90bd4b
  4. 28 4月, 2016 1 次提交
  5. 28 8月, 2015 1 次提交
  6. 07 8月, 2015 1 次提交
    • D
      modsign: Use single PEM file for autogenerated key · fb117949
      David Woodhouse 提交于
      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: NDavid Woodhouse <David.Woodhouse@intel.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      fb117949
  7. 15 6月, 2015 2 次提交
  8. 17 4月, 2015 1 次提交
  9. 18 2月, 2015 1 次提交
  10. 13 2月, 2015 1 次提交
  11. 27 11月, 2014 1 次提交
  12. 26 11月, 2014 1 次提交
  13. 27 10月, 2014 1 次提交
  14. 31 7月, 2014 1 次提交
    • A
      kbuild: Support split debug info v4 · 866ced95
      Andi Kleen 提交于
      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 <dirk@gouders.net>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      866ced95
  15. 17 4月, 2014 1 次提交
  16. 11 2月, 2014 1 次提交
  17. 01 8月, 2013 1 次提交
  18. 18 12月, 2012 1 次提交
  19. 20 10月, 2012 1 次提交
  20. 10 10月, 2012 1 次提交
  21. 01 7月, 2011 1 次提交
  22. 29 4月, 2011 1 次提交
    • S
      kbuild: asm-generic support · d8ecc5cd
      Sam Ravnborg 提交于
      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 += <name-of-header-file.h>
      
      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: NSam Ravnborg <sam@ravnborg.org>
      Acked-by: NGuan Xuetao <guanxuetao@mprc.pku.edu.cn>
      Tested-by: NGuan Xuetao <guanxuetao@mprc.pku.edu.cn>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Remis Lima Baima <remis.developer@googlemail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      d8ecc5cd
  23. 23 2月, 2011 1 次提交
  24. 23 3月, 2010 1 次提交
  25. 13 3月, 2010 1 次提交
  26. 07 3月, 2010 1 次提交
  27. 12 1月, 2010 1 次提交
  28. 12 12月, 2009 7 次提交
  29. 01 12月, 2009 1 次提交
  30. 27 6月, 2009 1 次提交
  31. 15 6月, 2009 2 次提交
  32. 13 6月, 2009 1 次提交