20 Jan, 2021

1 commit

  • This is the 5.10.7 stable release

    * tag 'v5.10.7': (144 commits)
    Linux 5.10.7
    scsi: target: Fix XCOPY NAA identifier lookup
    rtlwifi: rise completion at the last step of firmware callback
    ...

    Signed-off-by: Jason Liu

    Jason Liu
     

13 Jan, 2021

2 commits

  • commit f93274ef0fe972c120c96b3207f8fce376231a60 upstream.

    The function derive_pub_key() should be calling memzero_explicit()
    instead of memset() in case the complier decides to optimize away the
    call to memset() because it "knows" no one is going to touch the memory
    anymore.

    Cc: stable
    Reported-by: Ilil Blum Shem-Tov
    Tested-by: Ilil Blum Shem-Tov
    Link: https://lore.kernel.org/r/X8ns4AfwjKudpyfe@kroah.com
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • commit 0aa171e9b267ce7c52d3a3df7bc9c1fc0203dec5 upstream.

    Pavel reports that commit 17858b140bf4 ("crypto: ecdh - avoid unaligned
    accesses in ecdh_set_secret()") fixes one problem but introduces another:
    the unconditional memcpy() introduced by that commit may overflow the
    target buffer if the source data is invalid, which could be the result of
    intentional tampering.

    So check params.key_size explicitly against the size of the target buffer
    before validating the key further.

    Fixes: 17858b140bf4 ("crypto: ecdh - avoid unaligned accesses in ecdh_set_secret()")
    Reported-by: Pavel Machek
    Cc:
    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Herbert Xu
    Signed-off-by: Greg Kroah-Hartman

    Ard Biesheuvel
     

04 Jan, 2021

2 commits

  • This is the 5.10.4 stable release

    * tag 'v5.10.4': (717 commits)
    Linux 5.10.4
    x86/CPU/AMD: Save AMD NodeId as cpu_die_id
    drm/edid: fix objtool warning in drm_cvt_modes()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    drivers/gpu/drm/imx/dcss/dcss-plane.c
    drivers/media/i2c/ov5640.c

    Jason Liu
     
  • This is the 5.10.3 stable release

    * tag 'v5.10.3': (41 commits)
    Linux 5.10.3
    md: fix a warning caused by a race between concurrent md_ioctl()s
    nl80211: validate key indexes for cfg80211_registered_device
    ...

    Signed-off-by: Jason Liu

    Jason Liu
     

30 Dec, 2020

2 commits

  • commit 17858b140bf49961b71d4e73f1c3ea9bc8e7dda0 upstream.

    ecdh_set_secret() casts a void* pointer to a const u64* in order to
    feed it into ecc_is_key_valid(). This is not generally permitted by
    the C standard, and leads to actual misalignment faults on ARMv6
    cores. In some cases, these are fixed up in software, but this still
    leads to performance hits that are entirely avoidable.

    So let's copy the key into the ctx buffer first, which we will do
    anyway in the common case, and which guarantees correct alignment.

    Cc:
    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Herbert Xu
    Signed-off-by: Greg Kroah-Hartman

    Ard Biesheuvel
     
  • [ Upstream commit 6569e3097f1c4a490bdf2b23d326855e04942dfd ]

    The extra tests in the manager actually require the manager to be
    selected too. Otherwise the linker gives errors like:

    ld: arch/x86/crypto/chacha_glue.o: in function `chacha_simd_stream_xor':
    chacha_glue.c:(.text+0x422): undefined reference to `crypto_simd_disabled_for_test'

    Fixes: 2343d1529aff ("crypto: Kconfig - allow tests to be disabled when manager is disabled")
    Signed-off-by: Jason A. Donenfeld
    Signed-off-by: Herbert Xu
    Signed-off-by: Sasha Levin

    Jason A. Donenfeld
     

26 Dec, 2020

1 commit

  • commit 92eb6c3060ebe3adf381fd9899451c5b047bb14d upstream.

    Commit 3f69cc60768b ("crypto: af_alg - Allow arbitrarily long algorithm
    names") made the kernel start accepting arbitrarily long algorithm names
    in sockaddr_alg. However, the actual length of the salg_name field
    stayed at the original 64 bytes.

    This is broken because the kernel can access indices >= 64 in salg_name,
    which is undefined behavior -- even though the memory that is accessed
    is still located within the sockaddr structure. It would only be
    defined behavior if the array were properly marked as arbitrary-length
    (either by making it a flexible array, which is the recommended way
    these days, or by making it an array of length 0 or 1).

    We can't simply change salg_name into a flexible array, since that would
    break source compatibility with userspace programs that embed
    sockaddr_alg into another struct, or (more commonly) declare a
    sockaddr_alg like 'struct sockaddr_alg sa = { .salg_name = "foo" };'.

    One solution would be to change salg_name into a flexible array only
    when '#ifdef __KERNEL__'. However, that would keep userspace without an
    easy way to actually use the longer algorithm names.

    Instead, add a new structure 'sockaddr_alg_new' that has the flexible
    array field, and expose it to both userspace and the kernel.
    Make the kernel use it correctly in alg_bind().

    This addresses the syzbot report
    "UBSAN: array-index-out-of-bounds in alg_bind"
    (https://syzkaller.appspot.com/bug?extid=92ead4eb8e26a26d465e).

    Reported-by: syzbot+92ead4eb8e26a26d465e@syzkaller.appspotmail.com
    Fixes: 3f69cc60768b ("crypto: af_alg - Allow arbitrarily long algorithm names")
    Cc: # v4.12+
    Signed-off-by: Eric Biggers
    Signed-off-by: Herbert Xu
    Signed-off-by: Greg Kroah-Hartman

    Eric Biggers
     

14 Dec, 2020

3 commits

  • This is a temporary workround for the case when:
    -SWIOTLB is used for DMA bounce buffering AND
    -data to be DMA-ed is mapped DMA_FROM_DEVICE and device only partially
    overwrites the "original" data AND
    -it's expected that the "original" data that was not overwritten
    by the device to be untouched

    As discussed in upstream, the proper fix should be:
    -either an extension of the DMA API OR
    -a workaround in the device driver (considering these cases are rarely
    met in practice)

    Since both alternatives are not trivial (to say the least),
    add a workaround for the few cases matching the error conditions
    listed above.

    Link: https://lore.kernel.org/lkml/VI1PR0402MB348537CB86926B3E6D1DBE0A98070@VI1PR0402MB3485.eurprd04.prod.outlook.com/
    Link: https://lore.kernel.org/lkml/20190522072018.10660-1-horia.geanta@nxp.com/
    Signed-off-by: Horia Geantă
    Reviewed-by: Valentin Ciocoi Radulescu

    Horia Geantă
     
  • Signed-off-by: Radu Alexe
    Signed-off-by: Tudor Ambarus

    Radu Alexe
     
  • This patch adds kernel support for encryption/decryption of TLS 1.0
    records using block ciphers. Implementation is similar to authenc in the
    sense that the base algorithms (AES, SHA1) are combined in a template to
    produce TLS encapsulation frames. The composite algorithm will be called
    "tls10(hmac(),cbc())". The cipher and hmac keys are
    wrapped in the same format used by authenc.c.

    Signed-off-by: Radu Alexe
    Signed-off-by: Cristian Stoica
    Signed-off-by: Horia Geantă

    Merged LF commit (rebase-20200703/crypto/core):
    856fb52acc28 ("crypto: tls - fix logical-not-parentheses compile warning")

    Merged LF commit (next-nxp-20200811):
    0f90a0618247 ("crypto: tls: fix build issue")

    Signed-off-by: Horia Geantă

    Radu Alexe
     

14 Oct, 2020

1 commit

  • Pull block driver updates from Jens Axboe:
    "Here are the driver updates for 5.10.

    A few SCSI updates in here too, in coordination with Martin as they
    depend on core block changes for the shared tag bitmap.

    This contains:

    - NVMe pull requests via Christoph:
    - fix keep alive timer modification (Amit Engel)
    - order the PCI ID list more sensibly (Andy Shevchenko)
    - cleanup the open by controller helper (Chaitanya Kulkarni)
    - use an xarray for the CSE log lookup (Chaitanya Kulkarni)
    - support ZNS in nvmet passthrough mode (Chaitanya Kulkarni)
    - fix nvme_ns_report_zones (Christoph Hellwig)
    - add a sanity check to nvmet-fc (James Smart)
    - fix interrupt allocation when too many polled queues are
    specified (Jeffle Xu)
    - small nvmet-tcp optimization (Mark Wunderlich)
    - fix a controller refcount leak on init failure (Chaitanya
    Kulkarni)
    - misc cleanups (Chaitanya Kulkarni)
    - major refactoring of the scanning code (Christoph Hellwig)

    - MD updates via Song:
    - Bug fixes in bitmap code, from Zhao Heming
    - Fix a work queue check, from Guoqing Jiang
    - Fix raid5 oops with reshape, from Song Liu
    - Clean up unused code, from Jason Yan
    - Discard improvements, from Xiao Ni
    - raid5/6 page offset support, from Yufen Yu

    - Shared tag bitmap for SCSI/hisi_sas/null_blk (John, Kashyap,
    Hannes)

    - null_blk open/active zone limit support (Niklas)

    - Set of bcache updates (Coly, Dongsheng, Qinglang)"

    * tag 'drivers-5.10-2020-10-12' of git://git.kernel.dk/linux-block: (78 commits)
    md/raid5: fix oops during stripe resizing
    md/bitmap: fix memory leak of temporary bitmap
    md: fix the checking of wrong work queue
    md/bitmap: md_bitmap_get_counter returns wrong blocks
    md/bitmap: md_bitmap_read_sb uses wrong bitmap blocks
    md/raid0: remove unused function is_io_in_chunk_boundary()
    nvme-core: remove extra condition for vwc
    nvme-core: remove extra variable
    nvme: remove nvme_identify_ns_list
    nvme: refactor nvme_validate_ns
    nvme: move nvme_validate_ns
    nvme: query namespace identifiers before adding the namespace
    nvme: revalidate zone bitmaps in nvme_update_ns_info
    nvme: remove nvme_update_formats
    nvme: update the known admin effects
    nvme: set the queue limits in nvme_update_ns_info
    nvme: remove the 0 lba_shift check in nvme_update_ns_info
    nvme: clean up the check for too large logic block sizes
    nvme: freeze the queue over ->lba_shift updates
    nvme: factor out a nvme_configure_metadata helper
    ...

    Linus Torvalds
     

13 Oct, 2020

1 commit

  • Pull crypto updates from Herbert Xu:
    "API:
    - Allow DRBG testing through user-space af_alg
    - Add tcrypt speed testing support for keyed hashes
    - Add type-safe init/exit hooks for ahash

    Algorithms:
    - Mark arc4 as obsolete and pending for future removal
    - Mark anubis, khazad, sead and tea as obsolete
    - Improve boot-time xor benchmark
    - Add OSCCA SM2 asymmetric cipher algorithm and use it for integrity

    Drivers:
    - Fixes and enhancement for XTS in caam
    - Add support for XIP8001B hwrng in xiphera-trng
    - Add RNG and hash support in sun8i-ce/sun8i-ss
    - Allow imx-rngc to be used by kernel entropy pool
    - Use crypto engine in omap-sham
    - Add support for Ingenic X1830 with ingenic"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (205 commits)
    X.509: Fix modular build of public_key_sm2
    crypto: xor - Remove unused variable count in do_xor_speed
    X.509: fix error return value on the failed path
    crypto: bcm - Verify GCM/CCM key length in setkey
    crypto: qat - drop input parameter from adf_enable_aer()
    crypto: qat - fix function parameters descriptions
    crypto: atmel-tdes - use semicolons rather than commas to separate statements
    crypto: drivers - use semicolons rather than commas to separate statements
    hwrng: mxc-rnga - use semicolons rather than commas to separate statements
    hwrng: iproc-rng200 - use semicolons rather than commas to separate statements
    hwrng: stm32 - use semicolons rather than commas to separate statements
    crypto: xor - use ktime for template benchmarking
    crypto: xor - defer load time benchmark to a later time
    crypto: hisilicon/zip - fix the uninitalized 'curr_qm_qp_num'
    crypto: hisilicon/zip - fix the return value when device is busy
    crypto: hisilicon/zip - fix zero length input in GZIP decompress
    crypto: hisilicon/zip - fix the uncleared debug registers
    lib/mpi: Fix unused variable warnings
    crypto: x86/poly1305 - Remove assignments with no effect
    hwrng: npcm - modify readl to readb
    ...

    Linus Torvalds
     

08 Oct, 2020

3 commits

  • The sm2 code was split out of public_key.c in a way that breaks
    modular builds. This patch moves the code back into the same file
    as the original motivation was to minimise ifdefs and that has
    nothing to do with splitting the code out.

    Fixes: 215525639631 ("X.509: support OSCCA SM2-with-SM3...")
    Reported-by: kernel test robot
    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • Clang warns:

    crypto/xor.c:101:4: warning: variable 'count' is uninitialized when used
    here [-Wuninitialized]
    count++;
    ^~~~~
    crypto/xor.c:86:17: note: initialize the variable 'count' to silence
    this warning
    int i, j, count;
    ^
    = 0
    1 warning generated.

    After the refactoring to use ktime that happened in this function, count
    is only assigned, never read. Just remove the variable to get rid of the
    warning.

    Fixes: c055e3eae0f1 ("crypto: xor - use ktime for template benchmarking")
    Link: https://github.com/ClangBuiltLinux/linux/issues/1171
    Signed-off-by: Nathan Chancellor
    Reviewed-by: Douglas Anderson
    Acked-by: Ard Biesheuvel
    Signed-off-by: Herbert Xu

    Nathan Chancellor
     
  • When memory allocation fails, an appropriate return value
    should be set.

    Fixes: 215525639631 ("X.509: support OSCCA SM2-with-SM3 certificate verification")
    Signed-off-by: Tianjia Zhang
    Signed-off-by: Herbert Xu

    Tianjia Zhang
     

02 Oct, 2020

2 commits

  • Currently, we use the jiffies counter as a time source, by staring at
    it until a HZ period elapses, and then staring at it again and perform
    as many XOR operations as we can at the same time until another HZ
    period elapses, so that we can calculate the throughput. This takes
    longer than necessary, and depends on HZ, which is undesirable, since
    HZ is system dependent.

    Let's use the ktime interface instead, and use it to time a fixed
    number of XOR operations, which can be done much faster, and makes
    the time spent depend on the performance level of the system itself,
    which is much more reasonable. To ensure that we have the resolution
    we need even on systems with 32 kHz time sources, while not spending too
    much time in the benchmark on a slow CPU, let's switch to 3 attempts of
    800 repetitions each: that way, we will only misidentify algorithms that
    perform within 10% of each other as the fastest if they are faster than
    10 GB/s to begin with, which is not expected to occur on systems with
    such coarse clocks.

    On ThunderX2, I get the following results:

    Before:

    [72625.956765] xor: measuring software checksum speed
    [72625.993104] 8regs : 10169.000 MB/sec
    [72626.033099] 32regs : 12050.000 MB/sec
    [72626.073095] arm64_neon: 11100.000 MB/sec
    [72626.073097] xor: using function: 32regs (12050.000 MB/sec)

    After:

    [72599.650216] xor: measuring software checksum speed
    [72599.651188] 8regs : 10491 MB/sec
    [72599.652006] 32regs : 12345 MB/sec
    [72599.652871] arm64_neon : 11402 MB/sec
    [72599.652873] xor: using function: 32regs (12345 MB/sec)

    Link: https://lore.kernel.org/linux-crypto/20200923182230.22715-3-ardb@kernel.org/
    Signed-off-by: Ard Biesheuvel
    Reviewed-by: Douglas Anderson
    Signed-off-by: Herbert Xu

    Ard Biesheuvel
     
  • Currently, the XOR module performs its boot time benchmark at core
    initcall time when it is built-in, to ensure that the RAID code can
    make use of it when it is built-in as well.

    Let's defer this to a later stage during the boot, to avoid impacting
    the overall boot time of the system. Instead, just pick an arbitrary
    implementation from the list, and use that as the preliminary default.

    Reviewed-by: Douglas Anderson
    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Herbert Xu

    Ard Biesheuvel
     

25 Sep, 2020

12 commits

  • The digital certificate format based on SM2 crypto algorithm as
    specified in GM/T 0015-2012. It was published by State Encryption
    Management Bureau, China.

    The method of generating Other User Information is defined as
    ZA=H256(ENTLA || IDA || a || b || xG || yG || xA || yA), it also
    specified in https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02.

    The x509 certificate supports SM2-with-SM3 type certificate
    verification. Because certificate verification requires ZA
    in addition to tbs data, ZA also depends on elliptic curve
    parameters and public key data, so you need to access tbs in sig
    and calculate ZA. Finally calculate the digest of the
    signature and complete the verification work. The calculation
    process of ZA is declared in specifications GM/T 0009-2012
    and GM/T 0003.2-2012.

    Signed-off-by: Tianjia Zhang
    Tested-by: Xufeng Zhang
    Reviewed-by: Gilad Ben-Yossef
    Signed-off-by: Herbert Xu

    Tianjia Zhang
     
  • The digital certificate format based on SM2 crypto algorithm as
    specified in GM/T 0015-2012. It was published by State Encryption
    Management Bureau, China.

    This patch adds the OID object identifier defined by OSCCA. The
    x509 certificate supports SM2-with-SM3 type certificate parsing.
    It uses the standard elliptic curve public key, and the sm2
    algorithm signs the hash generated by sm3.

    Signed-off-by: Tianjia Zhang
    Tested-by: Xufeng Zhang
    Reviewed-by: Vitaly Chikunov
    Signed-off-by: Herbert Xu

    Tianjia Zhang
     
  • Add testmgr test vectors for SM2 algorithm. These vectors come
    from `openssl pkeyutl -sign` and libgcrypt.

    Signed-off-by: Tianjia Zhang
    Tested-by: Xufeng Zhang
    Signed-off-by: Herbert Xu

    Tianjia Zhang
     
  • When the 'key' allocation fails, the 'req' will not be released,
    which will cause memory leakage on this path. This patch adds a
    'free_req' tag used to solve this problem, and two new err values
    are added to reflect the real reason of the error.

    Signed-off-by: Tianjia Zhang
    Signed-off-by: Herbert Xu

    Tianjia Zhang
     
  • Some asymmetric algorithms will get different ciphertext after
    each encryption, such as SM2, and let testmgr support the testing
    of such algorithms.

    In struct akcipher_testvec, set c and c_size to be empty, skip
    the comparison of the ciphertext, and compare the decrypted
    plaintext with m to achieve the test purpose.

    Signed-off-by: Tianjia Zhang
    Tested-by: Xufeng Zhang
    Signed-off-by: Herbert Xu

    Tianjia Zhang
     
  • This new module implement the SM2 public key algorithm. It was
    published by State Encryption Management Bureau, China.
    List of specifications for SM2 elliptic curve public key cryptography:

    * GM/T 0003.1-2012
    * GM/T 0003.2-2012
    * GM/T 0003.3-2012
    * GM/T 0003.4-2012
    * GM/T 0003.5-2012

    IETF: https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02
    oscca: http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml
    scctc: http://www.gmbz.org.cn/main/bzlb.html

    Signed-off-by: Tianjia Zhang
    Tested-by: Xufeng Zhang
    Signed-off-by: Herbert Xu

    Tianjia Zhang
     
  • Both crypto_sm3_update and crypto_sm3_finup have been
    exported, exporting crypto_sm3_final, to avoid having to
    use crypto_sm3_finup(desc, NULL, 0, dgst) to calculate
    the hash in some cases.

    Signed-off-by: Tianjia Zhang
    Tested-by: Xufeng Zhang
    Signed-off-by: Herbert Xu

    Tianjia Zhang
     
  • Extend the user-space RNG interface:
    1. Add entropy input via ALG_SET_DRBG_ENTROPY setsockopt option;
    2. Add additional data input via sendmsg syscall.

    This allows DRBG to be tested with test vectors, for example for the
    purpose of CAVP testing, which otherwise isn't possible.

    To prevent erroneous use of entropy input, it is hidden under
    CRYPTO_USER_API_RNG_CAVP config option and requires CAP_SYS_ADMIN to
    succeed.

    Signed-off-by: Elena Petrova
    Acked-by: Stephan Müller
    Reviewed-by: Eric Biggers
    Signed-off-by: Herbert Xu

    Elena Petrova
     
  • Some line got only spaces, remove them

    Signed-off-by: Corentin Labbe
    Signed-off-by: Herbert Xu

    Corentin Labbe
     
  • For now, asynchronous raid6 recovery calculate functions are require
    common offset for pages. But, we expect them to support different page
    offset after introducing stripe shared page. Do that by simplily adding
    page offset where each page address are referred. Then, replace the
    old interface with the new ones in raid6 and raid6test.

    Signed-off-by: Yufen Yu
    Signed-off-by: Song Liu

    Yufen Yu
     
  • For now, syndrome compute functions require common offset in the pages
    array. However, we expect them to support different offset when try to
    use shared page in the following. Simplily covert them by adding page
    offset where each page address are referred.

    Since the only caller of async_gen_syndrome() and async_syndrome_val()
    are in raid6, we don't want to reserve the old interface but modify the
    interface directly. After that, replacing old interfaces with new ones
    for raid6 and raid6test.

    Signed-off-by: Yufen Yu
    Signed-off-by: Song Liu

    Yufen Yu
     
  • raid5 will call async_xor() and async_xor_val() to compute xor.
    For now, both of them require the common src/dst page offset. But,
    we want them to support different src/dst page offset for following
    shared page.

    Here, adding two new function async_xor_offs() and async_xor_val_offs()
    respectively for async_xor() and async_xor_val().

    Signed-off-by: Yufen Yu
    Signed-off-by: Song Liu

    Yufen Yu
     

18 Sep, 2020

1 commit

  • We have a few interesting pieces in our cipher museum, which are never
    used internally, and were only ever provided as generic C implementations.

    Unfortunately, we cannot simply remove this code, as we cannot be sure
    that it is not being used via the AF_ALG socket API, however unlikely.

    So let's mark the Anubis, Khazad, SEED and TEA algorithms as obsolete,
    which means they can only be enabled in the build if the socket API is
    enabled in the first place.

    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Herbert Xu

    Ard Biesheuvel
     

11 Sep, 2020

2 commits

  • Now that crypto/cbc.h is only used by the generic cbc template,
    we can merge it back into the CBC code.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • Cryptographic algorithms may have a lifespan that is significantly
    shorter than Linux's, and so we need to start phasing out algorithms
    that are known to be broken, and are no longer fit for general use.

    RC4 (or arc4) is a good example here: there are a few areas where its
    use is still somewhat acceptable, e.g., for interoperability with legacy
    wifi hardware that can only use WEP or TKIP data encryption, but that
    should not imply that, for instance, use of RC4 based EAP-TLS by the WPA
    supplicant for negotiating TKIP keys is equally acceptable, or that RC4
    should remain available as a general purpose cryptographic transform for
    all in-kernel and user space clients.

    Now that all in-kernel users that need to retain support have moved to
    the arc4 library interface, and the known users of ecb(arc4) via the
    socket API (iwd [0] and libell [1][2]) have been updated to switch to a
    local implementation, we can take the next step, and mark the ecb(arc4)
    skcipher as obsolete, and only provide it if the socket API is enabled in
    the first place, as well as provide the option to disable all algorithms
    that have been marked as obsolete.

    [0] https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=1db8a85a60c64523
    [1] https://git.kernel.org/pub/scm/libs/ell/ell.git/commit/?id=53482ce421b727c2
    [2] https://git.kernel.org/pub/scm/libs/ell/ell.git/commit/?id=7f6a137809d42f6b

    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Herbert Xu

    Ard Biesheuvel
     

31 Aug, 2020

1 commit

  • Pull crypto fixes from Herbert Xu:

    - fix regression in af_alg that affects iwd

    - restore polling delay in qat

    - fix double free in ingenic on error path

    - fix potential build failure in sa2ul due to missing Kconfig dependency

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: af_alg - Work around empty control messages without MSG_MORE
    crypto: sa2ul - add Kconfig selects to fix build error
    crypto: ingenic - Drop kfree for memory allocated with devm_kzalloc
    crypto: qat - add delay before polling mailbox

    Linus Torvalds
     

28 Aug, 2020

1 commit


27 Aug, 2020

1 commit

  • The iwd daemon uses libell which sets up the skcipher operation with
    two separate control messages. As the first control message is sent
    without MSG_MORE, it is interpreted as an empty request.

    While libell should be fixed to use MSG_MORE where appropriate, this
    patch works around the bug in the kernel so that existing binaries
    continue to work.

    We will print a warning however.

    A separate issue is that the new kernel code no longer allows the
    control message to be sent twice within the same request. This
    restriction is obviously incompatible with what iwd was doing (first
    setting an IV and then sending the real control message). This
    patch changes the kernel so that this is explicitly allowed.

    Reported-by: Caleb Jorden
    Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when...")
    Cc:
    Signed-off-by: Herbert Xu

    Herbert Xu
     

24 Aug, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

21 Aug, 2020

3 commits