mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
22b9f99b87
Drop patch that was superseded upstream: ramips/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch Drop upstreamed patches: - apm821xx/020-0001-crypto-crypto4xx-remove-bad-list_del.patch - apm821xx/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch - ath79/0011-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch - brcm63xx/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch - brcm63xx/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch - generic/backport/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch - generic/pending/170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch - generic/pending/900-gen_stats-fix-netlink-stats-padding.patch In 4.14.55, a patch was introduced that breaks ext4 images in some cases. The newly introduced patch backport-4.14/500-ext4-fix-check-to-prevent-initializing-reserved-inod.patch addresses this breakage. Fixes the following CVEs: - CVE-2018-10876 - CVE-2018-10877 - CVE-2018-10879 - CVE-2018-10880 - CVE-2018-10881 - CVE-2018-10882 - CVE-2018-10883 Compile-tested: ath79, octeon, x86/64 Runtime-tested: ath79, octeon, x86/64 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
121 lines
3.7 KiB
Diff
121 lines
3.7 KiB
Diff
From 81065f66dd99b3af58626a914b8c0fcff6b8b0ba Mon Sep 17 00:00:00 2001
|
|
From: Christian Lamparter <chunkeey@googlemail.com>
|
|
Date: Fri, 25 Aug 2017 15:47:15 +0200
|
|
Subject: [PATCH 02/25] crypto: crypto4xx - remove unused definitions and
|
|
write-only variables
|
|
|
|
This patch removes several unused code and definitons
|
|
(structs, variables, ...).
|
|
|
|
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
|
|
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
|
---
|
|
drivers/crypto/amcc/crypto4xx_alg.c | 6 ------
|
|
drivers/crypto/amcc/crypto4xx_core.c | 2 +-
|
|
drivers/crypto/amcc/crypto4xx_core.h | 16 ----------------
|
|
3 files changed, 1 insertion(+), 23 deletions(-)
|
|
|
|
--- a/drivers/crypto/amcc/crypto4xx_alg.c
|
|
+++ b/drivers/crypto/amcc/crypto4xx_alg.c
|
|
@@ -75,7 +75,6 @@ int crypto4xx_encrypt(struct ablkcipher_
|
|
struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
|
|
|
|
ctx->direction = DIR_OUTBOUND;
|
|
- ctx->hash_final = 0;
|
|
ctx->is_hash = 0;
|
|
ctx->pd_ctl = 0x1;
|
|
|
|
@@ -89,7 +88,6 @@ int crypto4xx_decrypt(struct ablkcipher_
|
|
struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
|
|
|
|
ctx->direction = DIR_INBOUND;
|
|
- ctx->hash_final = 0;
|
|
ctx->is_hash = 0;
|
|
ctx->pd_ctl = 1;
|
|
|
|
@@ -136,7 +134,6 @@ static int crypto4xx_setkey_aes(struct c
|
|
}
|
|
/* Setup SA */
|
|
sa = (struct dynamic_sa_ctl *) ctx->sa_in;
|
|
- ctx->hash_final = 0;
|
|
|
|
set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, SA_NOT_SAVE_IV,
|
|
SA_LOAD_HASH_FROM_SA, SA_LOAD_IV_FROM_STATE,
|
|
@@ -191,7 +188,6 @@ static int crypto4xx_hash_alg_init(struc
|
|
|
|
ctx->dev = my_alg->dev;
|
|
ctx->is_hash = 1;
|
|
- ctx->hash_final = 0;
|
|
|
|
/* Create SA */
|
|
if (ctx->sa_in_dma_addr || ctx->sa_out_dma_addr)
|
|
@@ -256,7 +252,6 @@ int crypto4xx_hash_update(struct ahash_r
|
|
struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
|
|
|
|
ctx->is_hash = 1;
|
|
- ctx->hash_final = 0;
|
|
ctx->pd_ctl = 0x11;
|
|
ctx->direction = DIR_INBOUND;
|
|
|
|
@@ -274,7 +269,6 @@ int crypto4xx_hash_digest(struct ahash_r
|
|
{
|
|
struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
|
|
|
|
- ctx->hash_final = 1;
|
|
ctx->pd_ctl = 0x11;
|
|
ctx->direction = DIR_INBOUND;
|
|
|
|
--- a/drivers/crypto/amcc/crypto4xx_core.c
|
|
+++ b/drivers/crypto/amcc/crypto4xx_core.c
|
|
@@ -964,7 +964,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
|
|
|
|
sa->sa_command_1.bf.hash_crypto_offset = 0;
|
|
pd->pd_ctl.w = ctx->pd_ctl;
|
|
- pd->pd_ctl_len.w = 0x00400000 | (ctx->bypass << 24) | datalen;
|
|
+ pd->pd_ctl_len.w = 0x00400000 | datalen;
|
|
pd_uinfo->state = PD_ENTRY_INUSE;
|
|
wmb();
|
|
/* write any value to push engine to read a pd */
|
|
--- a/drivers/crypto/amcc/crypto4xx_core.h
|
|
+++ b/drivers/crypto/amcc/crypto4xx_core.h
|
|
@@ -72,7 +72,6 @@ struct pd_uinfo {
|
|
struct crypto4xx_device {
|
|
struct crypto4xx_core_device *core_dev;
|
|
char *name;
|
|
- u64 ce_phy_address;
|
|
void __iomem *ce_base;
|
|
void __iomem *trng_base;
|
|
|
|
@@ -127,21 +126,9 @@ struct crypto4xx_ctx {
|
|
u32 sa_len;
|
|
u32 offset_to_sr_ptr; /* offset to state ptr, in dynamic sa */
|
|
u32 direction;
|
|
- u32 next_hdr;
|
|
u32 save_iv;
|
|
- u32 pd_ctl_len;
|
|
u32 pd_ctl;
|
|
- u32 bypass;
|
|
u32 is_hash;
|
|
- u32 hash_final;
|
|
-};
|
|
-
|
|
-struct crypto4xx_req_ctx {
|
|
- struct crypto4xx_device *dev; /* Device in which
|
|
- operation to send to */
|
|
- void *sa;
|
|
- u32 sa_dma_addr;
|
|
- u16 sa_len;
|
|
};
|
|
|
|
struct crypto4xx_alg_common {
|
|
@@ -172,9 +159,6 @@ static inline struct crypto4xx_alg *cryp
|
|
|
|
extern int crypto4xx_alloc_sa(struct crypto4xx_ctx *ctx, u32 size);
|
|
extern void crypto4xx_free_sa(struct crypto4xx_ctx *ctx);
|
|
-extern u32 crypto4xx_alloc_sa_rctx(struct crypto4xx_ctx *ctx,
|
|
- struct crypto4xx_ctx *rctx);
|
|
-extern void crypto4xx_free_sa_rctx(struct crypto4xx_ctx *rctx);
|
|
extern void crypto4xx_free_ctx(struct crypto4xx_ctx *ctx);
|
|
extern u32 crypto4xx_alloc_state_record(struct crypto4xx_ctx *ctx);
|
|
extern u32 get_dynamic_sa_offset_state_ptr_field(struct crypto4xx_ctx *ctx);
|