1. 14 4月, 2020 3 次提交
  2. 28 3月, 2020 1 次提交
  3. 26 3月, 2020 7 次提交
  4. 21 2月, 2020 2 次提交
  5. 11 2月, 2020 3 次提交
  6. 28 10月, 2019 1 次提交
  7. 01 10月, 2019 1 次提交
  8. 25 9月, 2019 1 次提交
  9. 25 7月, 2019 1 次提交
  10. 19 7月, 2019 12 次提交
  11. 18 7月, 2019 1 次提交
  12. 09 7月, 2019 1 次提交
    • J
      objtool: Add support for C jump tables · 87b512de
      Josh Poimboeuf 提交于
      Objtool doesn't know how to read C jump tables, so it has to whitelist
      functions which use them, causing missing ORC unwinder data for such
      functions, e.g. ___bpf_prog_run().
      
      C jump tables are very similar to GCC switch jump tables, which objtool
      already knows how to read.  So adding support for C jump tables is easy.
      It just needs to be able to find the tables and distinguish them from
      other data.
      
      To allow the jump tables to be found, create an __annotate_jump_table
      macro which can be used to annotate them.
      
      The annotation is done by placing the jump table in an
      .rodata..c_jump_table section.  The '.rodata' prefix ensures that the data
      will be placed in the rodata section by the vmlinux linker script.  The
      double periods are part of an existing convention which distinguishes
      kernel sections from GCC sections.
      Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Kairui Song <kasong@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Link: https://lkml.kernel.org/r/0ba2ca30442b16b97165992381ce643dc27b3d1a.1561685471.git.jpoimboe@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      87b512de
  13. 21 5月, 2019 1 次提交
    • T
      treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 · 1ccea77e
      Thomas Gleixner 提交于
      Based on 2 normalized pattern(s):
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version this program is distributed in the
        hope that it will be useful but without any warranty without even
        the implied warranty of merchantability or fitness for a particular
        purpose see the gnu general public license for more details you
        should have received a copy of the gnu general public license along
        with this program if not see http www gnu org licenses
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version this program is distributed in the
        hope that it will be useful but without any warranty without even
        the implied warranty of merchantability or fitness for a particular
        purpose see the gnu general public license for more details [based]
        [from] [clk] [highbank] [c] you should have received a copy of the
        gnu general public license along with this program if not see http
        www gnu org licenses
      
      extracted by the scancode license scanner the SPDX license identifier
      
        GPL-2.0-or-later
      
      has been chosen to replace the boilerplate/reference in 355 file(s).
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NJilayne Lovejoy <opensource@jilayne.com>
      Reviewed-by: NSteve Winslow <swinslow@gmail.com>
      Reviewed-by: NAllison Randal <allison@lohutok.net>
      Cc: linux-spdx@vger.kernel.org
      Link: https://lkml.kernel.org/r/20190519154041.837383322@linutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1ccea77e
  14. 14 5月, 2019 2 次提交
    • J
      objtool: Fix function fallthrough detection · e6f393bc
      Josh Poimboeuf 提交于
      When a function falls through to the next function due to a compiler
      bug, objtool prints some obscure warnings.  For example:
      
        drivers/regulator/core.o: warning: objtool: regulator_count_voltages()+0x95: return with modified stack frame
        drivers/regulator/core.o: warning: objtool: regulator_count_voltages()+0x0: stack state mismatch: cfa1=7+32 cfa2=7+8
      
      Instead it should be printing:
      
        drivers/regulator/core.o: warning: objtool: regulator_supply_is_couple() falls through to next function regulator_count_voltages()
      
      This used to work, but was broken by the following commit:
      
        13810435 ("objtool: Support GCC 8's cold subfunctions")
      
      The padding nops at the end of a function aren't actually part of the
      function, as defined by the symbol table.  So the 'func' variable in
      validate_branch() is getting cleared to NULL when a padding nop is
      encountered, breaking the fallthrough detection.
      
      If the current instruction doesn't have a function associated with it,
      just consider it to be part of the previously detected function by not
      overwriting the previous value of 'func'.
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: <stable@vger.kernel.org>
      Fixes: 13810435 ("objtool: Support GCC 8's cold subfunctions")
      Link: http://lkml.kernel.org/r/546d143820cd08a46624ae8440d093dd6c902cae.1557766718.git.jpoimboe@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      e6f393bc
    • J
      objtool: Don't use ignore flag for fake jumps · e6da9567
      Josh Poimboeuf 提交于
      The ignore flag is set on fake jumps in order to keep
      add_jump_destinations() from setting their jump_dest, since it already
      got set when the fake jump was created.
      
      But using the ignore flag is a bit of a hack.  It's normally used to
      skip validation of an instruction, which doesn't really make sense for
      fake jumps.
      
      Also, after the next patch, using the ignore flag for fake jumps can
      trigger a false "why am I validating an ignored function?" warning.
      
      Instead just add an explicit check in add_jump_destinations() to skip
      fake jumps.
      Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/71abc072ff48b2feccc197723a9c52859476c068.1557766718.git.jpoimboe@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      e6da9567
  15. 05 4月, 2019 1 次提交
  16. 03 4月, 2019 2 次提交
    • P
      objtool: Add Direction Flag validation · 2f0f9e9a
      Peter Zijlstra 提交于
      Having DF escape is BAD(tm).
      
      Linus; you suggested this one, but since DF really is only used from
      ASM and the failure case is fairly obvious, do we really need this?
      
      OTOH the patch is fairly small and simple, so let's just do this
      to demonstrate objtool's superior awesomeness.
      Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      2f0f9e9a
    • P
      objtool: Add UACCESS validation · ea24213d
      Peter Zijlstra 提交于
      It is important that UACCESS regions are as small as possible;
      furthermore the UACCESS state is not scheduled, so doing anything that
      might directly call into the scheduler will cause random code to be
      ran with UACCESS enabled.
      
      Teach objtool too track UACCESS state and warn about any CALL made
      while UACCESS is enabled. This very much includes the __fentry__()
      and __preempt_schedule() calls.
      
      Note that exceptions _do_ save/restore the UACCESS state, and therefore
      they can drive preemption. This also means that all exception handlers
      must have an otherwise redundant UACCESS disable instruction;
      therefore ignore this warning for !STT_FUNC code (exception handlers
      are not normal functions).
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      ea24213d