1. 25 1月, 2016 24 次提交
    • C
      crypto: atmel-sha - fix a race between the 'done' tasklet and the crypto client · f56809c3
      Cyrille Pitchen 提交于
      The 'done' tasklet handler used to check the 'BUSY' flag to either
      finalize the processing of a crypto request which had just completed or
      manage the crypto queue to start the next crypto request.
      
      On request R1 completion, the driver calls atmel_sha_finish_req(), which:
      1 - clears the 'BUSY' flag since the hardware is no longer used and is
          ready again to process new crypto requests.
      2 - notifies the above layer (the client) about the completion of the
          asynchronous crypto request R1 by calling its base.complete()
          callback.
      3 - schedules the 'done' task to check the crypto queue and start to
          process the next crypto request (the 'BUSY' flag is supposed to be
          cleared at that moment) if such a pending request exists.
      
      However step 2 might wake the client up so it can now ask our driver to
      process a new crypto request R2. This request is enqueued by calling the
      atmel_sha_handle_queue() function, which sets the 'BUSY' flags then
      starts to process R2.
      
      If the 'done' tasklet, scheduled by step 3, runs just after, it would see
      that the 'BUSY' flag is set then understand that R2 has just completed,
      which is wrong!
      
      So the state of 'BUSY' flag is not a proper way to detect and handle
      crypto request completion.
      
      This patch fixes this race condition by using two different tasklets, one
      to handle the crypto request completion events, the other to manage the
      crypto queue if needed.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      f56809c3
    • C
      crypto: atmel-sha - fix crash when computing digest on empty message · 1900c583
      Cyrille Pitchen 提交于
      This patch fixes a crash which occured during the computation of the
      digest of an empty message.
      
      Indeed, when processing an empty message, the atmel_sha_handle_queue()
      function was never called, hence the dd->req pointer remained
      uninitialized.
      
      Later, when the atmel_sha_final_req() function was called, it used
      to crash while using this uninitialized dd->req pointer.
      
      Hence this patch adds missing initializations of dd->req before calls of
      the atmel_sha_final_req() function.
      
      This bug prevented us from passing the tcrypt test suite on SHA algo.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      1900c583
    • T
      crypto: ccp - Add hash state import and export support · 952bce97
      Tom Lendacky 提交于
      Commit 8996eafd ("crypto: ahash - ensure statesize is non-zero")
      added a check to prevent ahash algorithms from successfully registering
      if the import and export functions were not implemented. This prevents
      an oops in the hash_accept function of algif_hash. This commit causes
      the ccp-crypto module SHA support and AES CMAC support from successfully
      registering and causing the ccp-crypto module load to fail because the
      ahash import and export functions are not implemented.
      
      Update the CCP Crypto API support to provide import and export support
      for ahash algorithms.
      
      Cc: <stable@vger.kernel.org> # 3.14.x-
      Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      952bce97
    • H
      crypto: caam - enable LARGE_BURST for enhancing DMA transactions size · 624144a7
      Horia Geant? 提交于
      Increasing CAAM DMA engine transaction size either
      -reduces the number of required transactions or
      -adds the ability to transfer more data with same transaction count
      Signed-off-by: NHoria Geant? <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      624144a7
    • A
      crypto: qat - Pack cfg ctl structs · ba171135
      Atta, Ahsan 提交于
      -This is required to support 32bit adf_ctl
      	 utility on a 64bit driver
      Signed-off-by: NAhsan Atta <ahsan.atta@intel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      ba171135
    • K
      crypto: s5p-sss - Use memcpy_toio for iomem annotated memory · 1e3012d0
      Krzysztof Koz?owski 提交于
      Use memcpy_toio to fix following sparse warning:
      
      drivers/crypto/s5p-sss.c:386:40: warning: incorrect type in argument 1 (different address spaces)
      drivers/crypto/s5p-sss.c:386:40:    expected void *<noident>
      drivers/crypto/s5p-sss.c:386:40:    got void [noderef] <asn:2>*
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com>
      Acked-by: NVladimir Zapolskiy <vz@mleia.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      1e3012d0
    • K
      crypto: s5p-sss - Fix minor coding style violations · 313becd1
      Krzysztof Koz?owski 提交于
      Improve a little bit code readability and use dev_info/err for printing
      messages.
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com>
      Acked-by: NVladimir Zapolskiy <vz@mleia.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      313becd1
    • P
      crypto: qat - remove redundant function call · 718837c8
      Pingchao Yang 提交于
      adf_dev_restore(accel_dev) was called in adf_dev_shutdown,no
      need to call it in adf_device_reset_worker after adf_dev_shutdown
      was called.
      Signed-off-by: NYang Pingchao <pingchao.yang@intel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      718837c8
    • T
      crypto: qat - change name for c6xx dev type · a2f5106f
      Tadeusz Struk 提交于
      change name for c6x dev type to more generic.
      Signed-off-by: NTadeusz Struk <tadeusz.struk@intel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      a2f5106f
    • S
      crypto: ansi_cprng - ANSI X9.31 DRNG is not allowed in FIPS 140-2 · eac6d408
      Stephan Mueller 提交于
      As per update of the FIPS 140-2 Annex C supported by SP800-131A, the
      ANSI X9.31 DRNG is not an allowed cipher in FIPS mode any more.
      
      CC: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NStephan Mueller <smueller@chronox.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      eac6d408
    • E
      crypto: chacha20-ssse3 - Align stack pointer to 64 bytes · cbe09bd5
      Eli Cooper 提交于
      This aligns the stack pointer in chacha20_4block_xor_ssse3 to 64 bytes.
      Fixes general protection faults and potential kernel panics.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NEli Cooper <elicooper@gmx.com>
      Acked-by: NMartin Willi <martin@strongswan.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      cbe09bd5
    • P
      PKCS#7: Don't require SpcSpOpusInfo in Authenticode pkcs7 signatures · 7ee7014d
      Peter Jones 提交于
      Dave Young reported:
      > Hi,
      >
      > I saw the warning "Missing required AuthAttr" when testing kexec,
      > known issue?  Idea about how to fix it?
      >
      > The kernel is latest linus tree plus sevral patches from Toshi to
      > cleanup io resource structure.
      >
      > in function pkcs7_sig_note_set_of_authattrs():
      >         if (!test_bit(sinfo_has_content_type, &sinfo->aa_set) ||
      >             !test_bit(sinfo_has_message_digest, &sinfo->aa_set) ||
      >             (ctx->msg->data_type == OID_msIndirectData &&
      >              !test_bit(sinfo_has_ms_opus_info, &sinfo->aa_set))) {
      >                 pr_warn("Missing required AuthAttr\n");
      >                 return -EBADMSG;
      >         }
      >
      > The third condition below is true:
      > (ctx->msg->data_type == OID_msIndirectData &&
      >              !test_bit(sinfo_has_ms_opus_info, &sinfo->aa_set))
      >
      > I signed the kernel with redhat test key like below:
      > pesign -c 'Red Hat Test Certificate' -i arch/x86/boot/bzImage -o /boot/vmlinuz-4.4.0-rc8+ -s --force
      
      And right he is!  The Authenticode specification is a paragon amongst
      technical documents, and has this pearl of wisdom to offer:
      
      ---------------------------------
      Authenticode-Specific SignerInfo UnauthenticatedAttributes Structures
      
        The following Authenticode-specific data structures are present in
        SignerInfo authenticated attributes.
      
        SpcSpOpusInfo
        SpcSpOpusInfo is identified by SPC_SP_OPUS_INFO_OBJID
        (1.3.6.1.4.1.311.2.1.12) and is defined as follows:
        SpcSpOpusInfo ::= SEQUENCE {
          programName  [0] EXPLICIT SpcString OPTIONAL,
          moreInfo     [1] EXPLICIT SpcLink OPTIONAL,
        } --#public--
      
        SpcSpOpusInfo has two fields:
          programName
            This field contains the program description:
            If publisher chooses not to specify a description, the SpcString
            structure contains a zero-length program name.
            If the publisher chooses to specify a
            description, the SpcString structure contains a Unicode string.
          moreInfo
            This field is set to an SPCLink structure that contains a URL for
            a Web site with more information about the signer. The URL is an
            ASCII string.
      ---------------------------------
      
      Which is to say that this is an optional *unauthenticated* field which
      may be present in the Authenticated Attribute list.  This is not how
      pkcs7 is supposed to work, so when David implemented this, he didn't
      appreciate the subtlety the original spec author was working with, and
      missed the part of the sublime prose that says this Authenticated
      Attribute is an Unauthenticated Attribute.  As a result, the code in
      question simply takes as given that the Authenticated Attributes should
      be authenticated.
      
      But this one should not, individually.  Because it says it's not
      authenticated.
      
      It still has to hash right so the TBS digest is correct.  So it is both
      authenticated and unauthenticated, all at once.  Truly, a wonder of
      technical accomplishment.
      
      Additionally, pesign's implementation has always attempted to be
      compatible with the signatures emitted from contemporary versions of
      Microsoft's signtool.exe.  During the initial implementation, Microsoft
      signatures always produced the same values for SpcSpOpusInfo -
      {U"Microsoft Windows", "http://www.microsoft.com"} - without regard to
      who the signer was.
      
      Sometime between Windows 8 and Windows 8.1 they stopped including the
      field in their signatures altogether, and as such pesign stopped
      producing them in commits c0c4da6 and d79cb0c, sometime around June of
      2012.  The theory here is that anything that breaks with
      pesign signatures would also be breaking with signtool.exe sigs as well,
      and that'll be a more noticed problem for firmwares parsing it, so it'll
      get fixed.  The fact that we've done exactly this bug in Linux code is
      first class, grade A irony.
      
      So anyway, we should not be checking this field for presence or any
      particular value: if the field exists, it should be at the right place,
      but aside from that, as long as the hash matches the field is good.
      Signed-off-by: NPeter Jones <pjones@redhat.com>
      Tested-by: NDave Young <dyoung@redhat.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      7ee7014d
    • H
      crypto: caam - make write transactions bufferable on PPC platforms · e7a7104e
      Horia Geant? 提交于
      Previous change (see "Fixes" tag) to the MCFGR register
      clears AWCACHE[0] ("bufferable" AXI3 attribute) (which is "1" at POR).
      
      This makes all writes non-bufferable, causing a ~ 5% performance drop
      for PPC-based platforms.
      
      Rework previous change such that MCFGR[AWCACHE]=4'b0011
      (bufferable + cacheable) for all platforms.
      Note: For ARM-based platforms, AWCACHE[0] is ignored
      by the interconnect IP.
      
      Cc: <stable@vger.kernel.org> # 4.3+
      Fixes: f1096749 ("crypto: caam - fix snooping for write transactions")
      Signed-off-by: NHoria Geant? <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      e7a7104e
    • L
      Linux 4.5-rc1 · 92e963f5
      Linus Torvalds 提交于
      92e963f5
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · e2464688
      Linus Torvalds 提交于
      Pull MIPS updates from Ralf Baechle:
       "This is the main pull request for MIPS for 4.5 plus some 4.4 fixes.
      
        The executive summary:
      
         - ATH79 platform improvments, use DT bindings for the ATH79 USB PHY.
         - Avoid useless rebuilds for zboot.
         - jz4780: Add NEMC, BCH and NAND device tree nodes
         - Initial support for the MicroChip's DT platform.  As all the device
           drivers are missing this is still of limited use.
         - Some Loongson3 cleanups.
         - The unavoidable whitespace polishing.
         - Reduce clock skew when synchronizing the CPU cycle counters on CPU
           startup.
         - Add MIPS R6 fixes.
         - Lots of cleanups across arch/mips as fallout from KVM.
         - Lots of minor fixes and changes for IEEE 754-2008 support to the
           FPU emulator / fp-assist software.
         - Minor Ralink, BCM47xx and bcm963xx platform support improvments.
         - Support SMP on BCM63168"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (84 commits)
        MIPS: zboot: Add support for serial debug using the PROM
        MIPS: zboot: Avoid useless rebuilds
        MIPS: BMIPS: Enable ARCH_WANT_OPTIONAL_GPIOLIB
        MIPS: bcm63xx: nvram: Remove unused bcm63xx_nvram_get_psi_size() function
        MIPS: bcm963xx: Update bcm_tag field image_sequence
        MIPS: bcm963xx: Move extended flash address to bcm_tag header file
        MIPS: bcm963xx: Move Broadcom BCM963xx image tag data structure
        MIPS: bcm63xx: nvram: Use nvram structure definition from header file
        MIPS: bcm963xx: Add Broadcom BCM963xx board nvram data structure
        MAINTAINERS: Add KVM for MIPS entry
        MIPS: KVM: Add missing newline to kvm_err()
        MIPS: Move KVM specific opcodes into asm/inst.h
        MIPS: KVM: Use cacheops.h definitions
        MIPS: Break down cacheops.h definitions
        MIPS: Use EXCCODE_ constants with set_except_vector()
        MIPS: Update trap codes
        MIPS: Move Cause.ExcCode trap codes to mipsregs.h
        MIPS: KVM: Make kvm_mips_{init,exit}() static
        MIPS: KVM: Refactor added offsetof()s
        MIPS: KVM: Convert EXPORT_SYMBOL to _GPL
        ...
      e2464688
    • L
      Merge tag 'platform-drivers-x86-v4.5-2' of... · e1c10879
      Linus Torvalds 提交于
      Merge tag 'platform-drivers-x86-v4.5-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
      
      Pull x86 platform driver updates from Darren Hart:
       "Emergency travel prevented me from completing my final testing on this
        until today.  Nothing here that couldn't wait until RC1 fixes, but I
        thought it best to get it out sooner rather than later as it does
        contain a build warning fix.
      
        Summary:
      
        A build warning fix, MAINTAINERS cleanup, and a new DMI quirk:
      
        ideapad-laptop:
         - Add Lenovo Yoga 700 to no_hw_rfkill dmi list
      
        MAINTAINERS:
         - Combine multiple telemetry entries
      
        intel_telemetry_debugfs:
         - Fix unused warnings in telemetry debugfs"
      
      * tag 'platform-drivers-x86-v4.5-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
        ideapad-laptop: Add Lenovo Yoga 700 to no_hw_rfkill dmi list
        MAINTAINERS: Combine multiple telemetry entries
        intel_telemetry_debugfs: Fix unused warnings in telemetry debugfs
      e1c10879
    • L
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · 81f05fee
      Linus Torvalds 提交于
      Pull thermal management updates from Zhang Rui:
       "The top merge commit was re-generated yesterday because two topic
        branches were dropped from this pull request in the last minute due to
        some unaddressed comments.  All the other material has been in
        linux-next for quite a while.
      
        Specifics:
      
         - Enhance thermal core to handle unexpected device cooling states
           after fresh boot and system resume.  From Zhang Rui and Chen Yu.
      
         - Several fixes and cleanups on Rockchip and RCAR thermal drivers.
           From Caesar Wang and Kuninori Morimoto.
      
         - Add Broxton support for Intel processor thermal reporting device
           driver.  From Amy Wiles"
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        thermal: trip_point_temp_store() calls thermal_zone_device_update()
        thermal: rcar: rcar_thermal_get_temp() return error if strange temp
        thermal: rcar: check irq possibility in rcar_thermal_irq_xxx()
        thermal: rcar: check every rcar_thermal_update_temp() return value
        thermal: rcar: move rcar_thermal_dt_ids to upside
        thermal: rockchip: Support the RK3399 SoCs in thermal driver
        thermal: rockchip: Support the RK3228 SoCs in thermal driver
        dt-bindings: rockchip-thermal: Support the RK3228/RK3399 SoCs compatible
        thermal: rockchip: fix a trivial typo
        Thermal: Enable Broxton SoC thermal reporting device
        thermal: constify pch_dev_ops structure
        Thermal: do thermal zone update after a cooling device registered
        Thermal: handle thermal zone device properly during system sleep
        Thermal: initialize thermal zone device correctly
      81f05fee
    • L
      Merge tag 'for-linus-4.5-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs · c52cb431
      Linus Torvalds 提交于
      Pull 9p updates from Eric Van Hensbergen:
       "Sorry for the last minute pull request, there's was a change that
        didn't get pulled into for-next until two weeks ago and I wanted to
        give it some bake time.
      
        Summary:
      
        Rework and error handling fixes, primarily in the fscatch and fd
        transports"
      
      * tag 'for-linus-4.5-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
        fs/9p: use fscache mutex rather than spinlock
        9p: trans_fd, bail out if recv fcall if missing
        9p: trans_fd, read rework to use p9_parse_header
        net/9p: Add device name details on error
      c52cb431
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · 00e3f5cc
      Linus Torvalds 提交于
      Pull Ceph updates from Sage Weil:
       "The two main changes are aio support in CephFS, and a series that
        fixes several issues in the authentication key timeout/renewal code.
      
        On top of that are a variety of cleanups and minor bug fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
        libceph: remove outdated comment
        libceph: kill off ceph_x_ticket_handler::validity
        libceph: invalidate AUTH in addition to a service ticket
        libceph: fix authorizer invalidation, take 2
        libceph: clear messenger auth_retry flag if we fault
        libceph: fix ceph_msg_revoke()
        libceph: use list_for_each_entry_safe
        ceph: use i_size_{read,write} to get/set i_size
        ceph: re-send AIO write request when getting -EOLDSNAP error
        ceph: Asynchronous IO support
        ceph: Avoid to propagate the invalid page point
        ceph: fix double page_unlock() in page_mkwrite()
        rbd: delete an unnecessary check before rbd_dev_destroy()
        libceph: use list_next_entry instead of list_entry_next
        ceph: ceph_frag_contains_value can be boolean
        ceph: remove unused functions in ceph_frag.h
      00e3f5cc
    • L
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · 772950ed
      Linus Torvalds 提交于
      Pull SMB3 fixes from Steve French:
       "A collection of CIFS/SMB3 fixes.
      
        It includes a couple bug fixes, a few for improved debugging of
        cifs.ko and some improvements to the way cifs does key generation.
      
        I do have some additional bug fixes I expect in the next week or two
        (to address a problem found by xfstest, and some fixes for SMB3.11
        dialect, and a couple patches that just came in yesterday that I am
        reviewing)"
      
      * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
        cifs_dbg() outputs an uninitialized buffer in cifs_readdir()
        cifs: fix race between call_async() and reconnect()
        Prepare for encryption support (first part). Add decryption and encryption key generation. Thanks to Metze for helping with this.
        cifs: Allow using O_DIRECT with cache=loose
        cifs: Make echo interval tunable
        cifs: Check uniqueid for SMB2+ and return -ESTALE if necessary
        Print IP address of unresponsive server
        cifs: Ratelimit kernel log messages
      772950ed
    • J
      ideapad-laptop: Add Lenovo Yoga 700 to no_hw_rfkill dmi list · 6b31de3e
      Josh Boyer 提交于
      Like the Yoga 900 models the Lenovo Yoga 700 does not have a
      hw rfkill switch, and trying to read the hw rfkill switch through the
      ideapad module causes it to always reported blocking breaking wifi.
      
      This commit adds the Lenovo Yoga 700 to the no_hw_rfkill dmi list, fixing
      the wifi breakage.
      
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1295272
      Tested-by: <dinyar.rabady+spam@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJosh Boyer <jwboyer@fedoraproject.org>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      6b31de3e
    • S
      MAINTAINERS: Combine multiple telemetry entries · f1fc3cd8
      Souvik Kumar Chakravarty 提交于
      This patch combines all the telemetry file entries in MAINTAINERS via
      wildcard.
      Signed-off-by: NSouvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      f1fc3cd8
    • S
      intel_telemetry_debugfs: Fix unused warnings in telemetry debugfs · 7885f2f9
      Souvik Kumar Chakravarty 提交于
      This patch fixes compile time warnings when CONFIG_PM_SLEEP
      is undefined. In this case sleep related counters are unused.
      Signed-off-by: NSouvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      7885f2f9
    • C
      vmstat: Remove BUG_ON from vmstat_update · 587198ba
      Christoph Lameter 提交于
      If we detect that there is nothing to do just set the flag and do not
      check if it was already set before.  Races really do not matter.  If the
      flag is set by any code then the shepherd will start dealing with the
      situation and reenable the vmstat workers when necessary again.
      
      Since commit 0eb77e98 ("vmstat: make vmstat_updater deferrable again
      and shut down on idle") quiet_vmstat might update cpu_stat_off and mark
      a particular cpu to be handled by vmstat_shepherd.  This might trigger a
      VM_BUG_ON in vmstat_update because the work item might have been
      sleeping during the idle period and see the cpu_stat_off updated after
      the wake up.  The VM_BUG_ON is therefore misleading and no more
      appropriate.  Moreover it doesn't really suite any protection from real
      bugs because vmstat_shepherd will simply reschedule the vmstat_work
      anytime it sees a particular cpu set or vmstat_update would do the same
      from the worker context directly.  Even when the two would race the
      result wouldn't be incorrect as the counters update is fully idempotent.
      Reported-by: NSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      587198ba
  2. 24 1月, 2016 16 次提交