1. 19 12月, 2012 1 次提交
  2. 18 12月, 2012 12 次提交
  3. 01 12月, 2012 2 次提交
    • G
      modpost.c: Stop checking __dev* section mismatches · 92e9e6d1
      Greg Kroah-Hartman 提交于
      Now that the __dev* sections are not being generated, we don't need to
      check for them in modpost.c.
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      92e9e6d1
    • S
      kbuild: centralize .dts->.dtb rule · 90b335fb
      Stephen Warren 提交于
      All architectures that use cmd_dtc do so in almost the same way. Create
      a central build rule to avoid duplication. The one difference is that
      most current uses of dtc build $(obj)/%.dtb from $(src)/dts/%.dts rather
      than building the .dtb in the same directory as the .dts file. This
      difference will be eliminated arch-by-arch in future patches.
      
      MIPS is the exception here; it already uses the exact same rule as the
      new common rule, so the duplicate is removed in this patch to avoid any
      conflict. arch/mips changes courtesy of Ralf Baechle.
      
      Update Documentation/kbuild to remove the explicit call to cmd_dtc from
      the example, now that the rule exists in a centralized location.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Russell King <linux@arm.linux.org.uk>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: linux@lists.openrisc.net
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: linux-c6x-dev@linux-c6x.org
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: microblaze-uclinux@itee.uq.edu.au
      Cc: Chris Zankel <chris@zankel.net>
      Cc: linux-xtensa@linux-xtensa.org
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      90b335fb
  4. 28 11月, 2012 1 次提交
  5. 27 11月, 2012 1 次提交
    • D
      UAPI: strip the _UAPI prefix from header guards during header installation · 56c176c9
      David Howells 提交于
      Strip the _UAPI prefix from header guards during header installation so
      that any userspace dependencies aren't affected.  glibc, for example,
      checks for linux/types.h, linux/kernel.h, linux/compiler.h and
      linux/list.h by their guards - though the last two aren't actually
      exported.
      
        libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -Wall -Werror -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fno-delete-null-pointer-checks -fstack-protector -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c child.c  -fPIC -DPIC -o .libs/child.o
        In file included from cli.c:20:0:
        common.h:152:8: error: redefinition of 'struct sysinfo'
        In file included from /usr/include/linux/kernel.h:4:0,
        		 from /usr/include/linux/sysctl.h:25,
        		 from /usr/include/sys/sysctl.h:43,
        		 from common.h:50,
        		 from cli.c:20:
        /usr/include/linux/sysinfo.h:7:8: note: originally defined here
      Reported-by: NTomasz Torcz <tomek@pipebreaker.pl>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NJosh Boyer <jwboyer@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      56c176c9
  6. 22 11月, 2012 1 次提交
  7. 21 11月, 2012 1 次提交
  8. 09 11月, 2012 1 次提交
  9. 06 11月, 2012 1 次提交
  10. 04 11月, 2012 1 次提交
  11. 25 10月, 2012 1 次提交
  12. 20 10月, 2012 3 次提交
    • D
      MODSIGN: Move the magic string to the end of a module and eliminate the search · caabe240
      David Howells 提交于
      Emit the magic string that indicates a module has a signature after the
      signature data instead of before it.  This allows module_sig_check() to
      be made simpler and faster by the elimination of the search for the
      magic string.  Instead we just need to do a single memcmp().
      
      This works because at the end of the signature data there is the
      fixed-length signature information block.  This block then falls
      immediately prior to the magic number.
      
      From the contents of the information block, it is trivial to calculate
      the size of the signature data and thus the size of the actual module
      data.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      caabe240
    • D
      MODSIGN: perlify sign-file and merge in x509keyid · b37d1bfb
      David Howells 提交于
      Turn sign-file into perl and merge in x509keyid.  The latter doesn't
      need to be a separate script as it doesn't actually need to work out the
      SHA1 sum of the X.509 certificate itself, since it can get that from the
      X.509 certificate.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b37d1bfb
    • L
      kbuild: Fix module signature generation · b05e585d
      Linus Torvalds 提交于
      Rusty had clearly not actually tested his module signing changes that I
      (trustingly) applied as commit e2a666d5 ("kbuild: sign the modules
      at install time"). That commit had multiple bugs:
      
       - using "${#VARIABLE}" to get the number of characters in a shell
         variable may look clever, but it's locale-dependent: it returns the
         number of *characters*, not bytes. And we do need bytes.
      
         So don't use "${#..}" expansion, do the stupid "wc -c" thing instead
         (where "c" stands for "bytes", not "characters", despite the letter.
      
       - Rusty had confused "siglen" and "signerlen", and his conversion
         didn't set "signerlen" at all, and incorrectly set "siglen" to the
         size of the signer, not the size of the signature.
      
      End result: the modified sign-file script did create something that
      superficially *looked* like a signature, but didn't actually work at
      all, and would fail the signature check. Oops.
      
      Tssk, tssk, Rusty.
      
      But Rusty was definitely right that this whole thing should be rewritten
      in perl by somebody who has the perl-fu to do so.  That is not me,
      though - I'm just doing an emergency fix for the shell script.
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b05e585d
  13. 19 10月, 2012 1 次提交
  14. 18 10月, 2012 1 次提交
  15. 17 10月, 2012 1 次提交
  16. 16 10月, 2012 1 次提交
  17. 12 10月, 2012 1 次提交
  18. 11 10月, 2012 2 次提交
  19. 10 10月, 2012 2 次提交
    • D
      MODSIGN: Sign modules during the build process · 80d65e58
      David Howells 提交于
      If CONFIG_MODULE_SIG is set, then this patch will cause all modules files to
      to have signatures added.  The following steps will occur:
      
       (1) The module will be linked to foo.ko.unsigned instead of foo.ko
      
       (2) The module will be stripped using both "strip -x -g" and "eu-strip" to
           ensure minimal size for inclusion in an initramfs.
      
       (3) The signature will be generated on the stripped module.
      
       (4) The signature will be appended to the module, along with some information
           about the signature and a magic string that indicates the presence of the
           signature.
      
      Step (3) requires private and public keys to be available.  By default these
      are expected to be found in files:
      
      	signing_key.priv
      	signing_key.x509
      
      in the base directory of the build.  The first is the private key in PEM form
      and the second is the X.509 certificate in DER form as can be generated from
      openssl:
      
      	openssl req \
      		-new -x509 -outform PEM -out signing_key.x509 \
      		-keyout signing_key.priv -nodes \
      		-subj "/CN=H2G2/O=Magrathea/CN=Slartibartfast"
      
      If the secret key is not found then signing will be skipped and the unsigned
      module from (1) will just be copied to foo.ko.
      
      If signing occurs, lines like the following will be seen:
      
      	LD [M]  fs/foo/foo.ko.unsigned
      	STRIP [M] fs/foo/foo.ko.stripped
      	SIGN [M] fs/foo/foo.ko
      
      will appear in the build log.  If the signature step will be skipped and the
      following will be seen:
      
      	LD [M]  fs/foo/foo.ko.unsigned
      	STRIP [M] fs/foo/foo.ko.stripped
      	NO SIGN [M] fs/foo/foo.ko
      
      NOTE!  After the signature step, the signed module _must_not_ be passed through
      strip.  The unstripped, unsigned module is still available at the name on the
      LD [M] line.  This restriction may affect packaging tools (such as rpmbuild)
      and initramfs composition tools.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      80d65e58
    • D
      MODSIGN: Provide a script for generating a key ID from an X.509 cert · 85ecac79
      David Howells 提交于
      Provide a script to parse an X.509 certificate and certain pieces of
      information from it in order to generate a key identifier to be included within
      a module signature.
      
      The script takes the Subject Name and extracts (if present) the
      organizationName (O), the commonName (CN) and the emailAddress and fabricates
      the signer's name from them:
      
       (1) If both O and CN exist, then the name will be "O: CN", unless:
      
           (a) CN is prefixed by O, in which case only CN is used.
      
           (b) CN and O share at least the first 7 characters, in which case only CN
           	 is used.
      
       (2) Otherwise, CN is used if present.
      
       (3) Otherwise, O is used if present.
      
       (4) Otherwise the emailAddress is used, if present.
      
       (5) Otherwise a blank name is used.
      
      The script emits a binary encoded identifier in the following form:
      
       - 2 BE bytes indicating the length of the signer's name.
      
       - 2 BE bytes indicating the length of the subject key identifier.
      
       - The characters of the signer's name.
      
       - The bytes of the subject key identifier.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      85ecac79
  20. 08 10月, 2012 1 次提交
    • D
      X.509: Add simple ASN.1 grammar compiler · 4520c6a4
      David Howells 提交于
      Add a simple ASN.1 grammar compiler.  This produces a bytecode output that can
      be fed to a decoder to inform the decoder how to interpret the ASN.1 stream it
      is trying to parse.
      
      Action functions can be specified in the grammar by interpolating:
      
      	({ foo })
      
      after a type, for example:
      
      	SubjectPublicKeyInfo ::= SEQUENCE {
      		algorithm		AlgorithmIdentifier,
      		subjectPublicKey	BIT STRING ({ do_key_data })
      		}
      
      The decoder is expected to call these after matching this type and parsing the
      contents if it is a constructed type.
      
      The grammar compiler does not currently support the SET type (though it does
      support SET OF) as I can't see a good way of tracking which members have been
      encountered yet without using up extra stack space.
      
      Currently, the grammar compiler will fail if more than 256 bytes of bytecode
      would be produced or more than 256 actions have been specified as it uses
      8-bit jump values and action indices to keep space usage down.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      4520c6a4
  21. 06 10月, 2012 4 次提交