1. 06 10月, 2017 1 次提交
  2. 25 3月, 2017 1 次提交
  3. 08 2月, 2017 1 次提交
  4. 28 11月, 2016 1 次提交
  5. 11 10月, 2016 1 次提交
    • E
      latent_entropy: Mark functions with __latent_entropy · 0766f788
      Emese Revfy 提交于
      The __latent_entropy gcc attribute can be used only on functions and
      variables.  If it is on a function then the plugin will instrument it for
      gathering control-flow entropy. If the attribute is on a variable then
      the plugin will initialize it with random contents.  The variable must
      be an integer, an integer array type or a structure with integer fields.
      
      These specific functions have been selected because they are init
      functions (to help gather boot-time entropy), are called at unpredictable
      times, or they have variable loops, each of which provide some level of
      latent entropy.
      Signed-off-by: NEmese Revfy <re.emese@gmail.com>
      [kees: expanded commit message]
      Signed-off-by: NKees Cook <keescook@chromium.org>
      0766f788
  6. 21 9月, 2016 1 次提交
  7. 09 9月, 2016 1 次提交
    • N
      kbuild: allow archs to select link dead code/data elimination · b67067f1
      Nicholas Piggin 提交于
      Introduce LD_DEAD_CODE_DATA_ELIMINATION option for architectures to
      select to build with -ffunction-sections, -fdata-sections, and link
      with --gc-sections. It requires some work (documented) to ensure all
      unreferenced entrypoints are live, and requires toolchain and build
      verification, so it is made a per-arch option for now.
      
      On a random powerpc64le build, this yelds a significant size saving,
      it boots and runs fine, but there is a lot I haven't tested as yet, so
      these savings may be reduced if there are bugs in the link.
      
          text      data        bss        dec   filename
      11169741   1180744    1923176	14273661   vmlinux
      10445269   1004127    1919707	13369103   vmlinux.dce
      
      ~700K text, ~170K data, 6% removed from kernel image size.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      b67067f1
  8. 03 8月, 2016 1 次提交
  9. 22 2月, 2016 1 次提交
    • K
      asm-generic: Consolidate mark_rodata_ro() · e267d97b
      Kees Cook 提交于
      Instead of defining mark_rodata_ro() in each architecture, consolidate it.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Gross <agross@codeaurora.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Ashok Kumar <ashoks@broadcom.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: David Brown <david.brown@linaro.org>
      Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Emese Revfy <re.emese@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James E.J. Bottomley <jejb@parisc-linux.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luis R. Rodriguez <mcgrof@suse.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathias Krause <minipli@googlemail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Cc: PaX Team <pageexec@freemail.hu>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Cc: kernel-hardening@lists.openwall.com
      Cc: linux-arch <linux-arch@vger.kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Link: http://lkml.kernel.org/r/1455748879-21872-2-git-send-email-keescook@chromium.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      e267d97b
  10. 06 7月, 2015 1 次提交
    • P
      module: relocate module_init from init.h to module.h · 0fd972a7
      Paul Gortmaker 提交于
      Modular users will always be users of init functionality, but
      users of init functionality are not necessarily always modules.
      
      Hence any functionality like module_init and module_exit would
      be more at home in the module.h file.  And module.h should
      explicitly include init.h to make the dependency clear.
      
      We've already done all the legwork needed to ensure that this
      move does not cause any build regressions due to implicit
      header file include assumptions about where module_init lives.
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      0fd972a7
  11. 17 6月, 2015 1 次提交
  12. 05 3月, 2015 2 次提交
    • I
      init.h: Clean up the __setup()/early_param() macros · c281b945
      Ingo Molnar 提交于
      Make it all a bit easier on the eyes:
      
       - Move the __setup_param() lines right after their init functions
       - Use consistent vertical spacing
       - Use more horizontal spacing to make it look like regular C code
       - Use standard comment style
      
      Cc: Luis R. Rodriguez <mcgrof@suse.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: Dexuan Cui <decui@microsoft.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jan Beulich <JBeulich@suse.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Xishi Qiu <qiuxishi@huawei.com>
      Cc: julia.lawall@lip6.fr
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      c281b945
    • L
      init.h: Add early_param_on_off() · bfb33bad
      Luis R. Rodriguez 提交于
      At times all you need is a kconfig variable to enable a feature,
      by default but you may want to also enable / disable it through
      a kernel parameter. In such cases the parameter routines to turn
      the thing on / off are really simple. Just use a wrapper for
      this, it lets us generalize the code and makes it easier to
      associate parameters with related kernel configuration options.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: Dexuan Cui <decui@microsoft.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: JBeulich@suse.com
      Cc: Jan Beulich <JBeulich@suse.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Xishi Qiu <qiuxishi@huawei.com>
      Cc: julia.lawall@lip6.fr
      Link: http://lkml.kernel.org/r/1425518654-3403-4-git-send-email-mcgrof@do-not-panic.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      bfb33bad
  13. 28 5月, 2014 1 次提交
    • T
      init.h: Update initcall_sync variants to fix build errors · 451ef1ca
      Tony Lindgren 提交于
      We are getting randconfig build errors on device drivers with
      tristate Kconfig option if they are using custom initcall
      levels. Rather than add ifdeffery into the drivers, let's add
      the missing initcall_sync variants.
      
      As the comment in init.h has kept people from updating the
      list of initcalls that can be just module_init when the driver
      is loaded as a loadable module, let's also update the comment
      a bit to describe valid use cases custom initcall levels.
      
      While most drivers should nowadays use just regular module_init
      because of the deferred probe, we do have quite a few custom
      initcall levels left that we cannot remove until tested properly.
      
      There are also still few valid cases where a custom initcall
      level might make sense that I'm aware of.
      
      For example a bus snooping driver can provide information about
      invalid bus access and is handy loader early when built in. But
      there's no hard dependency to have it necessarily built in and
      a loadable module is a valid option.
      
      Another example is a driver implementing a Linux framework like
      pinctrl framework. That driver may be needed early on some
      platforms because of legacy reasons, while it can be just a
      regular module_init on most platforms.
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      451ef1ca
  14. 14 2月, 2014 1 次提交
  15. 11 12月, 2013 1 次提交
  16. 13 11月, 2013 1 次提交
  17. 12 9月, 2013 1 次提交
    • R
      initmpfs: move rootfs code from fs/ramfs/ to init/ · 57f150a5
      Rob Landley 提交于
      When the rootfs code was a wrapper around ramfs, having them in the same
      file made sense.  Now that it can wrap another filesystem type, move it in
      with the init code instead.
      
      This also allows a subsequent patch to access rootfstype= command line
      arg.
      Signed-off-by: NRob Landley <rob@landley.net>
      Cc: Jeff Layton <jlayton@redhat.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Stephen Warren <swarren@nvidia.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Jim Cromie <jim.cromie@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      57f150a5
  18. 27 6月, 2013 1 次提交
    • P
      init.h: remove __cpuinit sections from the kernel · 22f0a273
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      As an interim step, we can dummy out the macros to be no-ops, and
      this will allow us to avoid a giant tree-wide patch, and instead
      we can feed in smaller chunks mainly via the arch/ trees.  This
      is in keeping with commit 78d86c21
      ("init.h: Remove __dev* sections from the kernel")
      
      We don't strictly need to dummy out the macros to do this, but if
      we don't then some harmless section mismatch warnings may temporarily
      result.  For example, notify_cpu_starting() and cpu_up() are arch
      independent (kernel/cpu.c) and are flagged as __cpuinit.  And hence
      the calling functions in the arch specific code are also expected
      to be __cpuinit -- if not, then we get the section mismatch warning.
      
      Two of the three __CPUINIT variants are not used whatsoever, and
      so they are simply removed directly at this point in time.
      
      [1] https://lkml.org/lkml/2013/5/20/589Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      22f0a273
  19. 19 1月, 2013 1 次提交
    • T
      init, block: try to load default elevator module early during boot · bb813f4c
      Tejun Heo 提交于
      This patch adds default module loading and uses it to load the default
      block elevator.  During boot, it's called right after initramfs or
      initrd is made available and right before control is passed to
      userland.  This ensures that as long as the modules are available in
      the usual places in initramfs, initrd or the root filesystem, the
      default modules are loaded as soon as possible.
      
      This will replace the on-demand elevator module loading from elevator
      init path.
      
      v2: Fixed build breakage when !CONFIG_BLOCK.  Reported by kbuild test
          robot.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Alex Riesen <raa.lkml@gmail.com>
      Cc: Fengguang We <fengguang.wu@intel.com>
      bb813f4c
  20. 11 1月, 2013 1 次提交
  21. 18 12月, 2012 1 次提交
  22. 01 12月, 2012 1 次提交
  23. 06 10月, 2012 1 次提交
  24. 27 7月, 2012 1 次提交
  25. 13 1月, 2012 1 次提交
  26. 17 5月, 2011 2 次提交
  27. 23 10月, 2010 1 次提交
  28. 03 3月, 2010 1 次提交
  29. 16 12月, 2009 1 次提交
  30. 02 10月, 2009 1 次提交
  31. 22 8月, 2009 1 次提交
  32. 19 6月, 2009 1 次提交
  33. 17 6月, 2009 1 次提交
  34. 15 6月, 2009 1 次提交
    • S
      vmlinux.lds.h update · 7923f90f
      Sam Ravnborg 提交于
      Updated after review by Tim Abbott.
      - Use HEAD_TEXT_SECTION
      - Drop use of section-names.h and delete file
      - Introduce EXIT_CALL
      
      Deleting section-names.h required a few simple
      updates of init.h
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@ksplice.com>
      7923f90f
  35. 10 6月, 2009 1 次提交
    • J
      initconst adjustments · fd6c3a8d
      Jan Beulich 提交于
      - add .init.rodata to INIT_DATA, and group all initconst flavors
        together
      - move strings generated from __setup_param() into .init.rodata
      - add .*init.rodata to modpost's sets of init sections
      - make modpost warn about references between meminit and cpuinit
        as well as memexit and cpuexit sections (as CPU and memory
        hotplug are independently selectable features)
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      fd6c3a8d
  36. 28 4月, 2009 1 次提交
  37. 27 4月, 2009 1 次提交
    • T
      Add new HEAD_TEXT_SECTION macro. · c80d471a
      Tim Abbott 提交于
      This patch is preparation for replacing all uses of ".head.text" or
      ".text.head" in the kernel with macros, so that the section name can
      later be changed without having to touch a lot of the kernel.
      
      Since some linker scripts do more complex things than referencing
      HEAD_TEXT, we add a HEAD_TEXT_SECTION macro that just contains the
      actual name.
      
      I've defined HEAD_TEXT_SECTION in a new header,
      include/linux/section-names.h, so that this section name only needs to
      appear in one place.  I anticipate creating similar macro structures
      for a number of other section names.
      
      The long-term goal here is to be able to change the kernel's magic
      section names to those that are compatible with -ffunction-sections
      -fdata-sections.  This requires renaming all magic sections with names
      of the form ".text.foo".
      Signed-off-by: NTim Abbott <tabbott@mit.edu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c80d471a
  38. 17 4月, 2009 1 次提交
    • M
      Driver Core: early platform driver · 13977091
      Magnus Damm 提交于
      V3 of the early platform driver implementation.
      
      Platform drivers are great for embedded platforms because we can separate
      driver configuration from the actual driver.  So base addresses,
      interrupts and other configuration can be kept with the processor or board
      code, and the platform driver can be reused by many different platforms.
      
      For early devices we have nothing today.  For instance, to configure early
      timers and early serial ports we cannot use platform devices.  This
      because the setup order during boot.  Timers are needed before the
      platform driver core code is available.  The same goes for early printk
      support.  Early in this case means before initcalls.
      
      These early drivers today have their configuration either hard coded or
      they receive it using some special configuration method.  This is working
      quite well, but if we want to support both regular kernel modules and
      early devices then we need to have two ways of configuring the same
      driver.  A single way would be better.
      
      The early platform driver patch is basically a set of functions that allow
      drivers to register themselves and architecture code to locate them and
      probe.  Registration happens through early_param().  The time for the
      probe is decided by the architecture code.
      
      See Documentation/driver-model/platform.txt for more details.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      13977091