This series backports the Neoverse-N1 #1542419 erratum workaround
to v4.19.116. The series was originally merged in v5.5.
These patches handle user-space. The kernel change was:
commit dd8a1f134884 ("arm64: ftrace: Ensure synchronisation in PLT setup
for Neoverse-N1 #1542419"), which has already been picked up by stable.
(magic!)
Backporting this stuff past v4.19 isn't straight-forward as the kernel
change depends on the work done in:
https://lore.kernel.org/linux-arm-kernel/1529656278-878-1-git-send-email-wi…
which was merged for v4.19.
Thanks,
James
Catalin Marinas (1):
arm64: Silence clang warning on mismatched value/register sizes
James Morse (3):
arm64: errata: Hide CTR_EL0.DIC on systems affected by Neoverse-N1
#1542419
arm64: Fake the IminLine size on systems affected by Neoverse-N1
#1542419
arm64: compat: Workaround Neoverse-N1 #1542419 for compat user-space
Marc Zyngier (1):
arm64: Add part number for Neoverse N1
Documentation/arm64/silicon-errata.txt | 1 +
arch/arm64/Kconfig | 16 ++++++++++++++++
arch/arm64/include/asm/cache.h | 3 ++-
arch/arm64/include/asm/cpucaps.h | 3 ++-
arch/arm64/include/asm/cputype.h | 2 ++
arch/arm64/kernel/cpu_errata.c | 22 ++++++++++++++++++++++
arch/arm64/kernel/sys_compat.c | 11 +++++++++++
arch/arm64/kernel/traps.c | 9 +++++++++
8 files changed, 65 insertions(+), 2 deletions(-)
--
2.26.1
Hi,
Please consider applying the following patches to the listed stable releases.
The following patches were found to be missing in stable releases by the
Chrome OS missing patch robot. The patches meet the following criteria.
- The patch includes a Fixes: tag
- The patch referenced in the Fixes: tag has been applied to the listed
stable release
- The patch has not been applied to that stable release
All patches have been applied to the listed stable releases and to at least one
Chrome OS branch. Resulting images have been build- and runtime-tested (where
applicable) on real hardware and with virtual hardware on kerneltests.org.
Thanks,
Guenter
---
Upstream commit 6a30abaa40b6 ("ALSA: hda - Fix incorrect usage of IS_REACHABLE()")
upstream: v4.17-rc4
Fixes: c469652bb5e8 ("ALSA: hda - Use IS_REACHABLE() for dependency on input")
in linux-4.4.y: 4281754e6bea
in linux-4.9.y: 71bff398b0d4
in linux-4.14.y: d3222cfc0b58
upstream: v4.16-rc1
Affected branches:
linux-4.4.y
linux-4.9.y (already applied)
linux-4.14.y (already applied)
Upstream commit 20b50d79974e ("net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()")
upstream: v4.15-rc8
Fixes: 8f659a03a0ba ("net: ipv4: fix for a race condition in raw_sendmsg")
in linux-4.4.y: be27b620a861
in linux-4.9.y: f75f910ffa90
in linux-4.14.y: 3bc400bad0e0
upstream: v4.15-rc4
Affected branches:
linux-4.4.y
linux-4.9.y
linux-4.14.y
Upstream commit 773daa3caf5d ("net: ipv4: avoid unused variable warning for sysctl")
upstream: v4.16-rc5
Fixes: c7272c2f1229 ("net: ipv4: don't allow setting net.ipv4.route.min_pmtu below 68")
in linux-4.4.y: 94522bee72fd
in linux-4.9.y: 06f01887683f
in linux-4.14.y: 3bcf69f8e786
upstream: v4.16-rc5
Affected branches:
linux-4.4.y
linux-4.9.y
linux-4.14.y
Upstream commit 2ecefa0a15fd ("keys: Fix the use of the C++ keyword "private" in uapi/linux/keyctl.h")
upstream: v4.20-rc1
Fixes: 8a2336e549d3 ("uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name")
in linux-4.14.y: 448b5498f6c6
upstream: v4.19-rc3
Affected branches:
linux-4.14.y
linux-4.19.y (already applied)
Upstream commit 9f614197c744 ("drm/msm: Use the correct dma_sync calls harder")
upstream: v5.4-rc1
Fixes: 3de433c5b38a ("drm/msm: Use the correct dma_sync calls in msm_gem")
in linux-4.9.y: dca98889e8e5
in linux-4.14.y: 7ed71842d3c8
in linux-4.19.y: 39718d086d9b
upstream: v5.3-rc3
Affected branches:
linux-4.9.y
linux-4.14.y
linux-4.19.y
Upstream commit 555089fdfc37 ("bpftool: Fix printing incorrect pointer in btf_dump_ptr")
upstream: v5.5-rc7
Fixes: 22c349e8db89 ("tools: bpftool: fix format strings and arguments for jsonw_printf()")
in linux-4.19.y: 5fab87c26f0a
upstream: v5.4-rc1
Affected branches:
linux-4.19.y
linux-5.4.y (already applied)
Upstream commit ce4e45842de3 ("crypto: mxs-dcp - make symbols 'sha1_null_hash' and 'sha256_null_hash' static")
upstream: v4.20-rc1
Fixes: c709eebaf5c5 ("crypto: mxs-dcp - Fix SHA null hashes and output length")
in linux-4.4.y: 33378afbd12b
in linux-4.9.y: df1ef6f3c9ad
in linux-4.14.y: c0933fa586b4
in linux-4.19.y: 70ecd0459d03
upstream: v4.20-rc1
Affected branches:
linux-4.4.y
linux-4.9.y
linux-4.14.y
linux-4.19.y
Upstream commit 01ce31c57b3f ("vti4: removed duplicate log message.")
upstream: v5.1
Fixes: dd9ee3444014 ("vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel")
in linux-4.4.y: a4fa2a130412
in linux-4.9.y: d2a6df768b55
in linux-4.14.y: 61a2e1118c8a
in linux-4.19.y: 8ce41db0dcfc
upstream: v5.0-rc5
Affected branches:
linux-4.4.y
linux-4.9.y
linux-4.14.y
linux-4.19.y
Commit a408e4a86b36 ("ima: open a new file instance if no read
permissions") tries to create a new file descriptor to calculate a file
digest if the file has not been opened with O_RDONLY flag. However, if a
new file descriptor cannot be obtained, it sets the FMODE_READ flag to
file->f_flags instead of file->f_mode.
This patch fixes this issue by replacing f_flags with f_mode as it was
before that commit.
Cc: stable(a)vger.kernel.org # 4.20.x
Fixes: a408e4a86b36 ("ima: open a new file instance if no read permissions")
Signed-off-by: Roberto Sassu <roberto.sassu(a)huawei.com>
---
security/integrity/ima/ima_crypto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/integrity/ima/ima_crypto.c b/security/integrity/ima/ima_crypto.c
index 423c84f95a14..8ab17aa867dd 100644
--- a/security/integrity/ima/ima_crypto.c
+++ b/security/integrity/ima/ima_crypto.c
@@ -436,7 +436,7 @@ int ima_calc_file_hash(struct file *file, struct ima_digest_data *hash)
*/
pr_info_ratelimited("Unable to reopen file for reading.\n");
f = file;
- f->f_flags |= FMODE_READ;
+ f->f_mode |= FMODE_READ;
modified_flags = true;
} else {
new_file_instance = true;
@@ -456,7 +456,7 @@ int ima_calc_file_hash(struct file *file, struct ima_digest_data *hash)
if (new_file_instance)
fput(f);
else if (modified_flags)
- f->f_flags &= ~FMODE_READ;
+ f->f_mode &= ~FMODE_READ;
return rc;
}
--
2.17.1
From: Takashi Iwai <tiwai(a)suse.de>
[ Upstream commit 25faa4bd37c10f19e4b848b9032a17a3d44c6f09 ]
At the error path of the firmware loading error, the driver tries to
release the card object and set NULL to drvdata. This may be referred
badly at the possible PM action, as the driver itself is still bound
and the PM callbacks read the card object.
Instead, we continue the probing as if it were no option set. This is
often a better choice than the forced abort, too.
Fixes: 5cb543dba986 ("ALSA: hda - Deferred probing with request_firmware_nowait()")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207043
Link: https://lore.kernel.org/r/20200413082034.25166-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
sound/pci/hda/hda_intel.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 3e3277100f08a..0fa0c33660087 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1839,24 +1839,15 @@ static void azx_firmware_cb(const struct firmware *fw, void *context)
{
struct snd_card *card = context;
struct azx *chip = card->private_data;
- struct pci_dev *pci = chip->pci;
-
- if (!fw) {
- dev_err(card->dev, "Cannot load firmware, aborting\n");
- goto error;
- }
- chip->fw = fw;
+ if (fw)
+ chip->fw = fw;
+ else
+ dev_err(card->dev, "Cannot load firmware, continue without patching\n");
if (!chip->disabled) {
/* continue probing */
- if (azx_probe_continue(chip))
- goto error;
+ azx_probe_continue(chip);
}
- return; /* OK */
-
- error:
- snd_card_free(card);
- pci_set_drvdata(pci, NULL);
}
#endif
--
2.20.1
From: Jeremy Cline <jcline(a)redhat.com>
[ Upstream commit 4734b0fefbbf98f8c119eb8344efa19dac82cd2c ]
Builds of Fedora's kernel-tools package started to fail with "may be
used uninitialized" warnings for nl_pid in bpf_set_link_xdp_fd() and
bpf_get_link_xdp_info() on the s390 architecture.
Although libbpf_netlink_open() always returns a negative number when it
does not set *nl_pid, the compiler does not determine this and thus
believes the variable might be used uninitialized. Assuage gcc's fears
by explicitly initializing nl_pid.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1807781
Signed-off-by: Jeremy Cline <jcline(a)redhat.com>
Signed-off-by: Daniel Borkmann <daniel(a)iogearbox.net>
Acked-by: Andrii Nakryiko <andriin(a)fb.com>
Link: https://lore.kernel.org/bpf/20200404051430.698058-1-jcline@redhat.com
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
tools/lib/bpf/netlink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/netlink.c b/tools/lib/bpf/netlink.c
index ce3ec81b71c01..88416be2bf994 100644
--- a/tools/lib/bpf/netlink.c
+++ b/tools/lib/bpf/netlink.c
@@ -137,7 +137,7 @@ int bpf_set_link_xdp_fd(int ifindex, int fd, __u32 flags)
struct ifinfomsg ifinfo;
char attrbuf[64];
} req;
- __u32 nl_pid;
+ __u32 nl_pid = 0;
sock = libbpf_netlink_open(&nl_pid);
if (sock < 0)
@@ -254,7 +254,7 @@ int bpf_get_link_xdp_id(int ifindex, __u32 *prog_id, __u32 flags)
{
struct xdp_id_md xdp_id = {};
int sock, ret;
- __u32 nl_pid;
+ __u32 nl_pid = 0;
__u32 mask;
if (flags & ~XDP_FLAGS_MASK)
--
2.20.1
From: Xing Li <lixing(a)loongson.cn>
If a CPU support more than 32bit vmbits (which is true for 64bit CPUs),
VPN2_MASK set to fixed 0xffffe000 will lead to a wrong EntryHi in some
functions such as _kvm_mips_host_tlb_inv().
The cpu_vmbits definition of 32bit CPU in cpu-features.h is 31, so we
still use the old definition.
Cc: stable(a)vger.kernel.org
Signed-off-by: Xing Li <lixing(a)loongson.cn>
[Huacai: Improve commit messages]
Signed-off-by: Huacai Chen <chenhc(a)lemote.com>
---
arch/mips/include/asm/kvm_host.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h
index a01cee9..caa2b936 100644
--- a/arch/mips/include/asm/kvm_host.h
+++ b/arch/mips/include/asm/kvm_host.h
@@ -274,7 +274,11 @@ enum emulation_result {
#define MIPS3_PG_SHIFT 6
#define MIPS3_PG_FRAME 0x3fffffc0
+#if defined(CONFIG_64BIT)
+#define VPN2_MASK GENMASK(cpu_vmbits - 1, 13)
+#else
#define VPN2_MASK 0xffffe000
+#endif
#define KVM_ENTRYHI_ASID cpu_asid_mask(&boot_cpu_data)
#define TLB_IS_GLOBAL(x) ((x).tlb_lo[0] & (x).tlb_lo[1] & ENTRYLO_G)
#define TLB_VPN2(x) ((x).tlb_hi & VPN2_MASK)
--
2.7.0
Hello,
I found the following commit 25629fdaff2ff509dd0b3f5ff93d70a75e79e0a1
("net, ip_tunnel: fix interface lookup with no key") backported in the
following stable versions: v5.6.x, v5.5.x, v4.19.x, v4.14.x, v4.9.x,
v4.4.x.
However I cannot find it in v5.4.x yet. I checked stable queue on
netdev side (http://patchwork.ozlabs.org/bundle/davem/stable/?state=*)
but also main stable queue
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git
I was wondering whether it was an oversight or I was too hasty?
Sorry for the noise if I'm mistaken.
Best regards,
--
William