1. 09 8月, 2017 1 次提交
  2. 26 7月, 2017 1 次提交
    • J
      x86/unwind: Add the ORC unwinder · ee9f8fce
      Josh Poimboeuf 提交于
      Add the new ORC unwinder which is enabled by CONFIG_ORC_UNWINDER=y.
      It plugs into the existing x86 unwinder framework.
      
      It relies on objtool to generate the needed .orc_unwind and
      .orc_unwind_ip sections.
      
      For more details on why ORC is used instead of DWARF, see
      Documentation/x86/orc-unwinder.txt - but the short version is
      that it's a simplified, fundamentally more robust debugninfo
      data structure, which also allows up to two orders of magnitude
      faster lookups than the DWARF unwinder - which matters to
      profiling workloads like perf.
      
      Thanks to Andy Lutomirski for the performance improvement ideas:
      splitting the ORC unwind table into two parallel arrays and creating a
      fast lookup table to search a subset of the unwind table.
      Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: live-patching@vger.kernel.org
      Link: http://lkml.kernel.org/r/0a6cbfb40f8da99b7a45a1a8302dc6aef16ec812.1500938583.git.jpoimboe@redhat.com
      [ Extended the changelog. ]
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      ee9f8fce
  3. 25 7月, 2017 1 次提交
  4. 30 6月, 2017 1 次提交
  5. 03 5月, 2017 1 次提交
  6. 25 4月, 2017 1 次提交
  7. 04 2月, 2017 1 次提交
    • A
      kbuild: modversions: add infrastructure for emitting relative CRCs · 56067812
      Ard Biesheuvel 提交于
      This add the kbuild infrastructure that will allow architectures to emit
      vmlinux symbol CRCs as 32-bit offsets to another location in the kernel
      where the actual value is stored. This works around problems with CRCs
      being mistaken for relocatable symbols on kernels that self relocate at
      runtime (i.e., powerpc with CONFIG_RELOCATABLE=y)
      
      For the kbuild side of things, this comes down to the following:
      
       - introducing a Kconfig symbol MODULE_REL_CRCS
      
       - adding a -R switch to genksyms to instruct it to emit the CRC symbols
         as references into the .rodata section
      
       - making modpost distinguish such references from absolute CRC symbols
         by the section index (SHN_ABS)
      
       - making kallsyms disregard non-absolute symbols with a __crc_ prefix
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      56067812
  8. 11 12月, 2016 1 次提交
  9. 29 11月, 2016 2 次提交
  10. 10 11月, 2016 1 次提交
  11. 01 11月, 2016 1 次提交
  12. 23 10月, 2016 1 次提交
  13. 09 9月, 2016 1 次提交
    • S
      kbuild: allow architectures to use thin archives instead of ld -r · a5967db9
      Stephen Rothwell 提交于
      ld -r is an incremental link used to create built-in.o files in build
      subdirectories. It produces relocatable object files containing all
      its input files, and these are are then pulled together and relocated
      in the final link. Aside from the bloat, this constrains the final
      link relocations, which has bitten large powerpc builds with
      unresolvable relocations in the final link.
      
      Alan Modra has recommended the kernel use thin archives for linking.
      This is an alternative and means that the linker has more information
      available to it when it links the kernel.
      
      This patch enables a config option architectures can select, which
      causes all built-in.o files to be built as thin archives. built-in.o
      files in subdirectories do not get symbol table or index attached,
      which improves speed and size. The final link pass creates a
      built-in.o archive in the root output directory which includes the
      symbol table and index. The linker then uses takes this file to link.
      
      The --whole-archive linker option is required, because the linker now
      has visibility to every individual object file, and it will otherwise
      just completely avoid including those without external references
      (consider a file with EXPORT_SYMBOL or initcall or hardware exceptions
      as its only entry points). The traditional built works "by luck" as
      built-in.o files are large enough that they're going to get external
      references. However this optimisation is unpredictable for the kernel
      (due to above external references), ineffective at culling unused, and
      costly because the .o files have to be searched for references.
      Superior alternatives for link-time culling should be used instead.
      
      Build characteristics for inclink vs thinarc, on a small powerpc64le
      pseries VM with a modest .config:
      
                                        inclink       thinarc
      sizes
      vmlinux                        15 618 680    15 625 028
      sum of all built-in.o          56 091 808     1 054 334
      sum excluding root built-in.o                   151 430
      
      find -name built-in.o | xargs rm ; time make vmlinux
      real                              22.772s       21.143s
      user                              13.280s       13.430s
      sys                                4.310s        2.750s
      
      - Final kernel pulled in only about 6K more, which shows how
        ineffective the object file culling is.
      - Build performance looks improved due to less pagecache activity.
        On IO constrained systems it could be a bigger win.
      - Build size saving is significant.
      
      Side note, the toochain understands archives, so there's some tricks,
      $ ar t built-in.o          # list all files you linked with
      $ size built-in.o          # and their sizes
      $ objdump -d built-in.o    # disassembly (unrelocated) with filenames
      
      Implementation by sfr, minor tweaks by npiggin.
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      a5967db9
  14. 08 8月, 2016 1 次提交
    • A
      [kbuild] handle exports in lib-y objects reliably · 7f2084fa
      Al Viro 提交于
      Collect the symbols exported by anything that goes into lib.a and
      add an empty object (lib-exports.o) with explicit undefs for each
      of those to obj-y.
      
      That allows to relax the rules regarding the use of exports in
      lib-* objects - right now an object with export can be in lib-*
      only if we are guaranteed that there always will be users in
      built-in parts of the tree, otherwise it needs to be in obj-*.
      As the result, we have an unholy mix of lib- and obj- in lib/Makefile
      and (especially) in arch/*/lib/Makefile.  Moreover, a change in
      generic part of the kernel can lead to mysteriously missing exports
      on some configs.  With this change we don't have to worry about
      that anymore.
      
      One side effect is that built-in.o now pulls everything with exports
      from the corresponding lib.a (if such exists).  That's exactly what
      we want for linking vmlinux and fortunately it's almost the only thing
      built-in.o is used in.  arch/ia64/hp/sim/boot/bootloader is the only
      exception and it's easy to get rid of now - just turn everything in
      arch/ia64/lib into lib-* and don't bother with arch/ia64/lib/built-in.o
      anymore.
      
      [AV: stylistic fix from Michal folded in]
      Acked-by: NMichal Marek <mmarek@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      7f2084fa
  15. 08 6月, 2016 1 次提交
  16. 20 4月, 2016 2 次提交
  17. 30 3月, 2016 2 次提交
    • N
      kbuild: de-duplicate fixdep usage · e4aca459
      Nicolas Pitre 提交于
      The generation and postprocessing of automatic dependency rules is
      duplicated in rule_cc_o_c, rule_as_o_S and if_changed_dep. Since
      this is not a trivial one-liner action, it is now abstracted under
      cmd_and_fixdep to simplify things and make future changes in this area
      easier.
      
      In the rule_cc_o_c and rule_as_o_S cases that means the order of some
      commands has been altered, namely fixdep and related file manipulations
      are executed earlier, but they didn't depend on those commands that now
      execute later.
      Signed-off-by: NNicolas Pitre <nico@linaro.org>
      e4aca459
    • N
      kbuild: record needed exported symbols for modules · 9895c03d
      Nicolas Pitre 提交于
      Kernel modules are partially linked object files with some undefined
      symbols that are expected to be matched with EXPORT_SYMBOL() entries
      from elsewhere.
      
      Each .tmp_versions/*.mod file currently contains two line of text
      separated by a newline character. The first line has the actual module
      file name while the second line has a list of object files constituting
      that module. Those files are parsed by modpost (scripts/mod/sumversion.c),
      scripts/Makefile.modpost, scripts/Makefile.modsign, etc.  Only the
      modpost utility cares about the second line while the others retrieve
      only the first line.
      
      Therefore we can add a third line to record the list of undefined symbols
      aka required EXPORT_SYMBOL() entries for each module into that file
      without breaking anything. Like for the second line, symbols are separated
      by a blank and the list is terminated with a newline character.
      
      To avoid needless build overhead, the undefined symbols extraction is
      performed only when CONFIG_TRIM_UNUSED_KSYMS is selected.
      Signed-off-by: NNicolas Pitre <nico@linaro.org>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      9895c03d
  18. 05 3月, 2016 1 次提交
  19. 29 2月, 2016 1 次提交
  20. 25 11月, 2015 1 次提交
    • M
      kbuild: Allow to specify composite modules with modname-m · cf4f2193
      Michal Marek 提交于
      This allows to write
      
        drm-$(CONFIG_AGP) += drm_agpsupport.o
      
      without having to handle CONFIG_AGP=y vs. CONFIG_AGP=m. Only support
      this syntax for modules, since built-in code depending on something
      modular cannot work and init/Makefile actually relies on the current
      semantics. There are a few drivers which adapted to the current
      semantics out of necessity; these are fixed to also work when the
      respective subsystem is modular.
      
      Acked-by: Peter Chen <peter.chen@freescale.com> [chipidea]
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      cf4f2193
  21. 29 1月, 2015 1 次提交
  22. 02 10月, 2014 1 次提交
  23. 19 8月, 2014 1 次提交
    • M
      kbuild: handle multi-objs dependency appropriately · c8589d1e
      Masahiro Yamada 提交于
      The comment in scripts/Makefile.build says as follows:
      
        We would rather have a list of rules like
              foo.o: $(foo-objs)
        but that's not so easy, so we rather make all composite objects depend
        on the set of all their parts
      
      This commit makes it possible!
      
      For example, assume a Makefile like this
      
        obj-m = foo.o bar.o
        foo-objs := foo1.o foo2.o
        bar-objs := bar1.o bar2.o
      
      Without this patch, foo.o depends on all of
      foo1.o foo2.o bar1.o bar2.o.
      It looks funny that foo.o is regenerated when bar1.c is updated.
      
      Now we can handle the dependency of foo.o and bar.o separately.
      Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      c8589d1e
  24. 30 4月, 2014 1 次提交
  25. 17 4月, 2014 1 次提交
  26. 10 4月, 2014 1 次提交
  27. 14 2月, 2014 1 次提交
  28. 20 3月, 2013 1 次提交
    • J
      genksyms: pass symbol-prefix instead of arch · d70f82ac
      James Hogan 提交于
      Pass symbol-prefix to genksyms instead of arch, so that the decision
      what symbol prefix to use is kept in one place.
      
      Basically genksyms used to take a -a $ARCH argument and it used that to
      determine whether to add an underscore symbol prefix. It's now changed
      to take a -s $SYMBOL_PREFIX argument so that the caller decides whether
      a symbol prefix is required. The build system then uses
      CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX to determine whether to pass the
      argument.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      d70f82ac
  29. 08 10月, 2012 1 次提交
    • D
      X.509: Add simple ASN.1 grammar compiler · 4520c6a4
      David Howells 提交于
      Add a simple ASN.1 grammar compiler.  This produces a bytecode output that can
      be fed to a decoder to inform the decoder how to interpret the ASN.1 stream it
      is trying to parse.
      
      Action functions can be specified in the grammar by interpolating:
      
      	({ foo })
      
      after a type, for example:
      
      	SubjectPublicKeyInfo ::= SEQUENCE {
      		algorithm		AlgorithmIdentifier,
      		subjectPublicKey	BIT STRING ({ do_key_data })
      		}
      
      The decoder is expected to call these after matching this type and parsing the
      contents if it is a constructed type.
      
      The grammar compiler does not currently support the SET type (though it does
      support SET OF) as I can't see a good way of tracking which members have been
      encountered yet without using up extra stack space.
      
      Currently, the grammar compiler will fail if more than 256 bytes of bytecode
      would be produced or more than 256 actions have been specified as it uses
      8-bit jump values and action indices to keep space usage down.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      4520c6a4
  30. 26 1月, 2012 1 次提交
  31. 31 8月, 2011 1 次提交
  32. 19 5月, 2011 1 次提交
  33. 17 5月, 2011 3 次提交
  34. 02 5月, 2011 1 次提交
  35. 29 4月, 2011 1 次提交