1. 16 Aug, 2016 1 commit
  2. 12 Jul, 2016 1 commit
  3. 27 Jun, 2016 1 commit
  4. 23 Jun, 2016 1 commit
  5. 02 Jun, 2016 1 commit
  6. 16 Apr, 2016 1 commit
    • Denys Vlasenko's avatar
      x86: Fix non-static inlines · a3819e3e
      Denys Vlasenko authored
      
      
      Four instances of incorrect usage of non-static "inline" crept up
      in arch/x86, all trivial; cleaning them up:
      
      EVT_TO_HPET_DEV() - made static, it is only used in kernel/hpet.c
      
      Debug version of check_iommu_entries() is an __init function.
      Non-debug dummy empty version of it is declared "inline" instead -
      which doesn't help to eliminate it (the caller is in a different unit,
      inlining doesn't happen).
      Switch to non-inlined __init function, which does eliminate it
      (by discarding it as part of __init section).
      
      crypto/sha-mb/sha1_mb.c: looks like they just forgot to add "static"
      to their two internal inlines, which emitted two unused functions into
      vmlinux.
      
            text     data      bss       dec     hex filename
        95903394 20860288 35991552 152755234 91adc22 vmlinux_before
        95903266 20860288 35991552 152755106 91adba2 vmlinux
      Signed-off-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Link: http://lkml.kernel.org/r/1460739626-12179-1-git-send-email-dvlasenk@redhat.com
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a3819e3e
  7. 15 Apr, 2016 1 commit
  8. 06 Feb, 2016 1 commit
    • Wang, Rui Y's avatar
      crypto: sha-mb - Fix load failure · fd09967b
      Wang, Rui Y authored
      
      
      On  Monday, February 1, 2016 4:18 PM, Herbert Xu wrote:
      >
      > On Wed, Jan 27, 2016 at 05:08:35PM +0800, Rui Wang wrote:
      >>
      >> +static int sha1_mb_async_import(struct ahash_request *req, const void
      >> +*in) {
      >> +	struct ahash_request *mcryptd_req = ahash_request_ctx(req);
      >> +	struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
      >> +	struct sha1_mb_ctx *ctx = crypto_ahash_ctx(tfm);
      >> +	struct mcryptd_ahash *mcryptd_tfm = ctx->mcryptd_tfm;
      >> +	struct crypto_shash *child = mcryptd_ahash_child(mcryptd_tfm);
      >> +	struct mcryptd_hash_request_ctx *rctx;
      >> +	struct shash_desc *desc;
      >> +	int err;
      >> +
      >> +	memcpy(mcryptd_req, req, sizeof(*req));
      >> +	ahash_request_set_tfm(mcryptd_req, &mcryptd_tfm->base);
      >> +	rctx = ahash_request_ctx(mcryptd_req);
      >> +	desc = &rctx->desc;
      >> +	desc->tfm = child;
      >> +	desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP;
      >> +
      >> +	err = crypto_shash_init(desc);
      >> +	if (err)
      >> +		return err;
      >
      > What is this desc for?
      
      Hi Herbert,
      
      Yeah I just realized that the call to crypto_shash_init() isn't necessary
      here. What it does is overwritten by crypto_ahash_import(). But this desc
      still needs to be initialized here because it's newly allocated by
      ahash_request_alloc(). We eventually calls the shash version of import()
      which needs desc as an argument. The real context to be imported is then
      derived from shash_desc_ctx(desc).
      
      desc is a sub-field of struct mcryptd_hash_request_ctx, which is again a
      sub-field of the bigger blob allocated by ahash_request_alloc(). The entire
      blob's size is set in sha1_mb_async_init_tfm(). So a better version is as
      follows:
      
      (just removed the call to crypto_shash_init())
      
      >From 4bcb73adbef99aada94c49f352063619aa24d43d Mon Sep 17 00:00:00 2001
      From: Rui Wang <rui.y.wang@intel.com>
      Date: Mon, 14 Dec 2015 17:22:13 +0800
      Subject: [PATCH v2 1/4] crypto x86/sha1_mb: Fix load failure
      
      modprobe sha1_mb fails with the following message:
      
      modprobe: ERROR: could not insert 'sha1_mb': No such device
      
      It is because it needs to set its statesize and implement its
      import() and export() interface.
      
      v2: remove redundant call to crypto_shash_init()
      Signed-off-by: default avatarRui Wang <rui.y.wang@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      fd09967b
  9. 19 May, 2015 5 commits
    • Ingo Molnar's avatar
      x86/fpu, crypto x86/sha1_mb: Remove FPU internal headers from sha1_mb.c · 57dd083e
      Ingo Molnar authored
      
      
      This file only uses the public FPU APIs, so remove the xcr.h, fpu/xstate.h
      and fpu/internal.h headers and add the fpu/api.h include.
      
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      57dd083e
    • Ingo Molnar's avatar
      x86/fpu: Rename fpu/xsave.h to fpu/xstate.h · 669ebabb
      Ingo Molnar authored
      
      
      'xsave' is an x86 instruction name to most people - but xsave.h is
      about a lot more than just the XSAVE instruction: it includes
      definitions and support, both internal and external, related to
      xstate and xfeatures support.
      
      As a first step in cleaning up the various xstate uses rename this
      header to 'fpu/xstate.h' to better reflect what this header file
      is about.
      
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      669ebabb
    • Ingo Molnar's avatar
      x86/fpu: Rename fpu-internal.h to fpu/internal.h · 78f7f1e5
      Ingo Molnar authored
      
      
      This unifies all the FPU related header files under a unified, hiearchical
      naming scheme:
      
       - asm/fpu/types.h:      FPU related data types, needed for 'struct task_struct',
                               widely included in almost all kernel code, and hence kept
                               as small as possible.
      
       - asm/fpu/api.h:        FPU related 'public' methods exported to other subsystems.
      
       - asm/fpu/internal.h:   FPU subsystem internal methods
      
       - asm/fpu/xsave.h:      XSAVE support internal methods
      
      (Also standardize the header guard in asm/fpu/internal.h.)
      Reviewed-by: default avatarBorislav Petkov <bp@alien8.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      78f7f1e5
    • Ingo Molnar's avatar
      x86/fpu: Move xsave.h to fpu/xsave.h · a137fb6b
      Ingo Molnar authored
      
      
      Move the xsave.h header file to the FPU directory as well.
      Reviewed-by: default avatarBorislav Petkov <bp@alien8.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a137fb6b
    • Ingo Molnar's avatar
      x86/fpu: Fix header file dependencies of fpu-internal.h · f89e32e0
      Ingo Molnar authored
      
      
      Fix a minor header file dependency bug in asm/fpu-internal.h: it
      relies on i387.h but does not include it. All users of fpu-internal.h
      included it explicitly.
      
      Also remove unnecessary includes, to reduce compilation time.
      
      This also makes it easier to use it as a standalone header file
      for FPU internals, such as an upcoming C module in arch/x86/kernel/fpu/.
      Reviewed-by: default avatarBorislav Petkov <bp@alien8.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f89e32e0
  10. 26 Apr, 2015 1 commit
  11. 31 Mar, 2015 1 commit
  12. 16 Mar, 2015 1 commit
  13. 13 Jan, 2015 1 commit
    • Mathias Krause's avatar
      crypto: add missing crypto module aliases · 3e14dcf7
      Mathias Krause authored
      Commit 5d26a105 ("crypto: prefix module autoloading with "crypto-"")
      changed the automatic module loading when requesting crypto algorithms
      to prefix all module requests with "crypto-". This requires all crypto
      modules to have a crypto specific module alias even if their file name
      would otherwise match the requested crypto algorithm.
      
      Even though commit 5d26a105 added those aliases for a vast amount of
      modules, it was missing a few. Add the required MODULE_ALIAS_CRYPTO
      annotations to those files to make them get loaded automatically, again.
      This fixes, e.g., requesting 'ecb(blowfish-generic)', which used to work
      with kernels v3.18 and below.
      
      Also change MODULE_ALIAS() lines to MODULE_ALIAS_CRYPTO(). The former
      won't work for crypto modules any more.
      
      Fixes: 5d26a105
      
       ("crypto: prefix module autoloading with "crypto-"")
      Cc: Kees Cook <keescook@chromium.org>
      Signed-off-by: default avatarMathias Krause <minipli@googlemail.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      3e14dcf7
  14. 25 Nov, 2014 1 commit
  15. 26 Aug, 2014 1 commit
  16. 25 Aug, 2014 1 commit