This is the start of the stable review cycle for the 5.4.79 release.
There are 17 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun, 22 Nov 2020 10:45:32 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.79-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.79-rc1
Nick Desaulniers <ndesaulniers(a)google.com>
ACPI: GED: fix -Wformat
David Edmondson <david.edmondson(a)oracle.com>
KVM: x86: clflushopt should be treated as a no-op by emulation
Zhang Changzhong <zhangchangzhong(a)huawei.com>
can: proc: can_remove_proc(): silence remove_proc_entry warning
Johannes Berg <johannes.berg(a)intel.com>
mac80211: always wind down STA state
Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
Input: sunkbd - avoid use-after-free in teardown paths
Hauke Mehrtens <hauke(a)hauke-m.de>
net: lantiq: Add locking for TX DMA channel
Christophe Leroy <christophe.leroy(a)csgroup.eu>
powerpc/8xx: Always fault when _PAGE_ACCESSED is not set
Eran Ben Elisha <eranbe(a)nvidia.com>
net/mlx5: Add retry mechanism to the command entry index allocation
Eran Ben Elisha <eranbe(a)mellanox.com>
net/mlx5: Fix a race when moving command interface to events mode
Eran Ben Elisha <eranbe(a)mellanox.com>
net/mlx5: poll cmd EQ in case of command timeout
Parav Pandit <parav(a)mellanox.com>
net/mlx5: Use async EQ setup cleanup helpers for multiple EQs
Sudip Mukherjee <sudipm.mukherjee(a)gmail.com>
MIPS: PCI: Fix MIPS build
Daniel Axtens <dja(a)axtens.net>
selftests/powerpc: entry flush test
Michael Ellerman <mpe(a)ellerman.id.au>
powerpc: Only include kup-radix.h for 64-bit Book3S
Nicholas Piggin <npiggin(a)gmail.com>
powerpc/64s: flush L1D after user accesses
Nicholas Piggin <npiggin(a)gmail.com>
powerpc/64s: flush L1D on kernel entry
Russell Currey <ruscur(a)russell.cc>
selftests/powerpc: rfi_flush: disable entry flush if present
-------------
Diffstat:
Documentation/admin-guide/kernel-parameters.txt | 7 +
Makefile | 4 +-
arch/mips/pci/pci-xtalk-bridge.c | 2 +-
arch/powerpc/include/asm/book3s/64/kup-radix.h | 29 ++--
arch/powerpc/include/asm/exception-64s.h | 12 +-
arch/powerpc/include/asm/feature-fixups.h | 19 +++
arch/powerpc/include/asm/kup.h | 27 +++-
arch/powerpc/include/asm/security_features.h | 7 +
arch/powerpc/include/asm/setup.h | 4 +
arch/powerpc/kernel/exceptions-64s.S | 88 +++++------
arch/powerpc/kernel/head_8xx.S | 14 +-
arch/powerpc/kernel/setup_64.c | 122 ++++++++++++++-
arch/powerpc/kernel/vmlinux.lds.S | 14 ++
arch/powerpc/lib/feature-fixups.c | 104 +++++++++++++
arch/powerpc/platforms/powernv/setup.c | 17 +++
arch/powerpc/platforms/pseries/setup.c | 8 +
arch/x86/kvm/emulate.c | 8 +-
drivers/acpi/evged.c | 2 +-
drivers/input/keyboard/sunkbd.c | 41 +++++-
drivers/net/ethernet/lantiq_xrx200.c | 2 +
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 109 ++++++++++++--
drivers/net/ethernet/mellanox/mlx5/core/eq.c | 157 +++++++++++---------
drivers/net/ethernet/mellanox/mlx5/core/lib/eq.h | 2 +
include/linux/mlx5/driver.h | 6 +
net/can/proc.c | 6 +-
net/mac80211/sta_info.c | 18 +++
.../testing/selftests/powerpc/security/.gitignore | 1 +
tools/testing/selftests/powerpc/security/Makefile | 2 +-
.../selftests/powerpc/security/entry_flush.c | 163 +++++++++++++++++++++
.../testing/selftests/powerpc/security/rfi_flush.c | 35 ++++-
30 files changed, 857 insertions(+), 173 deletions(-)
This is the start of the stable review cycle for the 4.14.208 release.
There are 17 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun, 22 Nov 2020 10:45:32 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.208-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.208-rc1
Nick Desaulniers <ndesaulniers(a)google.com>
ACPI: GED: fix -Wformat
David Edmondson <david.edmondson(a)oracle.com>
KVM: x86: clflushopt should be treated as a no-op by emulation
Zhang Changzhong <zhangchangzhong(a)huawei.com>
can: proc: can_remove_proc(): silence remove_proc_entry warning
Johannes Berg <johannes.berg(a)intel.com>
mac80211: always wind down STA state
Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
Input: sunkbd - avoid use-after-free in teardown paths
Christophe Leroy <christophe.leroy(a)csgroup.eu>
powerpc/8xx: Always fault when _PAGE_ACCESSED is not set
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
gpio: mockup: fix resource leak in error path
Krzysztof Kozlowski <krzk(a)kernel.org>
i2c: imx: Fix external abort on interrupt in exit paths
Lucas Stach <l.stach(a)pengutronix.de>
i2c: imx: use clk notifier for rate changes
Nicholas Piggin <npiggin(a)gmail.com>
powerpc/64s: flush L1D after user accesses
Nicholas Piggin <npiggin(a)gmail.com>
powerpc/uaccess: Evaluate macro arguments once, before user access is allowed
Andrew Donnellan <ajd(a)linux.ibm.com>
powerpc: Fix __clear_user() with KUAP enabled
Christophe Leroy <christophe.leroy(a)c-s.fr>
powerpc: Implement user_access_begin and friends
Christophe Leroy <christophe.leroy(a)c-s.fr>
powerpc: Add a framework for user access tracking
Nicholas Piggin <npiggin(a)gmail.com>
powerpc/64s: flush L1D on kernel entry
Daniel Axtens <dja(a)axtens.net>
powerpc/64s: move some exception handlers out of line
Daniel Axtens <dja(a)axtens.net>
powerpc/64s: Define MASKABLE_RELON_EXCEPTION_PSERIES_OOL
-------------
Diffstat:
Documentation/admin-guide/kernel-parameters.txt | 7 ++
Makefile | 4 +-
arch/powerpc/include/asm/book3s/64/kup-radix.h | 22 ++++
arch/powerpc/include/asm/exception-64s.h | 13 ++-
arch/powerpc/include/asm/feature-fixups.h | 19 +++
arch/powerpc/include/asm/futex.h | 4 +
arch/powerpc/include/asm/kup.h | 40 +++++++
arch/powerpc/include/asm/security_features.h | 7 ++
arch/powerpc/include/asm/setup.h | 4 +
arch/powerpc/include/asm/uaccess.h | 148 +++++++++++++++++++-----
arch/powerpc/kernel/exceptions-64s.S | 96 ++++++++-------
arch/powerpc/kernel/head_8xx.S | 8 +-
arch/powerpc/kernel/setup_64.c | 122 ++++++++++++++++++-
arch/powerpc/kernel/vmlinux.lds.S | 14 +++
arch/powerpc/lib/checksum_wrappers.c | 4 +
arch/powerpc/lib/feature-fixups.c | 104 +++++++++++++++++
arch/powerpc/lib/string.S | 4 +-
arch/powerpc/lib/string_64.S | 6 +-
arch/powerpc/platforms/powernv/setup.c | 17 +++
arch/powerpc/platforms/pseries/setup.c | 8 ++
arch/x86/kvm/emulate.c | 8 +-
drivers/acpi/evged.c | 2 +-
drivers/gpio/gpio-mockup.c | 1 +
drivers/i2c/busses/i2c-imx.c | 56 ++++++---
drivers/input/keyboard/sunkbd.c | 41 +++++--
net/can/proc.c | 6 +-
net/mac80211/sta_info.c | 18 +++
27 files changed, 664 insertions(+), 119 deletions(-)
There are sectorsize alignment checks that are reported but then
check_extent_data_ref continues. This was not intended, wrong alignment
is not a minor problem and we should return with error.
CC: stable(a)vger.kernel.org # 5.4+
Fixes: 0785a9aacf9d ("btrfs: tree-checker: Add EXTENT_DATA_REF check")
Signed-off-by: David Sterba <dsterba(a)suse.com>
---
fs/btrfs/tree-checker.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 1b27242a9c0b..f3f666b343ef 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -1424,6 +1424,7 @@ static int check_extent_data_ref(struct extent_buffer *leaf,
"invalid item size, have %u expect aligned to %zu for key type %u",
btrfs_item_size_nr(leaf, slot),
sizeof(*dref), key->type);
+ return -EUCLEAN;
}
if (!IS_ALIGNED(key->objectid, leaf->fs_info->sectorsize)) {
generic_err(leaf, slot,
@@ -1452,6 +1453,7 @@ static int check_extent_data_ref(struct extent_buffer *leaf,
extent_err(leaf, slot,
"invalid extent data backref offset, have %llu expect aligned to %u",
offset, leaf->fs_info->sectorsize);
+ return -EUCLEAN;
}
}
return 0;
--
2.25.0
The patch titled
Subject: mm, page_frag: recover from memory pressure
has been removed from the -mm tree. Its filename was
page_frag-recover-from-memory-pressure.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Dongli Zhang <dongli.zhang(a)oracle.com>
Subject: mm, page_frag: recover from memory pressure
The ethernet driver may allocate skb (and skb->data) via napi_alloc_skb().
This ends up to page_frag_alloc() to allocate skb->data from
page_frag_cache->va.
During the memory pressure, page_frag_cache->va may be allocated as
pfmemalloc page. As a result, the skb->pfmemalloc is always true as
skb->data is from page_frag_cache->va. The skb will be dropped if the
sock (receiver) does not have SOCK_MEMALLOC. This is expected behaviour
under memory pressure.
However, once kernel is not under memory pressure any longer (suppose
large amount of memory pages are just reclaimed), the page_frag_alloc()
may still re-use the prior pfmemalloc page_frag_cache->va to allocate
skb->data. As a result, the skb->pfmemalloc is always true unless
page_frag_cache->va is re-allocated, even if the kernel is not under
memory pressure any longer.
Here is how kernel runs into issue.
1. The kernel is under memory pressure and allocation of
PAGE_FRAG_CACHE_MAX_ORDER in __page_frag_cache_refill() will fail.
Instead, the pfmemalloc page is allocated for page_frag_cache->va.
2. All skb->data from page_frag_cache->va (pfmemalloc) will have
skb->pfmemalloc=true. The skb will always be dropped by sock without
SOCK_MEMALLOC. This is an expected behaviour.
3. Suppose a large amount of pages are reclaimed and kernel is not
under memory pressure any longer. We expect skb->pfmemalloc drop will
not happen.
4. Unfortunately, page_frag_alloc() does not proactively re-allocate
page_frag_alloc->va and will always re-use the prior pfmemalloc page.
The skb->pfmemalloc is always true even kernel is not under memory
pressure any longer.
Fix this by freeing and re-allocating the page instead of recycling it.
Link: https://lore.kernel.org/lkml/20201103193239.1807-1-dongli.zhang@oracle.com/
Link: https://lore.kernel.org/linux-mm/20201105042140.5253-1-willy@infradead.org/
Link: https://lkml.kernel.org/r/20201115201029.11903-1-dongli.zhang@oracle.com
Fixes: 79930f5892e ("net: do not deplete pfmemalloc reserve")
Signed-off-by: Dongli Zhang <dongli.zhang(a)oracle.com>
Suggested-by: Matthew Wilcox (Oracle) <willy(a)infradead.org>
Acked-by: Vlastimil Babka <vbabka(a)suse.cz>
Reviewed-by: Eric Dumazet <edumazet(a)google.com>
Cc: Aruna Ramakrishna <aruna.ramakrishna(a)oracle.com>
Cc: Bert Barbe <bert.barbe(a)oracle.com>
Cc: Rama Nichanamatlu <rama.nichanamatlu(a)oracle.com>
Cc: Venkat Venkatsubra <venkat.x.venkatsubra(a)oracle.com>
Cc: Manjunath Patil <manjunath.b.patil(a)oracle.com>
Cc: Joe Jin <joe.jin(a)oracle.com>
Cc: SRINIVAS <srinivas.eeda(a)oracle.com>
Cc: David S. Miller <davem(a)davemloft.net>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/page_alloc.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/mm/page_alloc.c~page_frag-recover-from-memory-pressure
+++ a/mm/page_alloc.c
@@ -5103,6 +5103,11 @@ refill:
if (!page_ref_sub_and_test(page, nc->pagecnt_bias))
goto refill;
+ if (unlikely(nc->pfmemalloc)) {
+ free_the_page(page, compound_order(page));
+ goto refill;
+ }
+
#if (PAGE_SIZE < PAGE_FRAG_CACHE_MAX_SIZE)
/* if size can vary use size else just use PAGE_SIZE */
size = nc->size;
_
Patches currently in -mm which might be from dongli.zhang(a)oracle.com are
A recent change to ndctl to attempt to reconfigure namespaces in place
uncovered a label accounting problem in block-window-type namespaces.
The ndctl "create.sh" test is able to trigger this signature:
WARNING: CPU: 34 PID: 9167 at drivers/nvdimm/label.c:1100 __blk_label_update+0x9a3/0xbc0 [libnvdimm]
[..]
RIP: 0010:__blk_label_update+0x9a3/0xbc0 [libnvdimm]
[..]
Call Trace:
uuid_store+0x21b/0x2f0 [libnvdimm]
kernfs_fop_write+0xcf/0x1c0
vfs_write+0xcc/0x380
ksys_write+0x68/0xe0
When allocated capacity for a namespace is renamed (new UUID) the labels
with the old UUID need to be deleted. The ndctl behavior to always
destroy namespaces on reconfiguration hid this problem.
The immediate impact of this bug is limited since block-window-type
namespaces only seem to exist in the specification and not in any
shipping products. However, the label handling code is being reused for
other technologies like CXL region labels, so there is a benefit to
making sure both vertical labels sets (block-window) and horizontal
label sets (pmem) have a functional reference implementation in
libnvdimm.
Fixes: c4703ce11c23 ("libnvdimm/namespace: Fix label tracking error")
Cc: <stable(a)vger.kernel.org>
Cc: Vishal Verma <vishal.l.verma(a)intel.com>
Cc: Dave Jiang <dave.jiang(a)intel.com>
Cc: Ira Weiny <ira.weiny(a)intel.com>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
drivers/nvdimm/label.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index 47a4828b8b31..6f2be7a34598 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -980,6 +980,15 @@ static int __blk_label_update(struct nd_region *nd_region,
}
}
+ /* release slots associated with any invalidated UUIDs */
+ mutex_lock(&nd_mapping->lock);
+ list_for_each_entry_safe(label_ent, e, &nd_mapping->labels, list)
+ if (test_and_clear_bit(ND_LABEL_REAP, &label_ent->flags)) {
+ reap_victim(nd_mapping, label_ent);
+ list_move(&label_ent->list, &list);
+ }
+ mutex_unlock(&nd_mapping->lock);
+
/*
* Find the resource associated with the first label in the set
* per the v1.2 namespace specification.