From 214db949a42e285aac7e5af10df61815510d5173 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 4 Aug 2014 13:58:02 -0700 Subject: [PATCH] 3.4-stable patches added patches: arm-8115-1-lpae-reduce-damage-caused-by-idmap-to-virtual-memory-layout.patch crypto-af_alg-properly-label-af_alg-socket.patch scsi-handle-flush-errors-properly.patch --- queue-3.10/series | 5 ++ queue-3.14/series | 9 ++++ queue-3.15/series | 12 +++++ ...ed-by-idmap-to-virtual-memory-layout.patch | 51 +++++++++++++++++++ ...-af_alg-properly-label-af_alg-socket.patch | 46 +++++++++++++++++ .../scsi-handle-flush-errors-properly.patch | 41 +++++++++++++++ queue-3.4/series | 3 ++ 7 files changed, 167 insertions(+) create mode 100644 queue-3.10/series create mode 100644 queue-3.14/series create mode 100644 queue-3.15/series create mode 100644 queue-3.4/arm-8115-1-lpae-reduce-damage-caused-by-idmap-to-virtual-memory-layout.patch create mode 100644 queue-3.4/crypto-af_alg-properly-label-af_alg-socket.patch create mode 100644 queue-3.4/scsi-handle-flush-errors-properly.patch create mode 100644 queue-3.4/series diff --git a/queue-3.10/series b/queue-3.10/series new file mode 100644 index 00000000000..4d35536722f --- /dev/null +++ b/queue-3.10/series @@ -0,0 +1,5 @@ +crypto-af_alg-properly-label-af_alg-socket.patch +arm-8115-1-lpae-reduce-damage-caused-by-idmap-to-virtual-memory-layout.patch +cfg80211-fix-mic_failure-tracing.patch +rapidio-tsi721_dma-fix-failure-to-obtain-transaction-descriptor.patch +scsi-handle-flush-errors-properly.patch diff --git a/queue-3.14/series b/queue-3.14/series new file mode 100644 index 00000000000..a5f941a91a5 --- /dev/null +++ b/queue-3.14/series @@ -0,0 +1,9 @@ +crypto-arm-aes-fix-encryption-of-unaligned-data.patch +crypto-af_alg-properly-label-af_alg-socket.patch +arm-dts-fix-l2-address-in-hi3620.patch +arm-fix-alignment-of-keystone-page-table-fixup.patch +arm-8115-1-lpae-reduce-damage-caused-by-idmap-to-virtual-memory-layout.patch +ath9k-fix-aggregation-session-lockup.patch +cfg80211-fix-mic_failure-tracing.patch +rapidio-tsi721_dma-fix-failure-to-obtain-transaction-descriptor.patch +scsi-handle-flush-errors-properly.patch diff --git a/queue-3.15/series b/queue-3.15/series new file mode 100644 index 00000000000..b9b6cda362e --- /dev/null +++ b/queue-3.15/series @@ -0,0 +1,12 @@ +powerpc-perf-fix-mmcr2-handling-for-ebb.patch +crypto-arm-aes-fix-encryption-of-unaligned-data.patch +crypto-af_alg-properly-label-af_alg-socket.patch +arm-dts-fix-l2-address-in-hi3620.patch +arm-omap2-gpmc-fix-gpmc_hwecc_bch_capable.patch +arm-fix-alignment-of-keystone-page-table-fixup.patch +arm-8115-1-lpae-reduce-damage-caused-by-idmap-to-virtual-memory-layout.patch +ath9k-fix-aggregation-session-lockup.patch +cfg80211-fix-mic_failure-tracing.patch +revert-mac80211-move-bufferable-mmpdu-check-to-fix-ap-mode-scan.patch +rapidio-tsi721_dma-fix-failure-to-obtain-transaction-descriptor.patch +scsi-handle-flush-errors-properly.patch diff --git a/queue-3.4/arm-8115-1-lpae-reduce-damage-caused-by-idmap-to-virtual-memory-layout.patch b/queue-3.4/arm-8115-1-lpae-reduce-damage-caused-by-idmap-to-virtual-memory-layout.patch new file mode 100644 index 00000000000..02685804606 --- /dev/null +++ b/queue-3.4/arm-8115-1-lpae-reduce-damage-caused-by-idmap-to-virtual-memory-layout.patch @@ -0,0 +1,51 @@ +From 811a2407a3cf7bbd027fbe92d73416f17485a3d8 Mon Sep 17 00:00:00 2001 +From: Konstantin Khlebnikov +Date: Fri, 25 Jul 2014 09:17:12 +0100 +Subject: ARM: 8115/1: LPAE: reduce damage caused by idmap to virtual memory layout + +From: Konstantin Khlebnikov + +commit 811a2407a3cf7bbd027fbe92d73416f17485a3d8 upstream. + +On LPAE, each level 1 (pgd) page table entry maps 1GiB, and the level 2 +(pmd) entries map 2MiB. + +When the identity mapping is created on LPAE, the pgd pointers are copied +from the swapper_pg_dir. If we find that we need to modify the contents +of a pmd, we allocate a new empty pmd table and insert it into the +appropriate 1GB slot, before then filling it with the identity mapping. + +However, if the 1GB slot covers the kernel lowmem mappings, we obliterate +those mappings. + +When replacing a PMD, first copy the old PMD contents to the new PMD, so +that we preserve the existing mappings, particularly the mappings of the +kernel itself. + +[rewrote commit message and added code comment -- rmk] + +Fixes: ae2de101739c ("ARM: LPAE: Add identity mapping support for the 3-level page table format") +Signed-off-by: Konstantin Khlebnikov +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mm/idmap.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/arch/arm/mm/idmap.c ++++ b/arch/arm/mm/idmap.c +@@ -22,6 +22,13 @@ static void idmap_add_pmd(pud_t *pud, un + pr_warning("Failed to allocate identity pmd.\n"); + return; + } ++ /* ++ * Copy the original PMD to ensure that the PMD entries for ++ * the kernel image are preserved. ++ */ ++ if (!pud_none(*pud)) ++ memcpy(pmd, pmd_offset(pud, 0), ++ PTRS_PER_PMD * sizeof(pmd_t)); + pud_populate(&init_mm, pud, pmd); + pmd += pmd_index(addr); + } else diff --git a/queue-3.4/crypto-af_alg-properly-label-af_alg-socket.patch b/queue-3.4/crypto-af_alg-properly-label-af_alg-socket.patch new file mode 100644 index 00000000000..d7f261d449d --- /dev/null +++ b/queue-3.4/crypto-af_alg-properly-label-af_alg-socket.patch @@ -0,0 +1,46 @@ +From 4c63f83c2c2e16a13ce274ee678e28246bd33645 Mon Sep 17 00:00:00 2001 +From: Milan Broz +Date: Tue, 29 Jul 2014 18:41:09 +0000 +Subject: crypto: af_alg - properly label AF_ALG socket + +From: Milan Broz + +commit 4c63f83c2c2e16a13ce274ee678e28246bd33645 upstream. + +Th AF_ALG socket was missing a security label (e.g. SELinux) +which means that socket was in "unlabeled" state. + +This was recently demonstrated in the cryptsetup package +(cryptsetup v1.6.5 and later.) +See https://bugzilla.redhat.com/show_bug.cgi?id=1115120 + +This patch clones the sock's label from the parent sock +and resolves the issue (similar to AF_BLUETOOTH protocol family). + +Signed-off-by: Milan Broz +Acked-by: Paul Moore +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + crypto/af_alg.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/crypto/af_alg.c ++++ b/crypto/af_alg.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + struct alg_type_list { + const struct af_alg_type *type; +@@ -243,6 +244,7 @@ int af_alg_accept(struct sock *sk, struc + + sock_init_data(newsock, sk2); + sock_graft(sk2, newsock); ++ security_sk_clone(sk, sk2); + + err = type->accept(ask->private, sk2); + if (err) { diff --git a/queue-3.4/scsi-handle-flush-errors-properly.patch b/queue-3.4/scsi-handle-flush-errors-properly.patch new file mode 100644 index 00000000000..b422ff366ba --- /dev/null +++ b/queue-3.4/scsi-handle-flush-errors-properly.patch @@ -0,0 +1,41 @@ +From 89fb4cd1f717a871ef79fa7debbe840e3225cd54 Mon Sep 17 00:00:00 2001 +From: James Bottomley +Date: Thu, 3 Jul 2014 19:17:34 +0200 +Subject: scsi: handle flush errors properly + +From: James Bottomley + +commit 89fb4cd1f717a871ef79fa7debbe840e3225cd54 upstream. + +Flush commands don't transfer data and thus need to be special cased +in the I/O completion handler so that we can propagate errors to +the block layer and filesystem. + +Signed-off-by: James Bottomley +Reported-by: Steven Haber +Tested-by: Steven Haber +Reviewed-by: Martin K. Petersen +Signed-off-by: Christoph Hellwig +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/scsi_lib.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/scsi/scsi_lib.c ++++ b/drivers/scsi/scsi_lib.c +@@ -795,6 +795,14 @@ void scsi_io_completion(struct scsi_cmnd + scsi_next_command(cmd); + return; + } ++ } else if (blk_rq_bytes(req) == 0 && result && !sense_deferred) { ++ /* ++ * Certain non BLOCK_PC requests are commands that don't ++ * actually transfer anything (FLUSH), so cannot use ++ * good_bytes != blk_rq_bytes(req) as the signal for an error. ++ * This sets the error explicitly for the problem case. ++ */ ++ error = __scsi_error_from_host_byte(cmd, result); + } + + /* no bidi support for !REQ_TYPE_BLOCK_PC yet */ diff --git a/queue-3.4/series b/queue-3.4/series new file mode 100644 index 00000000000..cecb6f5ee57 --- /dev/null +++ b/queue-3.4/series @@ -0,0 +1,3 @@ +crypto-af_alg-properly-label-af_alg-socket.patch +arm-8115-1-lpae-reduce-damage-caused-by-idmap-to-virtual-memory-layout.patch +scsi-handle-flush-errors-properly.patch -- 2.47.3