1. 07 11月, 2015 4 次提交
  2. 21 10月, 2015 2 次提交
    • D
      KEYS: Provide a script to extract a module signature · 4adc605e
      David Howells 提交于
      The supplied script takes a signed module file and extracts the tailmost
      signature (there could theoretically be more than one) and dumps all or
      part of it or the unsigned file to stdout.
      
      Call as:
      
      	scripts/extract-module-sig.pl -[0adnks] module-file >out
      
      where the initial flag indicates which bit of the signed file you want dumping
      to stdout:
      
       (*) "-0".  Dumps the unsigned data with the signature stripped.
      
       (*) "-a".  Dumps all of the signature data, including the magic number.
      
       (*) "-d".  Dumps the signature information block as a sequence of decimal
           	    numbers in text form with spaces between (crypto algorithm type,
           	    hash type, identifier type, signer's name length, key identifier
           	    length and signature length).
      
       (*) "-n".  Dumps the signer's name contents.
      
       (*) "-k".  Dumps the key identifier contents.
      
       (*) "-s".  Dumps the cryptographic signature contents.
      
      In the case that the signature is a PKCS#7 (or CMS) message, -n and -k will
      print a warning to stderr and dump nothing to stdout, but will otherwise
      complete okay; the entire PKCS#7/CMS message will be dumped by "-s"; and "-d"
      will show "0 0 2 0 0 <pkcs#7-msg-len>".
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      4adc605e
    • D
      KEYS: Provide a script to extract the sys cert list from a vmlinux file · 2221a6ee
      David Howells 提交于
      The supplied script takes a vmlinux file - and if necessary a System.map
      file - locates the system certificates list and extracts it to the named
      file.
      
      Call as:
      
          ./scripts/extract-sys-certs vmlinux certs
      
      if vmlinux contains symbols and:
      
          ./scripts/extract-sys-certs -s System.map vmlinux certs
      
      if it does not.
      
      It prints something like the following to stdout:
      
      	Have 27 sections
      	No symbols in vmlinux, trying System.map
      	Have 80088 symbols
      	Have 1346 bytes of certs at VMA 0xffffffff8201c540
      	Certificate list in section .init.data
      	Certificate list at file offset 0x141c540
      
      If vmlinux contains symbols then that is used rather than System.map - even
      if one is given.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      2221a6ee
  3. 18 10月, 2015 22 次提交
  4. 17 10月, 2015 1 次提交
  5. 15 10月, 2015 1 次提交
    • M
      scripts/kconfig/Makefile: Fix KBUILD_DEFCONFIG check when building with O= · bd960f09
      Michael Ellerman 提交于
      My recent commit d2036f30 ("scripts/kconfig/Makefile: Allow
      KBUILD_DEFCONFIG to be a target"), contained a bug in that when it
      checks if KBUILD_DEFCONFIG is a file it forgets to prepend $(srctree) to
      the path.
      
      This causes the build to fail when building out of tree (with O=), and
      when the value of KBUILD_DEFCONFIG is 'defconfig'. In that case we will
      fail to find the 'defconfig' file, because we look in the build
      directory not $(srctree), and so we will call Make again with
      'defconfig' as the target. From there we loop infinitely calling 'make
      defconfig' again and again.
      
      The fix is simple, we need to look for the file under $(srctree).
      
      Fixes: d2036f30 ("scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target")
      Reported-by: NOlof Johansson <olof@lixom.net>
      Acked-by: NMichal Marek <mmarek@suse.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      bd960f09
  6. 13 10月, 2015 1 次提交
    • A
      arm64: add KASAN support · 39d114dd
      Andrey Ryabinin 提交于
      This patch adds arch specific code for kernel address sanitizer
      (see Documentation/kasan.txt).
      
      1/8 of kernel addresses reserved for shadow memory. There was no
      big enough hole for this, so virtual addresses for shadow were
      stolen from vmalloc area.
      
      At early boot stage the whole shadow region populated with just
      one physical page (kasan_zero_page). Later, this page reused
      as readonly zero shadow for some memory that KASan currently
      don't track (vmalloc).
      After mapping the physical memory, pages for shadow memory are
      allocated and mapped.
      
      Functions like memset/memmove/memcpy do a lot of memory accesses.
      If bad pointer passed to one of these function it is important
      to catch this. Compiler's instrumentation cannot do this since
      these functions are written in assembly.
      KASan replaces memory functions with manually instrumented variants.
      Original functions declared as weak symbols so strong definitions
      in mm/kasan/kasan.c could replace them. Original functions have aliases
      with '__' prefix in name, so we could call non-instrumented variant
      if needed.
      Some files built without kasan instrumentation (e.g. mm/slub.c).
      Original mem* function replaced (via #define) with prefixed variants
      to disable memory access checks for such files.
      Signed-off-by: NAndrey Ryabinin <ryabinin.a.a@gmail.com>
      Tested-by: NLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      39d114dd
  7. 12 10月, 2015 1 次提交
  8. 10 10月, 2015 2 次提交
  9. 01 10月, 2015 1 次提交
    • M
      scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target · d2036f30
      Michael Ellerman 提交于
      Arch Makefiles can set KBUILD_DEFCONFIG to tell kbuild the name of the
      defconfig that should be built by default.
      
      However currently there is an assumption that KBUILD_DEFCONFIG points to
      a file at arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG).
      
      We would like to use a target, using merge_config, as our defconfig, so
      adapt the logic in scripts/kconfig/Makefile to allow that.
      
      To minimise the chance of breaking anything, we first check if
      KBUILD_DEFCONFIG is a file, and if so we do the old logic. If it's not a
      file, then we call the top-level Makefile with KBUILD_DEFCONFIG as the
      target.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Acked-by: NMichal Marek <mmarek@suse.com>
      d2036f30
  10. 28 9月, 2015 1 次提交
    • B
      DocBook: Use a fixed encoding for output · b479bfd0
      Ben Hutchings 提交于
      Currently the encoding of documents generated by DocBook depends on
      the current locale.  Make the output reproducible independently of
      the locale, by setting the encoding to UTF-8 (LC_CTYPE=C.UTF-8) by
      preference, or ASCII (LC_CTYPE=C) as a fallback.
      
      LC_CTYPE can normally be overridden by LC_ALL, but the top-level
      Makefile unsets that.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      [jc: added check-lc_ctype to .gitignore]
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      b479bfd0
  11. 25 9月, 2015 2 次提交
  12. 21 9月, 2015 2 次提交