- 22 7月, 2021 6 次提交
-
-
由 Weili Qian 提交于
mainline inclusion from mainline-v5.11-rc1 commit a8ff38bd category: bugfix bugzilla: 173981 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a8ff38bd829420d4813c22d018f412d5f1bb65df ---------------------------------------------------------------------- Since 'qm_create_debugfs_file' always returns 0, change it as 'void'. Signed-off-by: NWeili Qian <qianweili@huawei.com> Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NMingqiang Ling <lingmingqiang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Weili Qian 提交于
mainline inclusion from mainline-v5.11-rc1 commit e926d753 category: bugfix bugzilla: 173981 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e926d753a6128035a72a99490daa56a4f9a49f83 ---------------------------------------------------------------------- The returns of 'qm_get_hw_error_status' and 'qm_get_dev_err_status' are values from the hardware registers, which should not be defined as 'int', so update as 'u32'. Signed-off-by: NWeili Qian <qianweili@huawei.com> Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NMingqiang Ling <lingmingqiang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Weili Qian 提交于
mainline inclusion from mainline-v5.11-rc1 commit 1b5644f2 category: bugfix bugzilla: 173981 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1b5644f29983b2847162de4d3b5bce23faa136ab ---------------------------------------------------------------------- Some numbers are replaced by macros to avoid incomprehension. Signed-off-by: NWeili Qian <qianweili@huawei.com> Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NMingqiang Ling <lingmingqiang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Longfang Liu 提交于
mainline inclusion from mainline-v5.11-rc1 commit 633e507f category: bugfix bugzilla: 173981 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=633e507fba02d62ed573a8dfb430fc3b881b23d6 ---------------------------------------------------------------------- Clean up extra blank lines Signed-off-by: NLongfang Liu <liulongfang@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NMingqiang Ling <lingmingqiang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Longfang Liu 提交于
mainline inclusion from mainline-v5.11-rc1 commit e68f9cf6 category: bugfix bugzilla: 173981 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e68f9cf6601b53c7ee8ece552fbafcd9cfa47faa ---------------------------------------------------------------------- 1. Remove unused member‘pending_reqs' in‘sec_qp_ctx' structure. 2. Remove unused member‘status' in‘sec_dev' structure. Signed-off-by: NLongfang Liu <liulongfang@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NMingqiang Ling <lingmingqiang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Shiju Jose 提交于
mainline inclusion from mainline-v5.11-rc1 commit b2161cc0 category: bugfix bugzilla: 173981 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b2161cc0c9c461feca04cc832a5defb0ac24a513 ---------------------------------------------------------------------- Fix following warnings caused by mismatch between function parameters and function comments. drivers/crypto/hisilicon/sgl.c:256: warning: Excess function parameter 'hw_sgl_dma' description in 'hisi_acc_sg_buf_unmap' drivers/crypto/hisilicon/sgl.c:256: warning: Excess function parameter 'pool' description in 'hisi_acc_sg_buf_unmap' drivers/crypto/hisilicon/qm.c:1849: warning: Function parameter or member 'qp' not described in 'qm_drain_qp' drivers/crypto/hisilicon/qm.c:2420: warning: Function parameter or member 'qm' not described in 'hisi_qm_set_vft' drivers/crypto/hisilicon/qm.c:2420: warning: Function parameter or member 'fun_num' not described in 'hisi_qm_set_vft' drivers/crypto/hisilicon/qm.c:2420: warning: Function parameter or member 'base' not described in 'hisi_qm_set_vft' drivers/crypto/hisilicon/qm.c:2420: warning: Function parameter or member 'number' not described in 'hisi_qm_set_vft' drivers/crypto/hisilicon/qm.c:2620: warning: Function parameter or member 'qm' not described in 'qm_clear_queues' Signed-off-by: NShiju Jose <shiju.jose@huawei.com> Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NMingqiang Ling <lingmingqiang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
- 15 6月, 2021 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
Revert "crypto: cavium/nitrox - add an error message to explain the failure of pci_request_mem_regions" stable inclusion from stable-5.10.42 commit dac2dde8ee5497c635767e4d84d0ee2b36a60e32 bugzilla: 55093 CVE: NA -------------------------------- [ Upstream commit 6a3239a7 ] This reverts commit 9fcddaf2 as it was submitted under a fake name and we can not knowingly accept anonymous contributions to the repository. This commit was part of a submission "test" to the Linux kernel community by some "researchers" at umn.edu. As outlined at: https://www-users.cs.umn.edu/%7Ekjlu/papers/full-disclosure.pdf it was done so as an attempt to submit a known-buggy patch to see if it could get by our review. However, the submission turned out to actually be correct, and not have a bug in it as the author did not understand how the PCI driver model works at all, and so the submission was accepted. As this change is of useless consequence, there is no loss of functionality in reverting it. Cc: "David S. Miller" <davem@davemloft.net> Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: linux-crypto@vger.kernel.org Acked-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Email: Herbert Xu <herbert@gondor.apana.org.au> Link: https://lore.kernel.org/r/YIkTi9a3nnL50wMq@kroah.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
- 03 6月, 2021 21 次提交
-
-
由 Sean Christopherson 提交于
stable inclusion from stable-5.10.38 commit f3a5dee0f30c898cc9273265d5f5b6bac94d49e8 bugzilla: 51875 CVE: NA -------------------------------- [ Upstream commit b61a9071 ] Free the SEV device if later initialization fails. The memory isn't technically leaked as it's tracked in the top-level device's devres list, but unless the top-level device is removed, the memory won't be freed and is effectively leaked. Signed-off-by: NSean Christopherson <seanjc@google.com> Message-Id: <20210406224952.4177376-2-seanjc@google.com> Reviewed-by: NBrijesh Singh <brijesh.singh@amd.com> Acked-by: NTom Lendacky <thomas.lendacky@amd.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Sean Christopherson 提交于
stable inclusion from stable-5.10.37 commit e606073b77a3c4a6f3f6b013deef36f75aef5737 bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit 74c1f136 ] Explicitly reject using pointers that are not virt_to_phys() friendly as the source for SEV commands that are sent to the PSP. The PSP works with physical addresses, and __pa()/virt_to_phys() will not return the correct address in these cases, e.g. for a vmalloc'd pointer. At best, the bogus address will cause the command to fail, and at worst lead to system instability. While it's unlikely that callers will deliberately use a bad pointer for SEV buffers, a caller can easily use a vmalloc'd pointer unknowingly when running with CONFIG_VMAP_STACK=y as it's not obvious that putting the command buffers on the stack would be bad. The command buffers are relative small and easily fit on the stack, and the APIs to do not document that the incoming pointer must be a physically contiguous, __pa() friendly pointer. Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Borislav Petkov <bp@suse.de> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Fixes: 200664d5 ("crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support") Signed-off-by: NSean Christopherson <seanjc@google.com> Message-Id: <20210406224952.4177376-3-seanjc@google.com> Reviewed-by: NBrijesh Singh <brijesh.singh@amd.com> Acked-by: NTom Lendacky <thomas.lendacky@amd.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Ayush Sawal 提交于
stable inclusion from stable-5.10.37 commit 99a29899e3a3bf62fbffbdf2d0c6b2d8efc12f65 bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit 16a9874f ] The rxchannel id is updated by the driver using the port no value, but this does not ensure that the value is correct. So now rx channel value is obtained from etoc channel map value. Fixes: 567be3a5 ("crypto: chelsio - Use multiple txq/rxq per...") Signed-off-by: NAyush Sawal <ayush.sawal@chelsio.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Lv Yunlong 提交于
stable inclusion from stable-5.10.37 commit 1faf7e6199b8f3874f1b0e3d046931ecb4925a5a bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit f7cae626 ] In adf_create_ring, if the callee adf_init_ring() failed, the callee will free the ring->base_addr by dma_free_coherent() and return -EFAULT. Then adf_create_ring will goto err and the ring->base_addr will be freed again in adf_cleanup_ring(). My patch sets ring->base_addr to NULL after the first freed to avoid the double free. Fixes: a672a9dc ("crypto: qat - Intel(R) QAT transport code") Signed-off-by: NLv Yunlong <lyl2019@mail.ustc.edu.cn> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Colin Ian King 提交于
stable inclusion from stable-5.10.37 commit 0e596b3734649041ed77edc86a23c0442bbe062b bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit 854b7737 ] There are two error return paths that are not freeing rxd and causing memory leaks. Fix these. Addresses-Coverity: ("Resource leak") Fixes: 00c9211f ("crypto: sa2ul - Fix DMA mapping API usage") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Colin Ian King 提交于
stable inclusion from stable-5.10.37 commit 2c67a9333da9d0a3b87310e0d116b7c9070c7b00 bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit 50274b01 ] It appears there are several failure return paths that don't seem to be free'ing pad. Fix these. Addresses-Coverity: ("Resource leak") Fixes: d9b45418 ("crypto: sun8i-ss - support hash algorithms") Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-by: NCorentin Labbe <clabbe.montjoie@gmail.com> Tested-by: NCorentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Corentin Labbe 提交于
stable inclusion from stable-5.10.37 commit 2e57ffdb569602c7b5e574281de7d51a0b519b52 bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit ac1af1a7 ] Some CONFIG select miss CRYPTO_. Reported-by: NChen-Yu Tsai <wens@csie.org> Fixes: 56f6d5ae ("crypto: sun8i-ce - support hash algorithms") Fixes: d9b45418 ("crypto: sun8i-ss - support hash algorithms") Signed-off-by: NCorentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Giovanni Cabiddu 提交于
stable inclusion from stable-5.10.37 commit 36babddef7821a6b4ab6037d5ab8904d1a02a873 bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit 83dc1173 ] The function adf_isr_resource_alloc() is not unwinding correctly in case of error. This patch fixes the error paths and propagate the errors to the caller. Fixes: 7afa232e ("crypto: qat - Intel(R) QAT DH895xcc accelerator") Signed-off-by: NGiovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: NMarco Chiappero <marco.chiappero@intel.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Tong Zhang 提交于
stable inclusion from stable-5.10.37 commit 1f50392650ae794a1aea41c213c6a3e1c824413c bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit 8609f5cf ] ADF_STATUS_PF_RUNNING is (only) used and checked by adf_vf2pf_shutdown() before calling adf_iov_putmsg()->mutex_lock(vf2pf_lock), however the vf2pf_lock is initialized in adf_dev_init(), which can fail and when it fail, the vf2pf_lock is either not initialized or destroyed, a subsequent use of vf2pf_lock will cause issue. To fix this issue, only set this flag if adf_dev_init() returns 0. [ 7.178404] BUG: KASAN: user-memory-access in __mutex_lock.isra.0+0x1ac/0x7c0 [ 7.180345] Call Trace: [ 7.182576] mutex_lock+0xc9/0xd0 [ 7.183257] adf_iov_putmsg+0x118/0x1a0 [intel_qat] [ 7.183541] adf_vf2pf_shutdown+0x4d/0x7b [intel_qat] [ 7.183834] adf_dev_shutdown+0x172/0x2b0 [intel_qat] [ 7.184127] adf_probe+0x5e9/0x600 [qat_dh895xccvf] Signed-off-by: NTong Zhang <ztong0001@gmail.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Fixes: 25c6ffb2 ("crypto: qat - check if PF is running") Acked-by: NGiovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Tong Zhang 提交于
stable inclusion from stable-5.10.37 commit b50967781767a1dc3b4d574234b2d0d34dda9b69 bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit b66accaa ] adf_vf_isr_resource_alloc() is not unwinding correctly when error happens and it want to release uninitialized resources. To fix this, only release initialized resources. [ 1.792845] Trying to free already-free IRQ 11 [ 1.793091] WARNING: CPU: 0 PID: 182 at kernel/irq/manage.c:1821 free_irq+0x202/0x380 [ 1.801340] Call Trace: [ 1.801477] adf_vf_isr_resource_free+0x32/0xb0 [intel_qat] [ 1.801785] adf_vf_isr_resource_alloc+0x14d/0x150 [intel_qat] [ 1.802105] adf_dev_init+0xba/0x140 [intel_qat] Signed-off-by: NTong Zhang <ztong0001@gmail.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Fixes: dd0f3683 ("crypto: qat - Add qat dh895xcc VF driver") Acked-by: NGiovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Rijo Thomas 提交于
stable inclusion from stable-5.10.37 commit 31e1314ceee0f8e5da7067383ef0317ef50a4ab4 bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit 00aa6e65 ] Multiple threads or clients can submit a command to the TEE ring buffer. This patch helps to synchronize command submission to the ring. One thread shall write a command to a TEE ring buffer entry only if: - Trusted OS has notified that the TEE command for the given entry has been processed and driver has copied the TEE response into client buffer. - The command entry is empty and can be written into. After a command has been written to the TEE ring buffer, the global wptr (mutex protected) shall be incremented for use by next client. If PSP became unresponsive while processing TEE request from a client, then further command submission to queue will be disabled. Fixes: 33960acc (crypto: ccp - add TEE support for Raven Ridge) Reviewed-by: NDevaraj Rangasamy <Devaraj.Rangasamy@amd.com> Signed-off-by: NRijo Thomas <Rijo-john.Thomas@amd.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Colin Ian King 提交于
stable inclusion from stable-5.10.37 commit 617ec35ed51f731a593ae7274228ef2cfc9cb781 bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit 98b5ef3e ] In the case where the dma_iv mapping fails, the return error path leaks the memory allocated to object d. Fix this by adding a new error return label and jumping to this to ensure d is free'd before the return. Addresses-Coverity: ("Resource leak") Fixes: ac2614d7 ("crypto: sun8i-ss - Add support for the PRNG") Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-by: NCorentin Labbe <clabbe.montjoie@gmail.com> Tested-by: NCorentin Labbe <clabbe.montjoie@gmail.com> Acked-by: NCorentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Corentin Labbe 提交于
stable inclusion from stable-5.10.37 commit 1f12aaf07f61122cf5074d29714ee26f8d44b0e7 bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit 1dbc6a1e ] This patch fixes a memory leak on an error path. Fixes: d9b45418 ("crypto: sun8i-ss - support hash algorithms") Reported-by: Nkernel test robot <lkp@intel.com> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NCorentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Shixin Liu 提交于
stable inclusion from stable-5.10.36 commit 5d60792d129277af284a1804b929ff482201e5f0 bugzilla: 51867 CVE: NA -------------------------------- [ Upstream commit 1f34cc4a ] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: NShixin Liu <liushixin2@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Shixin Liu 提交于
stable inclusion from stable-5.10.36 commit 92894b185321fd24e0b0144ac0f4cfcde49320a2 bugzilla: 51867 CVE: NA -------------------------------- [ Upstream commit 13343bad ] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: NShixin Liu <liushixin2@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Shixin Liu 提交于
stable inclusion from stable-5.10.36 commit 4e7ae0cfaca9ba57b6b10d4fe4d4bcefd9935db8 bugzilla: 51867 CVE: NA -------------------------------- [ Upstream commit 747bf30f ] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: NShixin Liu <liushixin2@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Shixin Liu 提交于
stable inclusion from stable-5.10.36 commit 8a090d492f70174f8a6c2270fe4ae8adc9f8eec6 bugzilla: 51867 CVE: NA -------------------------------- [ Upstream commit 1cb3ad70 ] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: NShixin Liu <liushixin2@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Shixin Liu 提交于
stable inclusion from stable-5.10.36 commit 836671775a6e726215b72b15fa7ca858ba6ae0e8 bugzilla: 51867 CVE: NA -------------------------------- [ Upstream commit cc987ae9 ] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: NShixin Liu <liushixin2@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Shixin Liu 提交于
stable inclusion from stable-5.10.36 commit 2264965f576ff434ee7121edc98a83b072d4e645 bugzilla: 51867 CVE: NA -------------------------------- [ Upstream commit 06cd7423 ] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: NShixin Liu <liushixin2@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Longfang Liu 提交于
stable inclusion from stable-5.10.36 commit bde50f19ba241a06e6a37f8bf9db77e9ea1ef093 bugzilla: 51867 CVE: NA -------------------------------- [ Upstream commit 4b7aef02 ] When the log is output here, the device has not been initialized yet. Signed-off-by: NLongfang Liu <liulongfang@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Hui Tang 提交于
stable inclusion from stable-5.10.36 commit 6202e708f303b7c85d1cb56833d80a3ebb084252 bugzilla: 51867 CVE: NA -------------------------------- [ Upstream commit 792b32fa ] 'dma_mapping_error' return a negative value if 'dma_addr' is equal to 'DMA_MAPPING_ERROR' not zero, so fix initialization of 'dma_addr'. Signed-off-by: NHui Tang <tanghui20@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
- 09 4月, 2021 9 次提交
-
-
由 Corentin Labbe 提交于
stable inclusion from stable-5.10.20 commit 70c4b76be44bd335d117bf0366a87f3e1da0558e bugzilla: 50608 -------------------------------- commit 4ec8977b upstream. The need_fallback is never initialized and seem to be always true at runtime. So all hardware operations are always bypassed. Fixes: 0ae1f46c ("crypto: sun4i-ss - fallback when length is not multiple of blocksize") Cc: <stable@vger.kernel.org> Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Corentin Labbe 提交于
stable inclusion from stable-5.10.20 commit 985b609668d8f4d53ce14e1df471e433b2095771 bugzilla: 50608 -------------------------------- commit 5ab6177f upstream. Ciphers produce invalid results on BE. Key and IV need to be written in LE. Fixes: 6298e948 ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") Cc: <stable@vger.kernel.org> Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Corentin Labbe 提交于
stable inclusion from stable-5.10.20 commit 19be286216dc62fb547096d22b734b9920aa9028 bugzilla: 50608 -------------------------------- commit b756f1c8 upstream. Allwinner A10 and A13 SoC have a version of the SS which produce invalid IV in IVx register. Instead of adding a variant for those, let's convert SS to produce IV directly from data. Fixes: 6298e948 ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") Cc: <stable@vger.kernel.org> Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Corentin Labbe 提交于
stable inclusion from stable-5.10.20 commit ca4460daf0c5fc83abd02379e9aad2ecea4324d4 bugzilla: 50608 -------------------------------- commit 7bdcd851 upstream. The optimized cipher function need length multiple of 4 bytes. But it get sometimes odd length. This is due to SG data could be stored with an offset. So the fix is to check also if the offset is aligned with 4 bytes. Fixes: 6298e948 ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") Cc: <stable@vger.kernel.org> Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Christophe Leroy 提交于
stable inclusion from stable-5.10.20 commit c64eb55b4ec26d979c4a55c1b9e980ea57e1fd1d bugzilla: 50608 -------------------------------- [ Upstream commit 43a942d2 ] While ctr(aes) requires the use of a special descriptor on SEC2 (see commit 70d355cc ("crypto: talitos - fix ctr-aes-talitos")), that special descriptor doesn't work on SEC1, see commit e738c5f1 ("powerpc/8xx: Add DT node for using the SEC engine of the MPC885"). However, the common nonsnoop descriptor works properly on SEC1 for ctr(aes). Add a second template for ctr(aes) that will be registered only on SEC1. Fixes: 70d355cc ("crypto: talitos - fix ctr-aes-talitos") Signed-off-by: NChristophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Christophe Leroy 提交于
stable inclusion from stable-5.10.20 commit 62aa24d2b7be2839141e0b7d6b18a3e0ee0cacf8 bugzilla: 50608 -------------------------------- [ Upstream commit 416b8467 ] Talitos Security Engine AESU considers any input data size that is not a multiple of 16 bytes to be an error. This is not a problem in general, except for Counter mode that is a stream cipher and can have an input of any size. Test Manager for ctr(aes) fails on 4th test vector which has a length of 499 while all previous vectors which have a 16 bytes multiple length succeed. As suggested by Freescale, round up the input data length to the nearest 16 bytes. Fixes: 5e75ae1b ("crypto: talitos - add new crypto modes") Signed-off-by: NChristophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Jiri Olsa 提交于
stable inclusion from stable-5.10.20 commit 3b22a67c7f6b8c752dbb2d7762e6b6924588e3ab bugzilla: 50608 -------------------------------- [ Upstream commit f7f2b43e ] Renaming 'struct device_private' to 'struct bcm_device_private', because it clashes with 'struct device_private' from 'drivers/base/base.h'. While it's not a functional problem, it's causing two distinct type hierarchies in BTF data. It also breaks build with options: CONFIG_DEBUG_INFO_BTF=y CONFIG_CRYPTO_DEV_BCM_SPU=y as reported by Qais Yousef [1]. [1] https://lore.kernel.org/lkml/20201229151352.6hzmjvu3qh6p2qgg@e107158-lin/ Fixes: 9d12ba86 ("crypto: brcm - Add Broadcom SPU driver") Signed-off-by: NJiri Olsa <jolsa@kernel.org> Tested-by: NQais Yousef <qais.yousef@arm.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Corentin Labbe 提交于
stable inclusion from stable-5.10.20 commit 2f7287fbcb9f86a4fbf93f83d0dd4a4888828308 bugzilla: 50608 -------------------------------- [ Upstream commit 9bc3dd24 ] With the recent kmap change, some tests which were conditional on CONFIG_DEBUG_HIGHMEM now are enabled by default. This permit to detect a problem in sun4i-ss usage of kmap. sun4i-ss uses two kmap via sg_miter (one for input, one for output), but using two kmap at the same time is hard: "the ordering has to be correct and with sg_miter that's probably hard to get right." (quoting Tlgx) So the easiest solution is to never have two sg_miter/kmap open at the same time. After each use of sg_miter, I store the current index, for being able to resume sg_miter to the right place. Fixes: 6298e948 ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Corentin Labbe 提交于
stable inclusion from stable-5.10.20 commit 99e9cb7bc13befed01303354e05cba713ac617b0 bugzilla: 50608 -------------------------------- [ Upstream commit 58351351 ] When running the non-optimized cipher function, SS produce partial random output. This is due to linearize buffers being reseted after each loop. For preserving stack, instead of moving them back to start of function, I move them in sun4i_ss_ctx. Fixes: 8d3bcb99 ("crypto: sun4i-ss - reduce stack usage") Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
- 09 2月, 2021 1 次提交
-
-
由 Herbert Xu 提交于
stable inclusion from stable-5.10.13 commit 326644a0ede089e6b1d92fcbe89a77e637cefcab bugzilla: 47995 -------------------------------- commit 4f6543f2 upstream. The patch that added src_dma/dst_dma to struct mv_cesa_tdma_desc is broken on 64-bit systems as the size of the descriptor has been changed. This patch fixes it by using u32 instead of dma_addr_t. Fixes: e62291c1 ("crypto: marvell/cesa - Fix sparse warnings") Cc: <stable@vger.kernel.org> Reported-by: NSven Auhagen <sven.auhagen@voleatech.de> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
-
- 08 2月, 2021 1 次提交
-
-
由 Arnd Bergmann 提交于
stable inclusion from stable-5.10.11 commit cfaa4072715259ec2e06b9206c27a920f2fb5eb8 bugzilla: 47621 -------------------------------- [ Upstream commit 38281194 ] The driver was converted to use the crypto engine helper but is missing the corresponding Kconfig statement to ensure it is available: arm-linux-gnueabi-ld: drivers/crypto/omap-sham.o: in function `omap_sham_probe': omap-sham.c:(.text+0x374): undefined reference to `crypto_engine_alloc_init' arm-linux-gnueabi-ld: omap-sham.c:(.text+0x384): undefined reference to `crypto_engine_start' arm-linux-gnueabi-ld: omap-sham.c:(.text+0x510): undefined reference to `crypto_engine_exit' arm-linux-gnueabi-ld: drivers/crypto/omap-sham.o: in function `omap_sham_finish_req': omap-sham.c:(.text+0x98c): undefined reference to `crypto_finalize_hash_request' arm-linux-gnueabi-ld: omap-sham.c:(.text+0x9a0): undefined reference to `crypto_transfer_hash_request_to_engine' arm-linux-gnueabi-ld: drivers/crypto/omap-sham.o: in function `omap_sham_update': omap-sham.c:(.text+0xf24): undefined reference to `crypto_transfer_hash_request_to_engine' arm-linux-gnueabi-ld: drivers/crypto/omap-sham.o: in function `omap_sham_final': omap-sham.c:(.text+0x1020): undefined reference to `crypto_transfer_hash_request_to_engine' Fixes: 133c3d43 ("crypto: omap-sham - convert to use crypto engine") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
-
- 12 1月, 2021 1 次提交
-
-
由 Arnd Bergmann 提交于
stable inclusion from stable-5.10.4 commit 7682cd97aa38edc811836be42d11b25f76ca328e bugzilla: 46903 -------------------------------- [ Upstream commit d33a23b0 ] The bitreverse helper is almost always built into the kernel, but in a rare randconfig build it is possible to hit a case in which it is a loadable module while the atmel-i2c driver is built-in: arm-linux-gnueabi-ld: drivers/crypto/atmel-i2c.o: in function `atmel_i2c_checksum': atmel-i2c.c:(.text+0xa0): undefined reference to `byte_rev_table' Add one more 'select' statement to prevent this. Fixes: 11105693 ("crypto: atmel-ecc - introduce Microchip / Atmel ECC driver") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
-