Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Will Deacon:
"The main one is a fix for a broken strscpy() conversion that landed in
the merge window and broke early parsing of the kernel command line.

- Fix an incorrect mask in the CXL PMU driver

- Fix a regression in early parsing of the kernel command line

- Fix an IP checksum OoB access reported by syzbot"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: csum: Fix OoB access in IP checksum code for negative lengths
arm64/sysreg: Fix broken strncpy() -> strscpy() conversion
perf: CXL: fix mismatched number of counters mask

+5 -5
+3 -3
arch/arm64/kernel/idreg-override.c
··· 262 262 if (!len) 263 263 return; 264 264 265 - len = strscpy(buf, cmdline, ARRAY_SIZE(buf)); 266 - if (len == -E2BIG) 267 - len = ARRAY_SIZE(buf) - 1; 265 + len = min(len, ARRAY_SIZE(buf) - 1); 266 + memcpy(buf, cmdline, len); 267 + buf[len] = '\0'; 268 268 269 269 if (strcmp(buf, "--") == 0) 270 270 return;
+1 -1
arch/arm64/lib/csum.c
··· 24 24 const u64 *ptr; 25 25 u64 data, sum64 = 0; 26 26 27 - if (unlikely(len == 0)) 27 + if (unlikely(len <= 0)) 28 28 return 0; 29 29 30 30 offset = (unsigned long)buff & 7;
+1 -1
drivers/perf/cxl_pmu.c
··· 25 25 #include "../cxl/pmu.h" 26 26 27 27 #define CXL_PMU_CAP_REG 0x0 28 - #define CXL_PMU_CAP_NUM_COUNTERS_MSK GENMASK_ULL(4, 0) 28 + #define CXL_PMU_CAP_NUM_COUNTERS_MSK GENMASK_ULL(5, 0) 29 29 #define CXL_PMU_CAP_COUNTER_WIDTH_MSK GENMASK_ULL(15, 8) 30 30 #define CXL_PMU_CAP_NUM_EVN_CAP_REG_SUP_MSK GENMASK_ULL(24, 20) 31 31 #define CXL_PMU_CAP_FILTERS_SUP_MSK GENMASK_ULL(39, 32)