1. 19 11月, 2019 1 次提交
    • S
      ftrace: Rename ftrace_graph_stub to ftrace_stub_graph · 46f94692
      Steven Rostedt (VMware) 提交于
      The ftrace_graph_stub was created and points to ftrace_stub as a way to
      assign the functon graph tracer function pointer to a stub function with a
      different prototype than what ftrace_stub has and not trigger the C
      verifier. The ftrace_graph_stub was created via the linker script
      vmlinux.lds.h. Unfortunately, powerpc already uses the name
      ftrace_graph_stub for its internal implementation of the function graph
      tracer, and even though powerpc would still build, the change via the linker
      script broke function tracer on powerpc from working.
      
      By using the name ftrace_stub_graph, which does not exist anywhere else in
      the kernel, this should not be a problem.
      
      Link: https://lore.kernel.org/r/1573849732.5937.136.camel@lca.pw
      
      Fixes: b83b43ff ("fgraph: Fix function type mismatches of ftrace_graph_return using ftrace_stub")
      Reorted-by: NQian Cai <cai@lca.pw>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      46f94692
  2. 15 11月, 2019 1 次提交
  3. 20 8月, 2019 1 次提交
  4. 27 6月, 2019 1 次提交
  5. 08 6月, 2019 1 次提交
    • S
      parisc: add dynamic ftrace · 6ca63662
      Sven Schnelle 提交于
      This patch implements dynamic ftrace for PA-RISC. The required mcount
      call sequences can get pretty long, so instead of patching the
      whole call sequence out of the functions, we are using
      -fpatchable-function-entry from gcc. This puts a configurable amount of
      NOPS before/at the start of the function. Taking do_sys_open() as example,
      which would look like this when the call is patched out:
      
      1036b248:       08 00 02 40     nop
      1036b24c:       08 00 02 40     nop
      1036b250:       08 00 02 40     nop
      1036b254:       08 00 02 40     nop
      
      1036b258 <do_sys_open>:
      1036b258:       08 00 02 40     nop
      1036b25c:       08 03 02 41     copy r3,r1
      1036b260:       6b c2 3f d9     stw rp,-14(sp)
      1036b264:       08 1e 02 43     copy sp,r3
      1036b268:       6f c1 01 00     stw,ma r1,80(sp)
      
      When ftrace gets enabled for this function the kernel will patch these
      NOPs to:
      
      1036b248:       10 19 57 20     <address of ftrace>
      1036b24c:       6f c1 00 80     stw,ma r1,40(sp)
      1036b250:       48 21 3f d1     ldw -18(r1),r1
      1036b254:       e8 20 c0 02     bv,n r0(r1)
      
      1036b258 <do_sys_open>:
      1036b258:       e8 3f 1f df     b,l,n .-c,r1
      1036b25c:       08 03 02 41     copy r3,r1
      1036b260:       6b c2 3f d9     stw rp,-14(sp)
      1036b264:       08 1e 02 43     copy sp,r3
      1036b268:       6f c1 01 00     stw,ma r1,80(sp)
      
      So the first NOP in do_sys_open() will be patched to jump backwards into
      some minimal trampoline code which pushes a stackframe, saves r1 which
      holds the return address, loads the address of the real ftrace function,
      and branches to that location. For 64 Bit things are getting a bit more
      complicated (and longer) because we must make sure that the address of
      ftrace location is 8 byte aligned, and the offset passed to ldd for
      fetching the address is 8 byte aligned as well.
      
      Note that gcc has a bug which misplaces the function label, and needs a
      patch to make dynamic ftrace work. See
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90751 for details.
      Signed-off-by: NSven Schnelle <svens@stackframe.org>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      6ca63662
  6. 29 5月, 2019 2 次提交
    • J
      srcu: Remove unused vmlinux srcu linker entries · 54e6c11b
      Joel Fernandes (Google) 提交于
      The SRCU for modules optimization (commit title "srcu: Allocate per-CPU
      data for DEFINE_SRCU() in modules") introduced vmlinux linker entries
      which is unused since it applies only to the built-in vmlinux. So remove
      it to prevent any space usage due to the 8 byte alignment it added.
      vmlinux.lds.h has no effect on module loading and is not used for
      building the module object, so the changes were not needed in the first
      place since the optimization is specific to modules.
      
      Tested with SRCU torture_type and rcutorture. Put prints in module
      loader to confirm it is able to find and initialize the srcu structures.
      
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: kernel-team@android.com
      Cc: paulmck@linux.vnet.ibm.com
      Signed-off-by: NJoel Fernandes (Google) <joel@joelfernandes.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.ibm.com>
      54e6c11b
    • P
      srcu: Allocate per-CPU data for DEFINE_SRCU() in modules · fe15b50c
      Paul E. McKenney 提交于
      Adding DEFINE_SRCU() or DEFINE_STATIC_SRCU() to a loadable module requires
      that the size of the reserved region be increased, which is not something
      we want to be doing all that often.  One approach would be to require
      that loadable modules define an srcu_struct and invoke init_srcu_struct()
      from their module_init function and cleanup_srcu_struct() from their
      module_exit function.  However, this is more than a bit user unfriendly.
      
      This commit therefore creates an ___srcu_struct_ptrs linker section,
      and pointers to srcu_struct structures created by DEFINE_SRCU() and
      DEFINE_STATIC_SRCU() within a module are placed into that module's
      ___srcu_struct_ptrs section.  The required init_srcu_struct() and
      cleanup_srcu_struct() functions are then automatically invoked as needed
      when that module is loaded and unloaded, thus allowing modules to continue
      to use DEFINE_SRCU() and DEFINE_STATIC_SRCU() while avoiding the need
      to increase the size of the reserved region.
      
      Many of the algorithms and some of the code was cheerfully cherry-picked
      from other code making use of linker sections, perhaps most notably from
      tracepoints.  All bugs are nevertheless the sole property of the author.
      Suggested-by: NMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      [ paulmck: Use __section() and use "default" in srcu_module_notify()'s
        "switch" statement as suggested by Joel Fernandes. ]
      Signed-off-by: NPaul E. McKenney <paulmck@linux.ibm.com>
      Tested-by: NJoel Fernandes (Google) <joel@joelfernandes.org>
      fe15b50c
  7. 07 5月, 2019 1 次提交
    • A
      moduleparam: Save information about built-in modules in separate file · 898490c0
      Alexey Gladkov 提交于
      Problem:
      
      When a kernel module is compiled as a separate module, some important
      information about the kernel module is available via .modinfo section of
      the module.  In contrast, when the kernel module is compiled into the
      kernel, that information is not available.
      
      Information about built-in modules is necessary in the following cases:
      
      1. When it is necessary to find out what additional parameters can be
      passed to the kernel at boot time.
      
      2. When you need to know which module names and their aliases are in
      the kernel. This is very useful for creating an initrd image.
      
      Proposal:
      
      The proposed patch does not remove .modinfo section with module
      information from the vmlinux at the build time and saves it into a
      separate file after kernel linking. So, the kernel does not increase in
      size and no additional information remains in it. Information is stored
      in the same format as in the separate modules (null-terminated string
      array). Because the .modinfo section is already exported with a separate
      modules, we are not creating a new API.
      
      It can be easily read in the userspace:
      
      $ tr '\0' '\n' < modules.builtin.modinfo
      ext4.softdep=pre: crc32c
      ext4.license=GPL
      ext4.description=Fourth Extended Filesystem
      ext4.author=Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
      ext4.alias=fs-ext4
      ext4.alias=ext3
      ext4.alias=fs-ext3
      ext4.alias=ext2
      ext4.alias=fs-ext2
      md_mod.alias=block-major-9-*
      md_mod.alias=md
      md_mod.description=MD RAID framework
      md_mod.license=GPL
      md_mod.parmtype=create_on_open:bool
      md_mod.parmtype=start_dirty_degraded:int
      ...
      Co-Developed-by: NGleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
      Signed-off-by: NGleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
      Signed-off-by: NAlexey Gladkov <gladkov.alexey@gmail.com>
      Acked-by: NJessica Yu <jeyu@kernel.org>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      898490c0
  8. 18 3月, 2019 1 次提交
    • M
      vmlinux.lds.h: drop unused __vermagic · 9672e2cb
      Mathias Krause 提交于
      The reference to '__vermagic' is a relict from v2.5 times. And even
      there it had a very short life time, from v2.5.59 (commit 1d411b80ee18
      ("Module Sanity Check") in the historic tree) to v2.5.69 (commit
      67ac5b866bda ("[PATCH] complete modinfo section")).
      
      Neither current kernels nor modules contain a '__vermagic' section any
      more, so get rid of it.
      Signed-off-by: NMathias Krause <minipli@googlemail.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Jessica Yu <jeyu@kernel.org>
      Signed-off-by: NJessica Yu <jeyu@kernel.org>
      9672e2cb
  9. 07 3月, 2019 1 次提交
  10. 12 10月, 2018 2 次提交
  11. 11 10月, 2018 3 次提交
  12. 27 9月, 2018 1 次提交
  13. 22 8月, 2018 1 次提交
  14. 10 7月, 2018 1 次提交
    • R
      iommu: Remove IOMMU_OF_DECLARE · ac6bbf0c
      Rob Herring 提交于
      Now that we use the driver core to stop deferred probe for missing
      drivers, IOMMU_OF_DECLARE can be removed.
      
      This is slightly less optimal than having a list of built-in drivers in
      that we'll now defer probe twice before giving up. This shouldn't have a
      significant impact on boot times as past discussions about deferred
      probe have given no evidence of deferred probe having a substantial
      impact.
      
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: iommu@lists.linux-foundation.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: linux-arm-msm@vger.kernel.org
      Cc: linux-rockchip@lists.infradead.org
      Cc: devicetree@vger.kernel.org
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Acked-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Acked-by: NJoerg Roedel <jroedel@suse.de>
      Signed-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ac6bbf0c
  15. 17 5月, 2018 2 次提交
  16. 23 4月, 2018 1 次提交
    • D
      earlycon: Use a pointer table to fix __earlycon_table stride · dd709e72
      Daniel Kurtz 提交于
      Commit 99492c39 ("earlycon: Fix __earlycon_table stride") tried to fix
      __earlycon_table stride by forcing the earlycon_id struct alignment to 32
      and asking the linker to 32-byte align the __earlycon_table symbol.  This
      fix was based on commit 07fca0e5 ("tracing: Properly align linker
      defined symbols") which tried a similar fix for the tracing subsystem.
      
      However, this fix doesn't quite work because there is no guarantee that
      gcc will place structures packed into an array format.  In fact, gcc 4.9
      chooses to 64-byte align these structs by inserting additional padding
      between the entries because it has no clue that they are supposed to be in
      an array.  If we are unlucky, the linker will assign symbol
      "__earlycon_table" to a 32-byte aligned address which does not correspond
      to the 64-byte aligned contents of section "__earlycon_table".
      
      To address this same problem, the fix to the tracing system was
      subsequently re-implemented using a more robust table of pointers approach
      by commits:
       3d56e331 ("tracing: Replace syscall_meta_data struct array with pointer array")
       65498646 ("tracepoints: Fix section alignment using pointer array")
       e4a9ea5e ("tracing: Replace trace_event struct array with pointer array")
      
      Let's use this same "array of pointers to structs" approach for
      EARLYCON_TABLE.
      
      Fixes: 99492c39 ("earlycon: Fix __earlycon_table stride")
      Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org>
      Suggested-by: NAaron Durbin <adurbin@chromium.org>
      Reviewed-by: NRob Herring <robh@kernel.org>
      Tested-by: NGuenter Roeck <groeck@chromium.org>
      Reviewed-by: NGuenter Roeck <groeck@chromium.org>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dd709e72
  17. 29 3月, 2018 1 次提交
    • A
      bpf: introduce BPF_RAW_TRACEPOINT · c4f6699d
      Alexei Starovoitov 提交于
      Introduce BPF_PROG_TYPE_RAW_TRACEPOINT bpf program type to access
      kernel internal arguments of the tracepoints in their raw form.
      
      >From bpf program point of view the access to the arguments look like:
      struct bpf_raw_tracepoint_args {
             __u64 args[0];
      };
      
      int bpf_prog(struct bpf_raw_tracepoint_args *ctx)
      {
        // program can read args[N] where N depends on tracepoint
        // and statically verified at program load+attach time
      }
      
      kprobe+bpf infrastructure allows programs access function arguments.
      This feature allows programs access raw tracepoint arguments.
      
      Similar to proposed 'dynamic ftrace events' there are no abi guarantees
      to what the tracepoints arguments are and what their meaning is.
      The program needs to type cast args properly and use bpf_probe_read()
      helper to access struct fields when argument is a pointer.
      
      For every tracepoint __bpf_trace_##call function is prepared.
      In assembler it looks like:
      (gdb) disassemble __bpf_trace_xdp_exception
      Dump of assembler code for function __bpf_trace_xdp_exception:
         0xffffffff81132080 <+0>:     mov    %ecx,%ecx
         0xffffffff81132082 <+2>:     jmpq   0xffffffff811231f0 <bpf_trace_run3>
      
      where
      
      TRACE_EVENT(xdp_exception,
              TP_PROTO(const struct net_device *dev,
                       const struct bpf_prog *xdp, u32 act),
      
      The above assembler snippet is casting 32-bit 'act' field into 'u64'
      to pass into bpf_trace_run3(), while 'dev' and 'xdp' args are passed as-is.
      All of ~500 of __bpf_trace_*() functions are only 5-10 byte long
      and in total this approach adds 7k bytes to .text.
      
      This approach gives the lowest possible overhead
      while calling trace_xdp_exception() from kernel C code and
      transitioning into bpf land.
      Since tracepoint+bpf are used at speeds of 1M+ events per second
      this is valuable optimization.
      
      The new BPF_RAW_TRACEPOINT_OPEN sys_bpf command is introduced
      that returns anon_inode FD of 'bpf-raw-tracepoint' object.
      
      The user space looks like:
      // load bpf prog with BPF_PROG_TYPE_RAW_TRACEPOINT type
      prog_fd = bpf_prog_load(...);
      // receive anon_inode fd for given bpf_raw_tracepoint with prog attached
      raw_tp_fd = bpf_raw_tracepoint_open("xdp_exception", prog_fd);
      
      Ctrl-C of tracing daemon or cmdline tool that uses this feature
      will automatically detach bpf program, unload it and
      unregister tracepoint probe.
      
      On the kernel side the __bpf_raw_tp_map section of pointers to
      tracepoint definition and to __bpf_trace_*() probe function is used
      to find a tracepoint with "xdp_exception" name and
      corresponding __bpf_trace_xdp_exception() probe function
      which are passed to tracepoint_probe_register() to connect probe
      with tracepoint.
      
      Addition of bpf_raw_tracepoint doesn't interfere with ftrace and perf
      tracepoint mechanisms. perf_event_open() can be used in parallel
      on the same tracepoint.
      Multiple bpf_raw_tracepoint_open("xdp_exception", prog_fd) are permitted.
      Each with its own bpf program. The kernel will execute
      all tracepoint probes and all attached bpf programs.
      
      In the future bpf_raw_tracepoints can be extended with
      query/introspection logic.
      
      __bpf_raw_tp_map section logic was contributed by Steven Rostedt
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      Acked-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      c4f6699d
  18. 08 3月, 2018 1 次提交
  19. 13 1月, 2018 2 次提交
    • M
      error-injection: Add injectable error types · 663faf9f
      Masami Hiramatsu 提交于
      Add injectable error types for each error-injectable function.
      
      One motivation of error injection test is to find software flaws,
      mistakes or mis-handlings of expectable errors. If we find such
      flaws by the test, that is a program bug, so we need to fix it.
      
      But if the tester miss input the error (e.g. just return success
      code without processing anything), it causes unexpected behavior
      even if the caller is correctly programmed to handle any errors.
      That is not what we want to test by error injection.
      
      To clarify what type of errors the caller must expect for each
      injectable function, this introduces injectable error types:
      
       - EI_ETYPE_NULL : means the function will return NULL if it
      		    fails. No ERR_PTR, just a NULL.
       - EI_ETYPE_ERRNO : means the function will return -ERRNO
      		    if it fails.
       - EI_ETYPE_ERRNO_NULL : means the function will return -ERRNO
      		       (ERR_PTR) or NULL.
      
      ALLOW_ERROR_INJECTION() macro is expanded to get one of
      NULL, ERRNO, ERRNO_NULL to record the error type for
      each function. e.g.
      
       ALLOW_ERROR_INJECTION(open_ctree, ERRNO)
      
      This error types are shown in debugfs as below.
      
        ====
        / # cat /sys/kernel/debug/error_injection/list
        open_ctree [btrfs]	ERRNO
        io_ctl_init [btrfs]	ERRNO
        ====
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Reviewed-by: NJosef Bacik <jbacik@fb.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      663faf9f
    • M
      error-injection: Separate error-injection from kprobe · 540adea3
      Masami Hiramatsu 提交于
      Since error-injection framework is not limited to be used
      by kprobes, nor bpf. Other kernel subsystems can use it
      freely for checking safeness of error-injection, e.g.
      livepatch, ftrace etc.
      So this separate error-injection framework from kprobes.
      
      Some differences has been made:
      
      - "kprobe" word is removed from any APIs/structures.
      - BPF_ALLOW_ERROR_INJECTION() is renamed to
        ALLOW_ERROR_INJECTION() since it is not limited for BPF too.
      - CONFIG_FUNCTION_ERROR_INJECTION is the config item of this
        feature. It is automatically enabled if the arch supports
        error injection feature for kprobe or ftrace etc.
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Reviewed-by: NJosef Bacik <jbacik@fb.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      540adea3
  20. 10 1月, 2018 1 次提交
  21. 13 12月, 2017 1 次提交
  22. 18 11月, 2017 1 次提交
  23. 07 11月, 2017 1 次提交
  24. 14 10月, 2017 1 次提交
  25. 28 9月, 2017 1 次提交
    • K
      locking/refcounts, x86/asm: Use unique .text section for refcount exceptions · 564c9cc8
      Kees Cook 提交于
      Using .text.unlikely for refcount exceptions isn't safe because gcc may
      move entire functions into .text.unlikely (e.g. in6_dev_dev()), which
      would cause any uses of a protected refcount_t function to stay inline
      with the function, triggering the protection unconditionally:
      
              .section        .text.unlikely,"ax",@progbits
              .type   in6_dev_get, @function
      in6_dev_getx:
      .LFB4673:
              .loc 2 4128 0
              .cfi_startproc
      ...
              lock; incl 480(%rbx)
              js 111f
              .pushsection .text.unlikely
      111:    lea 480(%rbx), %rcx
      112:    .byte 0x0f, 0xff
      .popsection
      113:
      
      This creates a unique .text..refcount section and adds an additional
      test to the exception handler to WARN in the case of having none of OF,
      SF, nor ZF set so we can see things like this more easily in the future.
      
      The double dot for the section name keeps it out of the TEXT_MAIN macro
      namespace, to avoid collisions and so it can be put at the end with
      text.unlikely to keep the cold code together.
      
      See commit:
      
        cb87481e ("kbuild: linker script do not match C names unless LD_DEAD_CODE_DATA_ELIMINATION is configured")
      
      ... which matches C names: [a-zA-Z0-9_] but not ".".
      Reported-by: NMike Galbraith <efault@gmx.de>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Elena <elena.reshetova@intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-arch <linux-arch@vger.kernel.org>
      Fixes: 7a46ec0e ("locking/refcounts, x86/asm: Implement fast refcount overflow protection")
      Link: http://lkml.kernel.org/r/1504382986-49301-2-git-send-email-keescook@chromium.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      564c9cc8
  26. 15 8月, 2017 1 次提交
    • A
      mtd: only use __xipram annotation when XIP_KERNEL is set · 129f6c48
      Arnd Bergmann 提交于
      When XIP_KERNEL is enabled, some functions are defined in the .data
      ELF section because we require them to be in RAM whenever we communicate
      with the flash chip. However this causes problems when FTRACE is
      enabled and gcc emits calls to __gnu_mcount_nc in the function
      prolog:
      
      drivers/built-in.o: In function `cfi_chip_setup':
      :(.data+0x272fc): relocation truncated to fit: R_ARM_CALL against symbol `__gnu_mcount_nc' defined in .text section in arch/arm/kernel/built-in.o
      drivers/built-in.o: In function `cfi_probe_chip':
      :(.data+0x27de8): relocation truncated to fit: R_ARM_CALL against symbol `__gnu_mcount_nc' defined in .text section in arch/arm/kernel/built-in.o
      /tmp/ccY172rP.s: Assembler messages:
      /tmp/ccY172rP.s:70: Warning: ignoring changed section attributes for .data
      /tmp/ccY172rP.s: Error: 1 warning, treating warnings as errors
      make[5]: *** [drivers/mtd/chips/cfi_probe.o] Error 1
      /tmp/ccK4rjeO.s: Assembler messages:
      /tmp/ccK4rjeO.s:421: Warning: ignoring changed section attributes for .data
      /tmp/ccK4rjeO.s: Error: 1 warning, treating warnings as errors
      make[5]: *** [drivers/mtd/chips/cfi_util.o] Error 1
      /tmp/ccUvhCYR.s: Assembler messages:
      /tmp/ccUvhCYR.s:1895: Warning: ignoring changed section attributes for .data
      /tmp/ccUvhCYR.s: Error: 1 warning, treating warnings as errors
      
      Specifically, this does not work because the .data section is not
      marked executable, which leads LD to not generate trampolines for
      long calls.
      
      This moves the __xipram functions into their own .xiptext section instead.
      The section is still placed next to .data and located in RAM but is marked
      executable, which avoids the build errors.
      
      Also, we only need to place the XIP functions into a separate section
      if both CONFIG_XIP_KERNEL and CONFIG_MTD_XIP are set: When only MTD_XIP
      is used, the whole kernel is still in RAM and we do not need to worry
      about pulling out the rug under it. When only XIP_KERNEL but not MTD_XIP
      is set, the kernel is in some form of ROM, but we never write to it.
      
      Note that MTD_XIP has been broken on ARM since around 2011 or 2012. I
      have sent another patch[2] to fix compilation, which I plan to merge
      through arm-soc unless there are objections. The obvious alternative
      to that would be to completely rip out the MTD_XIP support from the
      kernel, since obviously nobody has been using it in a long while.
      
      Link: [1] https://patchwork.kernel.org/patch/8109771/
      Link: [2] https://patchwork.kernel.org/patch/9855225/Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      129f6c48
  27. 10 8月, 2017 1 次提交
  28. 09 8月, 2017 1 次提交
  29. 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
  30. 14 6月, 2017 3 次提交
  31. 12 6月, 2017 1 次提交
  32. 30 5月, 2017 1 次提交
    • N
      powerpc: Link warning for orphan sections · 83a092cf
      Nicholas Piggin 提交于
      Add --orphan-handling=warn to final link flags. This ensures we can
      handle all sections explicitly. This would have caught subtle breakage
      such as 7de3b27b at build-time.
      
      Also bring existing orphan sections into the fold:
      - .text.hot and .text.unlikely are compiler generated sections.
      - .sdata2, .dynsbss, .plt are used by PPC32
      - We previously did not specify DWARF_DEBUG or STABS_DEBUG
      - DWARF_DEBUG did not include all DWARF sections that can be emitted
      - A number of sections are unused and can be discarded.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      83a092cf