1. 16 3月, 2016 7 次提交
  2. 13 3月, 2016 1 次提交
  3. 03 3月, 2016 1 次提交
  4. 26 2月, 2016 2 次提交
  5. 24 2月, 2016 4 次提交
    • A
      arm64: switch to relative exception tables · 6c94f27a
      Ard Biesheuvel 提交于
      Instead of using absolute addresses for both the exception location
      and the fixup, use offsets relative to the exception table entry values.
      Not only does this cut the size of the exception table in half, it is
      also a prerequisite for KASLR, since absolute exception table entries
      are subject to dynamic relocation, which is incompatible with the sorting
      of the exception table that occurs at build time.
      
      This patch also introduces the _ASM_EXTABLE preprocessor macro (which
      exists on x86 as well) and its _asm_extable assembly counterpart, as
      shorthands to emit exception table entries.
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      6c94f27a
    • A
      scripts/sortextable: add support for ET_DYN binaries · 7b957b6e
      Ard Biesheuvel 提交于
      Add support to scripts/sortextable for handling relocatable (PIE)
      executables, whose ELF type is ET_DYN, not ET_EXEC. Other than adding
      support for the new type, no changes are needed.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      7b957b6e
    • B
      sparse: Add __private to privatize members of structs · ad315455
      Boqun Feng 提交于
      In C programming language, we don't have a easy way to privatize a
      member of a structure. However in kernel, sometimes there is a need to
      privatize a member in case of potential bugs or misuses.
      
      Fortunately, the noderef attribute of sparse is a way to privatize a
      member, as by defining a member as noderef, the address-of operator on
      the member will produce a noderef pointer to that member, and if anyone
      wants to dereference that kind of pointers to read or modify the member,
      sparse will yell.
      
      Based on this, __private modifier and related operation ACCESS_PRIVATE()
      are introduced, which could help detect undesigned public uses of
      private members of structs. Here is an example of sparse's output if it
      detect an undersigned public use:
      
      | kernel/rcu/tree.c:4453:25: warning: incorrect type in argument 1 (different modifiers)
      | kernel/rcu/tree.c:4453:25:    expected struct raw_spinlock [usertype] *lock
      | kernel/rcu/tree.c:4453:25:    got struct raw_spinlock [noderef] *<noident>
      
      Also, this patch improves compiler.h a little bit by adding comments for
      "#else" and "#endif".
      Signed-off-by: NBoqun Feng <boqun.feng@gmail.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      ad315455
    • R
      kbuild: Allow using host dtc instead of kernel's copy · 6b22b3d1
      Rob Herring 提交于
      Development of dtc happens in its own upstream repository, but testing
      dtc changes against the kernel tree is useful. Change dtc to a variable
      that users can override.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Michal Marek <mmarek@suse.com>
      Cc: linux-kbuild@vger.kernel.org
      6b22b3d1
  6. 19 2月, 2016 1 次提交
    • J
      scripts/sign-file.c: Add support for signing with a raw signature · e5a2e3c8
      Juerg Haefliger 提交于
      This patch adds support for signing a kernel module with a raw
      detached PKCS#7 signature/message.
      
      The signature is not converted and is simply appended to the module so
      it needs to be in the right format. Using openssl, a valid signature can
      be generated like this:
        $ openssl smime -sign -nocerts -noattr -binary -in <module> -inkey \
          <key> -signer <x509> -outform der -out <raw sig>
      
      The resulting raw signature from the above command is (more or less)
      identical to the raw signature that sign-file itself can produce like
      this:
        $ scripts/sign-file -d <hash algo> <key> <x509> <module>
      Signed-off-by: NJuerg Haefliger <juerg.haefliger@hpe.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      e5a2e3c8
  7. 18 2月, 2016 1 次提交
  8. 12 2月, 2016 2 次提交
    • R
      scripts/dtc: Update to upstream commit b06e55c88b9b · 91feabc2
      Rob Herring 提交于
      Sync to upstream dtc commit b06e55c88b9b ("Prevent crash on modulo by
      zero"). This adds the following commits from upstream:
      
      b06e55c Prevent crash on modulo by zero
      b433450 Fix some bugs in processing of line directives
      d728ad5 Fix crash on nul character in string escape sequence
      1ab2205 Gracefully handle bad octal literals
      1937095 Prevent crash on division by zero
      d0b3ab0 libfdt: Fix undefined behaviour in fdt_offset_ptr()
      d4c7c25 libfdt: check for potential overrun in _fdt_splice()
      f58799b libfdt: Add some missing symbols to version.lds
      af9f26d Remove duplicated -Werror in dtc Makefile
      604e61e fdt: Add functions to retrieve strings
      8702bd1 fdt: Add a function to get the index of a string
      2218387 fdt: Add a function to count strings
      554fde2 libfdt: fix comment block of fdt_get_property_namelen()
      e5e6df7 fdtdump: Fix bug printing bytestrings with negative values
      067829e Remove redundant fdtdump test code
      897a429 Move fdt_path_offset alias tests to right tests section
      2d1417c Add simple .travis.yml
      f6dbc6c guess output file format
      5e78dff guess input file format based on file content or file name
      8b927bf tests: convert `echo -n` to `printf`
      64c46b0 Fix crash with poorly defined #size-cells
      
      Cc: Grant Likely <grant.likely@linaro.org>
      Tested-by: NFrank Rowand <frank.rowand@sonymobile.com>
      Reviewed-by: NFrank Rowand <frank.rowand@sonymobile.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      91feabc2
    • F
      scripts/dtc: dtx_diff - add info to error message · 60c7f4cb
      Frank Rowand 提交于
      If kernel config options are not properly set, "make scripts" will not
      compile dtc.  Update the unable to find dtc error message to check
      the kernel config and give better advice on how to create dtc.
      
      Reword another error message to increase clarity.
      Signed-off-by: NFrank Rowand <frank.rowand@sonymobile.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      60c7f4cb
  9. 10 2月, 2016 2 次提交
    • J
      scripts: add "prune-kernel" script to clean up old kernel images · b64e86cd
      J. Bruce Fields 提交于
      Long ago, Dave Jones complained about CONFIG_LOCALVERSION_AUTO:
       "I don't use the auto config, because I end up filling up /boot unless
        I go through and clean them out by hand every time I install a new one
        (which I do probably a dozen or so times a day).  Is there some easy
        way to prune old builds I'm missing?"
      
      To which Bruce replied:
       "I run this by hand every now and then.  I'm probably doing it all wrong"
      
      And if he is running it wrong, then so am I - because I've been using
      this script ever since.  It is true that CONFIG_LOCALVERSION_AUTO easily
      ends up filling your /boot partition if you don't clean up old versions
      regularly, and this script helps make that easier.
      
      Checked with Bruce to see that it's fine to add this to the kernel
      scripts.  Maybe people will come up with enhancements, but more
      importantly, this way I won't misplace this script whenever I install a
      new machine and start doing custom kernels for it.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b64e86cd
    • C
      v2 linux-next scripts/sign-file.c Fix LibreSSL support · 411a6f58
      Codarren Velvindron 提交于
      In file included from scripts/sign-file.c:47:0:
      /usr/include/openssl/cms.h:62:2: error: #error CMS is disabled.
       #error CMS is disabled.
        ^
      scripts/Makefile.host:91: recipe for target 'scripts/sign-file' failed
      make[1]: *** [scripts/sign-file] Error 1
      Makefile:567: recipe for target 'scripts' failed
      make: *** [scripts] Error 2
      
      
      Fix SSL headers so that the kernel can build with LibreSSL
      Signed-off-by: NCodarren Velvindron <codarren@hackers.mu>
      Acked-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      411a6f58
  10. 08 2月, 2016 1 次提交
  11. 25 1月, 2016 1 次提交
  12. 21 1月, 2016 6 次提交
  13. 16 1月, 2016 1 次提交
  14. 15 1月, 2016 2 次提交
  15. 13 1月, 2016 5 次提交
  16. 12 1月, 2016 1 次提交
    • L
      kbuild: Demote 'sign-compare' warning to W=2 · 7599ea8b
      Lee Jones 提交于
      Ideally, a kernel compile with W=1 enabled should complete cleanly;
      however, when we run one currently we are presented with ~25k warnings.
      'sign-compare' accounts for ~22k of those ~25k.
      
      In this patch we're demoting 'sign-compare' warnings to W=2, with a view
      to fixing the remaining 3k W=1 warnings required for a clean build.
      
      Arnd adds:
        "As per our discussion, I'd add that this was inadvertedly introduced
         by Behan when he moved the clang specific warnings into an ifdef block
         and did not notice that -Wsign-compare was interpreted by both gcc
         and clang.
      
         Earlier, it was introduced in just the same way by Jan-Simon as part
         of 3d3d6b84 ("kbuild: LLVMLinux: Adapt warnings for compilation
         with clang")."
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 26ea6bb1 ("kbuild, LLVMLinux: Supress warnings unless W=1-3")
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      7599ea8b
  17. 11 1月, 2016 2 次提交
    • C
      kconfig: fix qconf segfault by deleting heap objects · 5b61c7bd
      Chris Bainbridge 提交于
      On Debian stable (qt-4.8.6) 'make xconfig' intermittently fails due to
      qconf segfaulting at exit time in QXcbEventReader. The cause of this is
      destructors on the heap objects never being called, so fix this by
      properly deleting the heap objects before exit.
      Signed-off-by: NChris Bainbridge <chris.bainbridge@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      5b61c7bd
    • V
      um: link with -lpthread · a7df4716
      Vegard Nossum 提交于
      Similarly to commit fb1770aa, with gcc 5
      on Ubuntu and CONFIG_STATIC_LINK=y I was seeing these linker errors:
      
      /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new':
      (.text+0xcd): undefined reference to `pthread_once'
      /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new':
      (.text+0x126): undefined reference to `pthread_attr_init'
      /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new':
      (.text+0x168): undefined reference to `pthread_attr_setdetachstate'
      [...]
      
      Obviously we also need -lpthread for librt.a.
      
      Cc: stable@vger.kernel.org # 4.4
      Signed-off-by: NVegard Nossum <vegard.nossum@oracle.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      a7df4716