6.6.89-rc1 review
Subsystems (5)
Greg Kroah-Hartman
maintainerPATCH 141/204 objtool: Silence more KCOV warnings
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 6b023c7842048c4bbeede802f3cf36b96c7a8b25 ]
In the past there were issues with KCOV triggering unreachable instruction warnings, which is why unreachable warnings are now disabled with CONFIG_KCOV.
Now some new KCOV warnings are showing up with GCC 14:
vmlinux.o: warning: objtool: cpuset_write_resmask() falls through to next function cpuset_update_active_cpus.cold() drivers/usb/core/driver.o: error: objtool: usb_deregister() falls through to next function usb_match_device() sound/soc/codecs/snd-soc-wcd934x.o: warning: objtool: .text.wcd934x_slim_irq_handler: unexpected end of section
All are caused by GCC KCOV not finishing an optimization, leaving behind a never-taken conditional branch to a basic block which falls through to the next function (or end of section).
At a high level this is similar to the unreachable warnings mentioned above, in that KCOV isn't fully removing dead code. Treat it the same way by adding these to the list of warnings to ignore with CONFIG_KCOV.
--- tools/objtool/check.c | 6 ++++++ 1 file changed, 6 insertions(+)
tools/objtool/check.c +6 -0
@@ -3569,6 +3569,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func, !strncmp(func->name, "__pfx_", 6))return 0 ; +if (file->ignore_unreachables) +return 0 ; +WARN ("%s() falls through to next function %s()" , func->name,insn_func (insn)->name);return 1 ;
@@ -3788,6 +3791,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,if (!next_insn) {if (state.cfi.cfa.base ==CFI_UNDEFINED )return 0 ; +if (file->ignore_unreachables) +return 0 ; +WARN ("%s: unexpected end of section" , sec->name);return 1 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 142/204 objtool, panic: Disable SMAP in __stack_chk_fail()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 72c774aa9d1e16bfd247096935e7dae194d84929 ]
__stack_chk_fail() can be called from uaccess-enabled code. Make sure uaccess gets disabled before calling panic().
Fixes the following warning:
kernel/trace/trace_branch.o: error: objtool: ftrace_likely_update+0x1ea: call to __stack_chk_fail() with UACCESS enabled
--- kernel/panic.c | 6 ++++++ tools/objtool/check.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-)
kernel/panic.c +6 -0
@@ -763,9 +763,15 @@ device_initcall(register_warn_debugfs);*/ __visible noinstr void __stack_chk_fail(void) { +unsigned long flags; +instrumentation_begin (); + flags =user_access_save (); +panic ("stack-protector: Kernel stack is corrupted in: %pB" ,__builtin_return_address (0 )); + +user_access_restore (flags);instrumentation_end (); }EXPORT_SYMBOL (__stack_chk_fail);
tools/objtool/check.c +4 -1
@@ -1225,12 +1225,15 @@ static const char *uaccess_safe_builtin[] = {"__ubsan_handle_load_invalid_value" ,/* STACKLEAK */ "stackleak_track_stack" , +/* TRACE_BRANCH_PROFILING */ +"ftrace_likely_update" , +/* STACKPROTECTOR */ +"__stack_chk_fail" ,/* misc */ "csum_partial_copy_generic" ,"copy_mc_fragile" ,"copy_mc_fragile_handle_tail" ,"copy_mc_enhanced_fast_string" , -"ftrace_likely_update" ,/* CONFIG_TRACE_BRANCH_PROFILING */ "rep_stos_alternative" ,"rep_movs_alternative" , "__copy_user_nocache",
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 143/204 objtool, ASoC: codecs: wcd934x: Remove potential undefined behavior in wcd934x_slim_irq_handler()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 060aed9c0093b341480770457093449771cf1496 ]
If 'port_id' is negative, the shift counts in wcd934x_slim_irq_handler() also become negative, resulting in undefined behavior due to shift out of bounds.
If I'm reading the code correctly, that appears to be not possible, but with KCOV enabled, Clang's range analysis isn't always able to determine that and generates undefined behavior.
As a result the code generation isn't optimal, and undefined behavior should be avoided regardless. Improve code generation and remove the undefined behavior by converting the signed variables to unsigned.
Fixes the following warning with UBSAN:
sound/soc/codecs/snd-soc-wcd934x.o: warning: objtool: .text.wcd934x_slim_irq_handler: unexpected end of section
--- sound/soc/codecs/wcd934x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wcd934x.c +1 -1
@@ -2281,7 +2281,7 @@ static irqreturn_t wcd934x_slim_irq_handler(int irq, void *data) {struct wcd934x_codec *wcd = data;unsigned long status =0 ; -int i, j, port_id; +unsigned int i, j, port_id;unsigned int val, int_val =0 ;irqreturn_t ret =IRQ_NONE ;bool tx;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 144/204 objtool, regulator: rk808: Remove potential undefined behavior in rk806_set_mode_dcdc()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 29c578c848402a34e8c8e115bf66cb6008b77062 ]
If 'ctr_bit' is negative, the shift counts become negative, causing a shift of bounds and undefined behavior.
Presumably that's not possible in normal operation, but the code generation isn't optimal. And undefined behavior should be avoided regardless.
Improve code generation and remove the undefined behavior by converting the signed variables to unsigned.
Fixes the following warning with an UBSAN kernel:
vmlinux.o: warning: objtool: rk806_set_mode_dcdc() falls through to next function rk806_get_mode_dcdc() vmlinux.o: warning: objtool: .text.rk806_set_mode_dcdc: unexpected end of section
--- drivers/regulator/rk808-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/rk808-regulator.c +2 -2
@@ -267,8 +267,8 @@ static const unsigned int rk817_buck1_4_ramp_table[] = {static int rk806_set_mode_dcdc (struct regulator_dev *rdev,unsigned int mode) { -int rid =rdev_get_id (rdev); -int ctr_bit, reg; +unsigned int rid =rdev_get_id (rdev); +unsigned int ctr_bit, reg; reg =RK806_POWER_FPWM_EN0 + rid /8 ; ctr_bit = rid %8 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 145/204 objtool, lkdtm: Obfuscate the do_nothing() pointer
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 05026ea01e95ffdeb0e5ac8fb7fb1b551e3a8726 ]
If execute_location()'s memcpy of do_nothing() gets inlined and unrolled by the compiler, it copies one word at a time:
mov 0x0(%rip),%rax R_X86_64_PC32 .text+0x1374
mov %rax,0x38(%rbx)
mov 0x0(%rip),%rax R_X86_64_PC32 .text+0x136c
mov %rax,0x30(%rbx)
...Those .text references point to the middle of the function, causing objtool to complain about their lack of ENDBR.
Prevent that by resolving the function pointer at runtime rather than build time. This fixes the following warning:
drivers/misc/lkdtm/lkdtm.o: warning: objtool: execute_location+0x23: relocation to !ENDBR: .text+0x1378
--- drivers/misc/lkdtm/perms.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/misc/lkdtm/perms.c +11 -3
@@ -28,6 +28,13 @@ static const unsigned long rodata = 0xAA55AA55;/* This is marked __ro_after_init, so it should ultimately be .rodata. */ static unsigned long ro_after_init__ro_after_init =0x55AA5500 ; +/* +* This is a pointer to do_nothing() which is initialized at runtime rather +* than build time to avoid objtool IBT validation warnings caused by an +* inlined unrolled memcpy() in execute_location(). +*/ +static void __ro_after_init *do_nothing_ptr; +/* * This just returns to the caller. It is designed to be copied into * non-executable memory regions.
@@ -65,13 +72,12 @@ static noinline __nocfi void execute_location(void *dst, bool write) {void (*func)(void );func_desc_t fdesc; -void *do_nothing_text =dereference_function_descriptor (do_nothing); -pr_info ("attempting ok execution at %px\n" , do_nothing_text); +pr_info ("attempting ok execution at %px\n" , do_nothing_ptr);do_nothing ();if (write ==CODE_WRITE ) { -memcpy (dst, do_nothing_text,EXEC_SIZE ); +memcpy (dst, do_nothing_ptr,EXEC_SIZE );flush_icache_range ((unsigned long )dst, (unsigned long )dst +EXEC_SIZE ); }
@@ -267,6 +273,8 @@ static void lkdtm_ACCESS_NULL(void)void __init lkdtm_perms_init (void ) { + do_nothing_ptr =dereference_function_descriptor (do_nothing); +/* Make sure we can write to __ro_after_init values during __init */ ro_after_init |=0xAA ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 146/204 qibfs: fix _another_ leak
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Al Viro <[email protected]>
[ Upstream commit bdb43af4fdb39f844ede401bdb1258f67a580a27 ]
failure to allocate inode => leaked dentry...
this one had been there since the initial merge; to be fair, if we are that far OOM, the odds of failing at that particular allocation are low...
--- drivers/infiniband/hw/qib/qib_fs.c | 1 + 1 file changed, 1 insertion(+)
drivers/infiniband/hw/qib/qib_fs.c +1 -0
@@ -55,6 +55,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry,struct inode *inode =new_inode (dir->i_sb);if (!inode) { +dput (dentry); error = -EPERM ; goto bail; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 147/204 ntb: reduce stack usage in idt_scan_mws
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
[ Upstream commit aff12700b8dd7422bfe2277696e192af4df9de8f ]
idt_scan_mws() puts a large fixed-size array on the stack and copies it into a smaller dynamically allocated array at the end. On 32-bit targets, the fixed size can easily exceed the warning limit for possible stack overflow:
drivers/ntb/hw/idt/ntb_hw_idt.c:1041:27: error: stack frame size (1032) exceeds limit (1024) in 'idt_scan_mws' [-Werror,-Wframe-larger-than]
Change it to instead just always use dynamic allocation for the array from the start. It's too big for the stack, but not actually all that much for a permanent allocation.
--- drivers/ntb/hw/idt/ntb_hw_idt.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)
drivers/ntb/hw/idt/ntb_hw_idt.c +7 -11
@@ -1041,7 +1041,7 @@ static inline char *idt_get_mw_name(enum idt_mw_type mw_type)static struct idt_mw_cfg *idt_scan_mws (struct idt_ntb_dev *ndev,int port,unsigned char *mw_cnt) { -struct idt_mw_cfg mws[IDT_MAX_NR_MWS ], *ret_mws; +struct idt_mw_cfg *mws;const struct idt_ntb_bar *bars;enum idt_mw_type mw_type;unsigned char widx, bidx, en_cnt;
@@ -1049,6 +1049,11 @@ static struct idt_mw_cfg *idt_scan_mws(struct idt_ntb_dev *ndev, int port,int aprt_size;u32 data; + mws =devm_kcalloc (&ndev->ntb.pdev->dev,IDT_MAX_NR_MWS , +sizeof (*mws),GFP_KERNEL ); +if (!mws) +return ERR_PTR (-ENOMEM ); +/* Retrieve the array of the BARs registers */ bars = portdata_tbl[port].bars;
@@ -1103,16 +1108,7 @@ static struct idt_mw_cfg *idt_scan_mws(struct idt_ntb_dev *ndev, int port, } } -/* Allocate memory for memory window descriptors */ - ret_mws =devm_kcalloc (&ndev->ntb.pdev->dev, *mw_cnt,sizeof (*ret_mws), -GFP_KERNEL ); -if (!ret_mws) -return ERR_PTR (-ENOMEM ); - -/* Copy the info of detected memory windows */ -memcpy (ret_mws, mws, (*mw_cnt)*sizeof (*ret_mws)); - -return ret_mws; +return mws; }/*
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 148/204 ntb_hw_amd: Add NTB PCI ID for new gen CPU
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Basavaraj Natikar <[email protected]>
[ Upstream commit bf8a7ce7e4c7267a6f5f2b2023cfc459b330b25e ]
Add NTB support for new generation of processor.
--- drivers/ntb/hw/amd/ntb_hw_amd.c | 1 + 1 file changed, 1 insertion(+)
drivers/ntb/hw/amd/ntb_hw_amd.c +1 -0
@@ -1318,6 +1318,7 @@ static const struct pci_device_id amd_ntb_pci_tbl[] = { { PCI_VDEVICE(AMD, 0x148b), (kernel_ulong_t)&dev_data[1] }, { PCI_VDEVICE(AMD, 0x14c0), (kernel_ulong_t)&dev_data[1] }, { PCI_VDEVICE(AMD, 0x14c3), (kernel_ulong_t)&dev_data[1] }, + { PCI_VDEVICE(AMD, 0x155a), (kernel_ulong_t)&dev_data[1] }, { PCI_VDEVICE(HYGON, 0x145b), (kernel_ulong_t)&dev_data[0] }, { 0, } };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 149/204 9p/net: fix improper handling of bogus negative read/write replies
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dominique Martinet <[email protected]>
[ Upstream commit d0259a856afca31d699b706ed5e2adf11086c73b ]
In p9_client_write() and p9_client_read_once(), if the server incorrectly replies with success but a negative write/read count then we would consider written (negative) <= rsize (positive) because both variables were signed.
Make variables unsigned to avoid this problem.
The reproducer linked below now fails with the following error instead of a null pointer deref:
9pnet: bogus RWRITE count (4294967295 > 3)
Message-ID: <[email protected]>
--- net/9p/client.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-)
net/9p/client.c +16 -14
@@ -1547,7 +1547,8 @@ p9_client_read_once(struct p9_fid *fid, u64 offset, struct iov_iter *to,struct p9_client *clnt = fid->clnt;struct p9_req_t *req;int count =iov_iter_count (to); -int rsize, received, non_zc =0 ; +u32 rsize, received; +bool non_zc = false;char *dataptr; *err =0 ;
@@ -1570,7 +1571,7 @@ p9_client_read_once(struct p9_fid *fid, u64 offset, struct iov_iter *to,0 ,11 ,"dqd" , fid->fid, offset, rsize); }else { - non_zc =1 ; + non_zc = true; req =p9_client_rpc (clnt,P9_TREAD ,"dqd" , fid->fid, offset, rsize); }
@@ -1591,11 +1592,11 @@ p9_client_read_once(struct p9_fid *fid, u64 offset, struct iov_iter *to,return 0 ; }if (rsize < received) { -pr_err ("bogus RREAD count (%d > %d)\n" , received, rsize); +pr_err ("bogus RREAD count (%u > %u)\n" , received, rsize); received = rsize; } -p9_debug (P9_DEBUG_9P ,"<<< RREAD count %d\n" , received); +p9_debug (P9_DEBUG_9P ,"<<< RREAD count %u\n" , received);if (non_zc) {int n =copy_to_iter (dataptr, received, to);
@@ -1622,9 +1623,9 @@ p9_client_write(struct p9_fid *fid, u64 offset, struct iov_iter *from, int *err) *err =0 ;while (iov_iter_count (from)) { -int count =iov_iter_count (from); -int rsize = fid->iounit; -int written; +size_t count =iov_iter_count (from); +u32 rsize = fid->iounit; +u32 written;if (!rsize || rsize > clnt->msize -P9_IOHDRSZ ) rsize = clnt->msize -P9_IOHDRSZ ;
@@ -1632,7 +1633,7 @@ p9_client_write(struct p9_fid *fid, u64 offset, struct iov_iter *from, int *err)if (count < rsize) rsize = count; -p9_debug (P9_DEBUG_9P ,">>> TWRITE fid %d offset %llu count %d (/%d)\n" , +p9_debug (P9_DEBUG_9P ,">>> TWRITE fid %d offset %llu count %u (/%zu)\n" , fid->fid, offset, rsize, count);/* Don't bother zerocopy for small IO (< 1024) */
@@ -1658,11 +1659,11 @@ p9_client_write(struct p9_fid *fid, u64 offset, struct iov_iter *from, int *err)break ; }if (rsize < written) { -pr_err ("bogus RWRITE count (%d > %d)\n" , written, rsize); +pr_err ("bogus RWRITE count (%u > %u)\n" , written, rsize); written = rsize; } -p9_debug (P9_DEBUG_9P ,"<<< RWRITE count %d\n" , written); +p9_debug (P9_DEBUG_9P ,"<<< RWRITE count %u\n" , written);p9_req_put (clnt, req);iov_iter_revert (from, count - written -iov_iter_count (from));
@@ -2049,7 +2050,8 @@ EXPORT_SYMBOL_GPL(p9_client_xattrcreate);int p9_client_readdir (struct p9_fid *fid,char *data,u32 count,u64 offset) { -int err, rsize, non_zc =0 ; +int err, non_zc =0 ; +u32 rsize;struct p9_client *clnt;struct p9_req_t *req;char *dataptr;
@@ -2058,7 +2060,7 @@ int p9_client_readdir(struct p9_fid *fid, char *data, u32 count, u64 offset)iov_iter_kvec (&to,ITER_DEST , &kv,1 , count); -p9_debug (P9_DEBUG_9P ,">>> TREADDIR fid %d offset %llu count %d\n" , +p9_debug (P9_DEBUG_9P ,">>> TREADDIR fid %d offset %llu count %u\n" , fid->fid, offset, count); clnt = fid->clnt;
@@ -2093,11 +2095,11 @@ int p9_client_readdir(struct p9_fid *fid, char *data, u32 count, u64 offset) goto free_and_error; }if (rsize < count) { -pr_err ("bogus RREADDIR count (%d > %d)\n" , count, rsize); +pr_err ("bogus RREADDIR count (%u > %u)\n" , count, rsize); count = rsize; } -p9_debug (P9_DEBUG_9P ,"<<< RREADDIR count %d\n" , count); +p9_debug (P9_DEBUG_9P ,"<<< RREADDIR count %u\n" , count);if (non_zc)memmove (data, dataptr, count);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 150/204 rtc: pcf85063: do a SW reset if POR failed
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Stockmann <[email protected]>
[ Upstream commit 2b7cbd98495f6ee4cd6422fe77828a19e9edf87f ]
Power-on Reset has a documented issue in PCF85063, refer to its datasheet, section "Software reset":
"There is a low probability that some devices will have corruption of the registers after the automatic power-on reset if the device is powered up with a residual VDD level. It is required that the VDD starts at zero volts at power up or upon power cycling to ensure that there is no corruption of the registers. If this is not possible, a reset must be initiated after power-up (i.e. when power is stable) with the software reset command"
Trigger SW reset if there is an indication that POR has failed.
--- drivers/rtc/rtc-pcf85063.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
drivers/rtc/rtc-pcf85063.c +18 -1
@@ -35,6 +35,7 @@#define PCF85063_REG_CTRL1_CAP_SEL BIT(0)#define PCF85063_REG_CTRL1_STOP BIT(5)#define PCF85063_REG_CTRL1_EXT_TEST BIT(7) +#define PCF85063_REG_CTRL1_SWR 0x58#define PCF85063_REG_CTRL2 0x01#define PCF85063_CTRL2_AF BIT(6)
@@ -589,7 +590,7 @@ static int pcf85063_probe(struct i2c_client *client)i2c_set_clientdata (client, pcf85063); - err =regmap_read (pcf85063->regmap,PCF85063_REG_CTRL1 , &tmp); + err =regmap_read (pcf85063->regmap,PCF85063_REG_SC , &tmp);if (err) {dev_err (&client->dev,"RTC chip is not present\n" );return err;
@@ -599,6 +600,22 @@ static int pcf85063_probe(struct i2c_client *client)if (IS_ERR (pcf85063->rtc))return PTR_ERR (pcf85063->rtc); +/* +* If a Power loss is detected, SW reset the device. +* From PCF85063A datasheet: +* There is a low probability that some devices will have corruption +* of the registers after the automatic power-on reset... +*/ +if (tmp &PCF85063_REG_SC_OS ) { +dev_warn (&client->dev, +"POR issue detected, sending a SW reset\n" ); + err =regmap_write (pcf85063->regmap,PCF85063_REG_CTRL1 , +PCF85063_REG_CTRL1_SWR ); +if (err <0 ) +dev_warn (&client->dev, +"SW reset failed, trying to continue\n" ); + } + err =pcf85063_load_capacitance (pcf85063, client->dev.of_node, config->force_cap_7000 ?7000 :0 );if (err <0 )
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 151/204 io_uring: always do atomic put from iowq
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavel Begunkov <[email protected]>
[ Upstream commit 390513642ee6763c7ada07f0a1470474986e6c1c ]
io_uring always switches requests to atomic refcounting for iowq execution before there is any parallilism by setting REQ_F_REFCOUNT, and the flag is not cleared until the request completes. That should be fine as long as the compiler doesn't make up a non existing value for the flags, however KCSAN still complains when the request owner changes oter flag bits:
BUG: KCSAN: data-race in io_req_task_cancel / io_wq_free_work
...
read to 0xffff888117207448 of 8 bytes by task 3871 on cpu 0:
req_ref_put_and_test io_uring/refs.h:22 [inline]
Skip REQ_F_REFCOUNT checks for iowq, we know it's set.
--- io_uring/io_uring.c | 2 +- io_uring/refs.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
io_uring/io_uring.c +1 -1
@@ -1917,7 +1917,7 @@ struct io_wq_work *io_wq_free_work(struct io_wq_work *work) struct io_kiocb *req = container_of(work, struct io_kiocb, work);struct io_kiocb *nxt =NULL ; -if (req_ref_put_and_test (req)) { +if (req_ref_put_and_test_atomic (req)) {if (req->flags &IO_REQ_LINK_FLAGS ) nxt =io_req_find_next (req);io_free_req (req);
io_uring/refs.h +7 -0
@@ -17,6 +17,13 @@ static inline bool req_ref_inc_not_zero(struct io_kiocb *req)return atomic_inc_not_zero (&req->refs); } +static inline bool req_ref_put_and_test_atomic (struct io_kiocb *req) +{ +WARN_ON_ONCE (!(data_race (req->flags) &REQ_F_REFCOUNT )); +WARN_ON_ONCE (req_ref_zero_or_close_to_overflow (req)); +return atomic_dec_and_test (&req->refs); +} +static inline bool req_ref_put_and_test (struct io_kiocb *req) {if (likely (!(req->flags &REQ_F_REFCOUNT )))
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 152/204 sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oleg Nesterov <[email protected]>
[ Upstream commit 975776841e689dd8ba36df9fa72ac3eca3c2957a ]
kernel/sched/isolation.c obviously makes no sense without CONFIG_SMP, but the Kconfig entry we have right now:
config CPU_ISOLATION bool "CPU isolation" depends on SMP || COMPILE_TEST
allows the creation of pointless .config's which cause build failures.
--- init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
init/Kconfig +1 -1
@@ -689,7 +689,7 @@ endmenu # "CPU/Task time and stats accounting" config CPU_ISOLATION bool "CPU isolation" - depends on SMP || COMPILE_TEST + depends on SMP default y help Make sure that CPUs running critical tasks are not disturbed by
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 153/204 KVM: s390: Dont use %pK through tracepoints
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh <[email protected]>
[ Upstream commit 6c9567e0850be2f0f94ab64fa6512413fd1a1eb1 ]
Restricted pointers ("%pK") are not meant to be used through TP_format(). It can unintentionally expose security sensitive, raw pointer values.
Use regular pointer formatting instead.
Message-ID: <20250217-restricted-pointers-s390-v1-1-0e4ace75d8aa@linutronix.de>
--- arch/s390/kvm/trace-s390.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/s390/kvm/trace-s390.h +2 -2
@@ -56,7 +56,7 @@ TRACE_EVENT(kvm_s390_create_vcpu, __entry->sie_block = sie_block; ), -TP_printk ("create cpu %d at 0x%pK, sie block at 0x%pK" , +TP_printk ("create cpu %d at 0x%p, sie block at 0x%p" , __entry->id, __entry->vcpu, __entry->sie_block) );
@@ -255,7 +255,7 @@ TRACE_EVENT(kvm_s390_enable_css, __entry->kvm = kvm; ), -TP_printk ("enabling channel I/O support (kvm @ %pK)\n" , +TP_printk ("enabling channel I/O support (kvm @ %p)\n" , __entry->kvm) );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 154/204 KVM: s390: Dont use %pK through debug printing
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh <[email protected]>
[ Upstream commit 0c7fbae5bc782429c97d68dc40fb126748d7e352 ]
Restricted pointers ("%pK") are only meant to be used when directly printing to a file from task context.
Otherwise it can unintentionally expose security sensitive, raw pointer values.
Use regular pointer formatting instead.
Message-ID: <20250217-restricted-pointers-s390-v1-2-0e4ace75d8aa@linutronix.de>
--- arch/s390/kvm/intercept.c | 2 +- arch/s390/kvm/interrupt.c | 8 ++++---- arch/s390/kvm/kvm-s390.c | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-)
arch/s390/kvm/intercept.c +1 -1
@@ -94,7 +94,7 @@ static int handle_validity(struct kvm_vcpu *vcpu) vcpu->stat.exit_validity++;trace_kvm_s390_intercept_validity (vcpu, viwhy); -KVM_EVENT (3 ,"validity intercept 0x%x for pid %u (kvm 0x%pK)" , viwhy, +KVM_EVENT (3 ,"validity intercept 0x%x for pid %u (kvm 0x%p)" , viwhy, current->pid, vcpu->kvm);/* do not warn on invalid runtime instrumentation mode */
arch/s390/kvm/interrupt.c +4 -4
@@ -3161,7 +3161,7 @@ void kvm_s390_gisa_clear(struct kvm *kvm)if (!gi->origin)return ;gisa_clear_ipm (gi->origin); -VM_EVENT (kvm,3 ,"gisa 0x%pK cleared" , gi->origin); +VM_EVENT (kvm,3 ,"gisa 0x%p cleared" , gi->origin); }void kvm_s390_gisa_init (struct kvm *kvm)
@@ -3178,7 +3178,7 @@ void kvm_s390_gisa_init(struct kvm *kvm) gi->timer.function = gisa_vcpu_kicker;memset (gi->origin,0 ,sizeof (struct kvm_s390_gisa )); gi->origin->next_alert = (u32 )virt_to_phys (gi->origin); -VM_EVENT (kvm,3 ,"gisa 0x%pK initialized" , gi->origin); +VM_EVENT (kvm,3 ,"gisa 0x%p initialized" , gi->origin); }void kvm_s390_gisa_enable (struct kvm *kvm)
@@ -3219,7 +3219,7 @@ void kvm_s390_gisa_destroy(struct kvm *kvm)process_gib_alert_list ();hrtimer_cancel (&gi->timer); gi->origin =NULL ; -VM_EVENT (kvm,3 ,"gisa 0x%pK destroyed" , gisa); +VM_EVENT (kvm,3 ,"gisa 0x%p destroyed" , gisa); }void kvm_s390_gisa_disable (struct kvm *kvm)
@@ -3468,7 +3468,7 @@ int __init kvm_s390_gib_init(u8 nisc) } } -KVM_EVENT (3 ,"gib 0x%pK (nisc=%d) initialized" , gib, gib->nisc); +KVM_EVENT (3 ,"gib 0x%p (nisc=%d) initialized" , gib, gib->nisc); goto out; out_unreg_gal:
arch/s390/kvm/kvm-s390.c +5 -5
@@ -990,7 +990,7 @@ static int kvm_s390_set_mem_control(struct kvm *kvm, struct kvm_device_attr *att }mutex_unlock (&kvm->lock);VM_EVENT (kvm,3 ,"SET: max guest address: %lu" , new_limit); -VM_EVENT (kvm,3 ,"New guest asce: 0x%pK" , +VM_EVENT (kvm,3 ,"New guest asce: 0x%p" , (void *) kvm->arch.gmap->asce);break ; }
@@ -3418,7 +3418,7 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)kvm_s390_gisa_init (kvm);INIT_LIST_HEAD (&kvm->arch.pv.need_cleanup); kvm->arch.pv.set_aside =NULL ; -KVM_EVENT (3 ,"vm 0x%pK created by pid %u" , kvm, current->pid); +KVM_EVENT (3 ,"vm 0x%p created by pid %u" , kvm, current->pid);return 0 ; out_err:
@@ -3481,7 +3481,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm)kvm_s390_destroy_adapters (kvm);kvm_s390_clear_float_irqs (kvm);kvm_s390_vsie_destroy (kvm); -KVM_EVENT (3 ,"vm 0x%pK destroyed" , kvm); +KVM_EVENT (3 ,"vm 0x%p destroyed" , kvm); }/* Section: vcpu related */
@@ -3602,7 +3602,7 @@ static int sca_switch_to_extended(struct kvm *kvm)free_page ((unsigned long )old_sca); -VM_EVENT (kvm,2 ,"Switched to ESCA (0x%pK -> 0x%pK)" , +VM_EVENT (kvm,2 ,"Switched to ESCA (0x%p -> 0x%p)" , old_sca, kvm->arch.sca);return 0 ; }
@@ -3974,7 +3974,7 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu) goto out_free_sie_block; } -VM_EVENT (vcpu->kvm,3 ,"create cpu %d at 0x%pK, sie block at 0x%pK" , +VM_EVENT (vcpu->kvm,3 ,"create cpu %d at 0x%p, sie block at 0x%p" , vcpu->vcpu_id, vcpu, vcpu->arch.sie_block);trace_kvm_s390_create_vcpu (vcpu->vcpu_id, vcpu, vcpu->arch.sie_block);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 155/204 udmabuf: fix a buf size overflow issue during udmabuf creation
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiaogang Chen <[email protected]>
[ Upstream commit 021ba7f1babd029e714d13a6bf2571b08af96d0f ]
by casting size_limit_mb to u64 when calculate pglimit.
--- drivers/dma-buf/udmabuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/udmabuf.c +1 -1
@@ -214,7 +214,7 @@ static long udmabuf_create(struct miscdevice *device,if (!ubuf)return -ENOMEM ; - pglimit = (size_limit_mb *1024 *1024 ) >>PAGE_SHIFT ; + pglimit = ((u64 )size_limit_mb *1024 *1024 ) >>PAGE_SHIFT ;for (i =0 ; i < head->count; i++) {if (!IS_ALIGNED (list[i].offset,PAGE_SIZE )) goto err;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 156/204 selftests: ublk: fix test_stripe_04
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Lei <[email protected]>
[ Upstream commit 72070e57b0a518ec8e562a2b68fdfc796ef5c040 ]
Commit 57ed58c13256 ("selftests: ublk: enable zero copy for stripe target") added test entry of test_stripe_04, but forgot to add the test script.
So fix the test by adding the script file.
--- .../testing/selftests/ublk/test_stripe_04.sh | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 tools/testing/selftests/ublk/test_stripe_04.sh
tools/testing/selftests/ublk/test_stripe_04.sh new file +24 -0
@@ -0,0 +1,24 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +. "$(cd "$(dirname "$0")" && pwd)"/test_common.sh + +TID="stripe_04" +ERR_CODE=0 + +_prep_test "stripe" "mkfs & mount & umount on zero copy" + +backfile_0=$(_create_backfile 256M) +backfile_1=$(_create_backfile 256M) +dev_id=$(_add_ublk_dev -t stripe -z -q 2 "$backfile_0" "$backfile_1") +_check_add_dev $TID $? "$backfile_0" "$backfile_1" + +_mkfs_mount_test /dev/ublkb"${dev_id}" +ERR_CODE=$? + +_cleanup_test "stripe" + +_remove_backfile "$backfile_0" +_remove_backfile "$backfile_1" + +_show_result $TID $ERR_CODE
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 157/204 perf/core: Fix WARN_ON(!ctx) in __free_event() for partial init
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gabriel Shahrouzi <[email protected]>
[ Upstream commit 0ba3a4ab76fd3367b9cb680cad70182c896c795c ]
Move the get_ctx(child_ctx) call and the child_event->ctx assignment to occur immediately after the child event is allocated. Ensure that child_event->ctx is non-NULL before any subsequent error path within inherit_event calls free_event(), satisfying the assumptions of the cleanup code.
Details:
There's no clear Fixes tag, because this bug is a side-effect of multiple interacting commits over time (up to 15 years old), not a single regression.
The code initially incremented refcount then assigned context immediately after the child_event was created. Later, an early validity check for child_event was added before the refcount/assignment. Even later, a WARN_ON_ONCE() cleanup check was added, assuming event->ctx is valid if the pmu_ctx is valid. The problem is that the WARN_ON_ONCE() could trigger after the initial check passed but before child_event->ctx was assigned, violating its precondition. The solution is to assign child_event->ctx right after its initial validation. This ensures the context exists for any subsequent checks or cleanup routines, resolving the WARN_ON_ONCE().
To resolve it, defer the refcount update and child_event->ctx assignment directly after child_event->pmu_ctx is set but before checking if the parent event is orphaned. The cleanup routine depends on event->pmu_ctx being non-NULL before it verifies event->ctx is non-NULL. This also maintains the author's original intent of passing in child_ctx to find_get_pmu_context before its refcount/assignment.
[ mingo: Expanded the changelog from another email by Gabriel Shahrouzi. ]
--- kernel/events/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/events/core.c +3 -3
@@ -13419,6 +13419,9 @@ inherit_event(struct perf_event *parent_event,if (IS_ERR (child_event))return child_event; +get_ctx (child_ctx); + child_event->ctx = child_ctx; + pmu_ctx =find_get_pmu_context (child_event->pmu, child_ctx, child_event);if (IS_ERR (pmu_ctx)) {free_event (child_event);
@@ -13441,8 +13444,6 @@ inherit_event(struct perf_event *parent_event,return NULL ; } -get_ctx (child_ctx); -/* * Make the child state follow the state of the parent event, * not its attr.disabled bit. We hold the parent's mutex,
@@ -13463,7 +13464,6 @@ inherit_event(struct perf_event *parent_event,local64_set (&hwc->period_left, sample_period); } - child_event->ctx = child_ctx; child_event->overflow_handler = parent_event->overflow_handler; child_event->overflow_handler_context = parent_event->overflow_handler_context;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 158/204 xen: Change xen-acpi-processor dom0 dependency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Andryuk <[email protected]>
[ Upstream commit 0f2946bb172632e122d4033e0b03f85230a29510 ]
xen-acpi-processor functions under a PVH dom0 with only a xen_initial_domain() runtime check. Change the Kconfig dependency from PV dom0 to generic dom0 to reflect that.
Message-ID: <[email protected]>
--- drivers/xen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/Kconfig +1 -1
@@ -278,7 +278,7 @@ config XEN_PRIVCMD_IRQFD config XEN_ACPI_PROCESSOR tristate "Xen ACPI processor" - depends on XEN && XEN_PV_DOM0 && X86 && ACPI_PROCESSOR && CPU_FREQ + depends on XEN && XEN_DOM0 && X86 && ACPI_PROCESSOR && CPU_FREQ default m help This ACPI processor uploads Power Management information to the Xen
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 159/204 nvme: requeue namespace scan on missed AENs
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Reinecke <[email protected]>
[ Upstream commit 9546ad1a9bda7362492114f5866b95b0ac4a100e ]
Scanning for namespaces can take some time, so if the target is reconfigured while the scan is running we may miss a Attached Namespace Attribute Changed AEN.
Check if the NVME_AER_NOTICE_NS_CHANGED bit is set once the scan has finished, and requeue scanning to pick up any missed change.
--- drivers/nvme/host/core.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/nvme/host/core.c +4 -0
@@ -3972,6 +3972,10 @@ static void nvme_scan_work(struct work_struct *work)nvme_scan_ns_sequential (ctrl); }mutex_unlock (&ctrl->scan_lock); + +/* Requeue if we have missed AENs */ +if (test_bit (NVME_AER_NOTICE_NS_CHANGED , &ctrl->events)) +nvme_queue_scan (ctrl); }/*
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 160/204 ACPI: EC: Set ec_no_wakeup for Lenovo Go S
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello <[email protected]>
[ Upstream commit b988685388effd648150aab272533f833a2a70f0 ]
When AC adapter is unplugged or plugged in EC wakes from HW sleep but APU doesn't enter back into HW sleep.
The reason this happens is that, when the APU exits HW sleep, the power rails controlled by the EC will power up the TCON. The TCON has a GPIO that will be toggled at this time. The GPIO is not marked as a wakeup source, but the GPIO controller still has an unserviced interrupt. Unserviced interrupts will block entering HW sleep again. Clearing the GPIO doesn't help as the TCON continues to assert it until it's been initialized by i2c-hid.
Fixing this would require TCON F/W changes and it's already broken in the wild on production hardware.
To avoid triggering this issue add a quirk to avoid letting EC wake up system at all. The power button still works properly on this system.
--- drivers/acpi/ec.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
drivers/acpi/ec.c +28 -0
@@ -2301,6 +2301,34 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = { DMI_MATCH(DMI_PRODUCT_FAMILY, "103C_5336AN HP ZHAN 66 Pro"), }, }, +/* +* Lenovo Legion Go S; touchscreen blocks HW sleep when woken up from EC +* https://gitlab.freedesktop.org/drm/amd/-/issues/3929 +*/ + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "83L3"), + } + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "83N6"), + } + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"), + } + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"), + } + }, { }, };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 161/204 ACPI PPTT: Fix coding mistakes in a couple of sizeof() calls
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jean-Marc Eurin <[email protected]>
[ Upstream commit 7ab4f0e37a0f4207e742a8de69be03984db6ebf0 ]
The end of table checks should be done with the structure size, but 2 of the 3 similar calls use the pointer size.
--- drivers/acpi/pptt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/pptt.c +2 -2
@@ -229,7 +229,7 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr, node_entry =ACPI_PTR_DIFF (node, table_hdr); entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,sizeof (struct acpi_table_pptt )); - proc_sz =sizeof (struct acpi_pptt_processor *); + proc_sz =sizeof (struct acpi_pptt_processor );while ((unsigned long )entry + proc_sz < table_end) { cpu_node = (struct acpi_pptt_processor *)entry;
@@ -270,7 +270,7 @@ static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_he table_end = (unsigned long )table_hdr + table_hdr->length; entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,sizeof (struct acpi_table_pptt )); - proc_sz =sizeof (struct acpi_pptt_processor *); + proc_sz =sizeof (struct acpi_pptt_processor );/* find the processor structure associated with this cpuid */ while ((unsigned long )entry + proc_sz < table_end) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 162/204 nvme: re-read ANA log page after ns scan completes
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Reinecke <[email protected]>
[ Upstream commit 62baf70c327444338c34703c71aa8cc8e4189bd6 ]
When scanning for new namespaces we might have missed an ANA AEN.
The NVMe base spec (NVMe Base Specification v2.1, Figure 151 'Asynchonous Event Information - Notice': Asymmetric Namespace Access Change) states:
A controller shall not send this even if an Attached Namespace Attribute Changed asynchronous event [...] is sent for the same event.
so we need to re-read the ANA log page after we rescanned the namespace list to update the ANA states of the new namespaces.
--- drivers/nvme/host/core.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/nvme/host/core.c +5 -0
@@ -3976,6 +3976,11 @@ static void nvme_scan_work(struct work_struct *work)/* Requeue if we have missed AENs */ if (test_bit (NVME_AER_NOTICE_NS_CHANGED , &ctrl->events))nvme_queue_scan (ctrl); +#ifdef CONFIG_NVME_MULTIPATH + else +/* Re-read the ANA log page to not miss updates */ + queue_work(nvme_wq, &ctrl->ana_work); +#endif }/*
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 163/204 nvme: multipath: fix return value of nvme_available_path
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uday Shankar <[email protected]>
[ Upstream commit e3105f54a51554fb1bbf19dcaf93c4411d2d6c8a ]
The function returns bool so we should return false, not NULL. No functional changes are expected.
--- drivers/nvme/host/multipath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/multipath.c +1 -1
@@ -426,7 +426,7 @@ static bool nvme_available_path(struct nvme_ns_head *head)struct nvme_ns *ns;if (!test_bit (NVME_NSHEAD_DISK_LIVE , &head->flags)) -return NULL ; +return false;list_for_each_entry_srcu (ns, &head->list, siblings,srcu_read_lock_held (&head->srcu)) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 164/204 objtool: Stop UNRET validation on UD2
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 9f9cc012c2cbac4833746a0182e06a8eec940d19 ]
In preparation for simplifying INSN_SYSCALL, make validate_unret() terminate control flow on UD2 just like validate_branch() already does.
--- tools/objtool/check.c | 3 +++ 1 file changed, 3 insertions(+)
tools/objtool/check.c +3 -0
@@ -3949,6 +3949,9 @@ static int validate_unret(struct objtool_file *file, struct instruction *insn)break ; } +if (insn->dead_end) +return 0 ; +if (!next) {WARN_INSN (insn,"teh end!" );return -1 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 165/204 gpiolib: of: Move Atmel HSMCI quirk up out of the regulator comment
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
[ Upstream commit b8c7a1ac884cc267d1031f8de07f1a689a69fbab ]
The regulator comment in of_gpio_set_polarity_by_property() made on top of a couple of the cases, while Atmel HSMCI quirk is not related to that. Make it clear by moving Atmel HSMCI quirk up out of the scope of the regulator comment.
--- drivers/gpio/gpiolib-of.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpio/gpiolib-of.c +3 -3
@@ -247,6 +247,9 @@ static void of_gpio_set_polarity_by_property(const struct device_node *np, { "fsl,imx8qm-fec", "phy-reset-gpios", "phy-reset-active-high" }, { "fsl,s32v234-fec", "phy-reset-gpios", "phy-reset-active-high" }, #endif +#if IS_ENABLED(CONFIG_MMC_ATMELMCI) + { "atmel,hsmci", "cd-gpios", "cd-inverted" }, +#endif #if IS_ENABLED(CONFIG_PCI_IMX6) { "fsl,imx6q-pcie", "reset-gpio", "reset-gpio-active-high" }, { "fsl,imx6sx-pcie", "reset-gpio", "reset-gpio-active-high" },
@@ -272,9 +275,6 @@ static void of_gpio_set_polarity_by_property(const struct device_node *np, #if IS_ENABLED(CONFIG_REGULATOR_GPIO) { "regulator-gpio", "enable-gpio", "enable-active-high" }, { "regulator-gpio", "enable-gpios", "enable-active-high" }, -#endif -#if IS_ENABLED(CONFIG_MMC_ATMELMCI) - { "atmel,hsmci", "cd-gpios", "cd-inverted" }, #endif }; unsigned int i;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 166/204 selftests/mincore: Allow read-ahead pages to reach the end of the file
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qiuxu Zhuo <[email protected]>
[ Upstream commit 197c1eaa7ba633a482ed7588eea6fd4aa57e08d4 ]
When running the mincore_selftest on a system with an XFS file system, it failed the "check_file_mmap" test case due to the read-ahead pages reaching the end of the file. The failure log is as below:
RUN global.check_file_mmap ...
mincore_selftest.c:264:check_file_mmap:Expected i (1024) < vec_size (1024) mincore_selftest.c:265:check_file_mmap:Read-ahead pages reached the end of the file
check_file_mmap: Test failed
FAIL global.check_file_mmap
This is because the read-ahead window size of the XFS file system on this machine is 4 MB, which is larger than the size from the #PF address to the end of the file. As a result, all the pages for this file are populated.
blockdev --getra /dev/nvme0n1p5
8192
blockdev --getbsz /dev/nvme0n1p5
512This issue can be fixed by extending the current FILE_SIZE 4MB to a larger number, but it will still fail if the read-ahead window size of the file system is larger enough. Additionally, in the real world, read-ahead pages reaching the end of the file can happen and is an expected behavior. Therefore, allowing read-ahead pages to reach the end of the file is a better choice for the "check_file_mmap" test case.
--- tools/testing/selftests/mincore/mincore_selftest.c | 3 --- 1 file changed, 3 deletions(-)
tools/testing/selftests/mincore/mincore_selftest.c +0 -3
@@ -261,9 +261,6 @@ TEST(check_file_mmap)TH_LOG ("No read-ahead pages found in memory" ); } - EXPECT_LT(i, vec_size) { -TH_LOG ("Read-ahead pages reached the end of the file" ); - }/* * End of the readahead window. The rest of the pages shouldn't * be in memory.
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 167/204 x86/bugs: Use SBPB in write_ibpb() if applicable
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit fc9fd3f98423367c79e0bd85a9515df26dc1b3cc ]
write_ibpb() does IBPB, which (among other things) flushes branch type predictions on AMD. If the CPU has SRSO_NO, or if the SRSO mitigation has been disabled, branch type flushing isn't needed, in which case the lighter-weight SBPB can be used.
The 'x86_pred_cmd' variable already keeps track of whether IBPB or SBPB should be used. Use that instead of hardcoding IBPB.
--- arch/x86/entry/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/entry/entry.S +1 -1
@@ -16,7 +16,7 @@ SYM_FUNC_START(entry_ibpb) movl $MSR_IA32_PRED_CMD, %ecx - movl $PRED_CMD_IBPB, %eax + movl _ASM_RIP(x86_pred_cmd), %eax xorl %edx, %edx wrmsr
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 168/204 x86/bugs: Dont fill RSB on VMEXIT with eIBRS+retpoline
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 18bae0dfec15b24ec14ca17dc18603372f5f254f ]
eIBRS protects against guest->host RSB underflow/poisoning attacks. Adding retpoline to the mix doesn't change that. Retpoline has a balanced CALL/RET anyway.
So the current full RSB filling on VMEXIT with eIBRS+retpoline is overkill. Disable it or do the VMEXIT_LITE mitigation if needed.
--- arch/x86/kernel/cpu/bugs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/x86/kernel/cpu/bugs.c +4 -4
@@ -1600,20 +1600,20 @@ static void __init spectre_v2_determine_rsb_fill_type_at_vmexit(enum spectre_v2_case SPECTRE_V2_NONE :return ; -case SPECTRE_V2_EIBRS_LFENCE :case SPECTRE_V2_EIBRS : +case SPECTRE_V2_EIBRS_LFENCE : +case SPECTRE_V2_EIBRS_RETPOLINE :if (boot_cpu_has_bug (X86_BUG_EIBRS_PBRSB )) { -setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT_LITE );pr_info ("Spectre v2 / PBRSB-eIBRS: Retire a single CALL on VMEXIT\n" ); +setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT_LITE ); }return ; -case SPECTRE_V2_EIBRS_RETPOLINE :case SPECTRE_V2_RETPOLINE :case SPECTRE_V2_LFENCE :case SPECTRE_V2_IBRS : -setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT );pr_info ("Spectre v2 / SpectreRSB : Filling RSB on VMEXIT\n" ); +setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT );return ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 169/204 x86/bugs: Dont fill RSB on context switch with eIBRS
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 27ce8299bc1ec6df8306073785ff82b30b3cc5ee ]
User->user Spectre v2 attacks (including RSB) across context switches are already mitigated by IBPB in cond_mitigation(), if enabled globally or if either the prev or the next task has opted in to protection. RSB filling without IBPB serves no purpose for protecting user space, as indirect branches are still vulnerable.
User->kernel RSB attacks are mitigated by eIBRS. In which case the RSB filling on context switch isn't needed, so remove it.
--- arch/x86/kernel/cpu/bugs.c | 24 ++++++++++++------------ arch/x86/mm/tlb.c | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-)
arch/x86/kernel/cpu/bugs.c +12 -12
@@ -1574,7 +1574,7 @@ static void __init spec_ctrl_disable_kernel_rrsba(void) rrsba_disabled = true; } -static void __init spectre_v2_determine_rsb_fill_type_at_vmexit (enum spectre_v2_mitigation mode) +static void __init spectre_v2_select_rsb_mitigation (enum spectre_v2_mitigation mode) {/* * Similar to context switches, there are two types of RSB attacks
@@ -1598,7 +1598,7 @@ static void __init spectre_v2_determine_rsb_fill_type_at_vmexit(enum spectre_v2_*/ switch (mode) {case SPECTRE_V2_NONE : -return ; +break ;case SPECTRE_V2_EIBRS :case SPECTRE_V2_EIBRS_LFENCE :
@@ -1607,18 +1607,21 @@ static void __init spectre_v2_determine_rsb_fill_type_at_vmexit(enum spectre_v2_pr_info ("Spectre v2 / PBRSB-eIBRS: Retire a single CALL on VMEXIT\n" );setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT_LITE ); } -return ; +break ;case SPECTRE_V2_RETPOLINE :case SPECTRE_V2_LFENCE :case SPECTRE_V2_IBRS : -pr_info ("Spectre v2 / SpectreRSB : Filling RSB on VMEXIT\n" ); +pr_info ("Spectre v2 / SpectreRSB: Filling RSB on context switch and VMEXIT\n" ); +setup_force_cpu_cap (X86_FEATURE_RSB_CTXSW );setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT ); -return ; - } +break ; -pr_warn_once ("Unknown Spectre v2 mode, disabling RSB mitigation at VM exit" ); -dump_stack (); +default : +pr_warn_once ("Unknown Spectre v2 mode, disabling RSB mitigation\n" ); +dump_stack (); +break ; + } }/*
@@ -1844,10 +1847,7 @@ static void __init spectre_v2_select_mitigation(void)* * FIXME: Is this pointless for retbleed-affected AMD? */ -setup_force_cpu_cap (X86_FEATURE_RSB_CTXSW ); -pr_info ("Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch\n" ); - -spectre_v2_determine_rsb_fill_type_at_vmexit (mode); +spectre_v2_select_rsb_mitigation (mode);/* * Retpoline protects the kernel, but doesn't protect firmware. IBRS
arch/x86/mm/tlb.c +3 -3
@@ -392,9 +392,9 @@ static void cond_mitigation(struct task_struct *next) prev_mm =this_cpu_read (cpu_tlbstate.last_user_mm_spec);/* -* Avoid user/user BTB poisoning by flushing the branch predictor -* when switching between processes. This stops one process from -* doing Spectre-v2 attacks on another. +* Avoid user->user BTB/RSB poisoning by flushing them when switching +* between processes. This stops one process from doing Spectre-v2 +* attacks on another. * * Both, the conditional and the always IBPB mode use the mm * pointer to avoid the IBPB when switching between tasks of the
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 170/204 nvmet-fc: take tgtport reference only once
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Wagner <[email protected]>
[ Upstream commit b0b26ad0e1943de25ce82a7e5af3574f31b1cf99 ]
The reference counting code can be simplified. Instead taking a tgtport refrerence at the beginning of nvmet_fc_alloc_hostport and put it back if not a new hostport object is allocated, only take it when a new hostport object is allocated.
--- drivers/nvme/target/fc.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-)
drivers/nvme/target/fc.c +7 -15
@@ -1030,33 +1030,24 @@ nvmet_fc_alloc_hostport(struct nvmet_fc_tgtport *tgtport, void *hosthandle)struct nvmet_fc_hostport *newhost, *match =NULL ;unsigned long flags; +/* +* Caller holds a reference on tgtport. +*/ +/* if LLDD not implemented, leave as NULL */ if (!hosthandle)return NULL ; -/* -* take reference for what will be the newly allocated hostport if -* we end up using a new allocation -*/ -if (!nvmet_fc_tgtport_get (tgtport)) -return ERR_PTR (-EINVAL ); -spin_lock_irqsave (&tgtport->lock, flags); match =nvmet_fc_match_hostport (tgtport, hosthandle);spin_unlock_irqrestore (&tgtport->lock, flags); -if (match) { -/* no new allocation - release reference */ -nvmet_fc_tgtport_put (tgtport); +if (match)return match; - } newhost =kzalloc (sizeof (*newhost),GFP_KERNEL ); -if (!newhost) { -/* no new allocation - release reference */ -nvmet_fc_tgtport_put (tgtport); +if (!newhost)return ERR_PTR (-ENOMEM ); - }spin_lock_irqsave (&tgtport->lock, flags); match =nvmet_fc_match_hostport (tgtport, hosthandle);
@@ -1065,6 +1056,7 @@ nvmet_fc_alloc_hostport(struct nvmet_fc_tgtport *tgtport, void *hosthandle)kfree (newhost); newhost = match; }else { +nvmet_fc_tgtport_get (tgtport); newhost->tgtport = tgtport; newhost->hosthandle = hosthandle;INIT_LIST_HEAD (&newhost->host_list);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 171/204 nvmet-fc: put ref when assoc->del_work is already scheduled
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Wagner <[email protected]>
[ Upstream commit 70289ae5cac4d3a39575405aaf63330486cea030 ]
Do not leak the tgtport reference when the work is already scheduled.
--- drivers/nvme/target/fc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/target/fc.c +2 -1
@@ -1091,7 +1091,8 @@ static void nvmet_fc_schedule_delete_assoc(struct nvmet_fc_tgt_assoc *assoc) {nvmet_fc_tgtport_get (assoc->tgtport); -queue_work (nvmet_wq, &assoc->del_work); +if (!queue_work (nvmet_wq, &assoc->del_work)) +nvmet_fc_tgtport_put (assoc->tgtport); } static struct nvmet_fc_tgt_assoc *
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 172/204 cifs: Fix encoding of SMB1 Session Setup Kerberos Request in non-UNICODE mode
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pali Rohár <[email protected]>
[ Upstream commit 16cb6b0509b65ac89187e9402e0b7a9ddf1765ef ]
Like in UNICODE mode, SMB1 Session Setup Kerberos Request contains oslm and domain strings.
Extract common code into ascii_oslm_strings() and ascii_domain_string() functions (similar to unicode variants) and use these functions in non-UNICODE code path in sess_auth_kerberos().
Decision if non-UNICODE or UNICODE mode is used is based on the SMBFLG2_UNICODE flag in Flags2 packed field, and not based on the capabilities of server. Fix this check too.
--- fs/smb/client/sess.c | 60 +++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 20 deletions(-)
fs/smb/client/sess.c +40 -20
@@ -732,6 +732,22 @@ unicode_oslm_strings(char **pbcc_area, const struct nls_table *nls_cp) *pbcc_area = bcc_ptr; } +static void +ascii_oslm_strings (char **pbcc_area,const struct nls_table *nls_cp) +{ +char *bcc_ptr = *pbcc_area; + +strcpy (bcc_ptr,"Linux version " ); + bcc_ptr +=strlen ("Linux version " ); +strcpy (bcc_ptr,init_utsname ()->release); + bcc_ptr +=strlen (init_utsname ()->release) +1 ; + +strcpy (bcc_ptr,CIFS_NETWORK_OPSYS ); + bcc_ptr +=strlen (CIFS_NETWORK_OPSYS ) +1 ; + + *pbcc_area = bcc_ptr; +} +static void unicode_domain_string (char **pbcc_area,struct cifs_ses *ses,const struct nls_table *nls_cp) {
@@ -756,6 +772,25 @@ static void unicode_domain_string(char **pbcc_area, struct cifs_ses *ses, *pbcc_area = bcc_ptr; } +static void ascii_domain_string (char **pbcc_area,struct cifs_ses *ses, +const struct nls_table *nls_cp) +{ +char *bcc_ptr = *pbcc_area; +int len; + +/* copy domain */ +if (ses->domainName !=NULL ) { + len =strscpy (bcc_ptr, ses->domainName,CIFS_MAX_DOMAINNAME_LEN ); +if (WARN_ON_ONCE (len <0 )) + len =CIFS_MAX_DOMAINNAME_LEN -1 ; + bcc_ptr += len; + }/* else we send a null domain name so server will default to its own domain */ + *bcc_ptr =0 ; + bcc_ptr++; + + *pbcc_area = bcc_ptr; +} +static void unicode_ssetup_strings (char **pbcc_area,struct cifs_ses *ses,const struct nls_table *nls_cp) {
@@ -801,25 +836,10 @@ static void ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses, *bcc_ptr =0 ; bcc_ptr++;/* account for null termination */ -/* copy domain */ -if (ses->domainName !=NULL ) { - len =strscpy (bcc_ptr, ses->domainName,CIFS_MAX_DOMAINNAME_LEN ); -if (WARN_ON_ONCE (len <0 )) - len =CIFS_MAX_DOMAINNAME_LEN -1 ; - bcc_ptr += len; - }/* else we send a null domain name so server will default to its own domain */ - *bcc_ptr =0 ; - bcc_ptr++; -/* BB check for overflow here */ -strcpy (bcc_ptr,"Linux version " ); - bcc_ptr +=strlen ("Linux version " ); -strcpy (bcc_ptr,init_utsname ()->release); - bcc_ptr +=strlen (init_utsname ()->release) +1 ; - -strcpy (bcc_ptr,CIFS_NETWORK_OPSYS ); - bcc_ptr +=strlen (CIFS_NETWORK_OPSYS ) +1 ; +ascii_domain_string (&bcc_ptr, ses, nls_cp); +ascii_oslm_strings (&bcc_ptr, nls_cp); *pbcc_area = bcc_ptr; }
@@ -1622,7 +1642,7 @@ sess_auth_kerberos(struct sess_data *sess_data) sess_data->iov[1 ].iov_len = msg->secblob_len; pSMB->req.SecurityBlobLength =cpu_to_le16 (sess_data->iov[1 ].iov_len); -if (ses->capabilities &CAP_UNICODE ) { +if (pSMB->req.hdr.Flags2 &SMBFLG2_UNICODE ) {/* unicode strings must be word aligned */ if (!IS_ALIGNED (sess_data->iov[0 ].iov_len + sess_data->iov[1 ].iov_len,2 )) { *bcc_ptr =0 ;
@@ -1631,8 +1651,8 @@ sess_auth_kerberos(struct sess_data *sess_data)unicode_oslm_strings (&bcc_ptr, sess_data->nls_cp);unicode_domain_string (&bcc_ptr, ses, sess_data->nls_cp); }else { -/* BB: is this right? */ -ascii_ssetup_strings (&bcc_ptr, ses, sess_data->nls_cp); +ascii_oslm_strings (&bcc_ptr, sess_data->nls_cp); +ascii_domain_string (&bcc_ptr, ses, sess_data->nls_cp); } sess_data->iov[2].iov_len = (long) bcc_ptr -
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 173/204 timekeeping: Add a lockdep override in tick_freeze()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <[email protected]>
[ Upstream commit 92e250c624ea37fde64bfd624fd2556f0d846f18 ]
tick_freeze() acquires a raw spinlock (tick_freeze_lock). Later in the callchain (timekeeping_suspend() -> mc146818_avoid_UIP()) the RTC driver acquires a spinlock which becomes a sleeping lock on PREEMPT_RT. Lockdep complains about this lock nesting.
Add a lockdep override for this special case and a comment explaining why it is okay.
--- kernel/time/tick-common.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
kernel/time/tick-common.c +22 -0
@@ -495,6 +495,7 @@ void tick_resume(void)#ifdef CONFIG_SUSPEND static DEFINE_RAW_SPINLOCK (tick_freeze_lock); +static DEFINE_WAIT_OVERRIDE_MAP(tick_freeze_map, LD_WAIT_SLEEP);static unsigned int tick_freeze_depth;/**
@@ -514,9 +515,22 @@ void tick_freeze(void)if (tick_freeze_depth ==num_online_cpus ()) {trace_suspend_resume (TPS ("timekeeping_freeze" ),smp_processor_id (), true); +/* +* All other CPUs have their interrupts disabled and are +* suspended to idle. Other tasks have been frozen so there +* is no scheduling happening. This means that there is no +* concurrency in the system at this point. Therefore it is +* okay to acquire a sleeping lock on PREEMPT_RT, such as a +* spinlock, because the lock cannot be held by other CPUs +* or threads and acquiring it cannot block. +* +* Inform lockdep about the situation. +*/ +lock_map_acquire_try (&tick_freeze_map); system_state =SYSTEM_SUSPEND ;sched_clock_suspend ();timekeeping_suspend (); +lock_map_release (&tick_freeze_map); }else {tick_suspend_local (); }
@@ -538,8 +552,16 @@ void tick_unfreeze(void)raw_spin_lock (&tick_freeze_lock);if (tick_freeze_depth ==num_online_cpus ()) { +/* +* Similar to tick_freeze(). On resumption the first CPU may +* acquire uncontended sleeping locks while other CPUs block on +* tick_freeze_lock. +*/ +lock_map_acquire_try (&tick_freeze_map);timekeeping_resume ();sched_clock_resume (); +lock_map_release (&tick_freeze_map); + system_state =SYSTEM_RUNNING ;trace_suspend_resume (TPS ("timekeeping_freeze" ),smp_processor_id (), false);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 174/204 cifs: Fix querying of WSL CHR and BLK reparse points over SMB1
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pali Rohár <[email protected]>
[ Upstream commit ef86ab131d9127dfbfa8f06e12441d05fdfb090b ]
When reparse point in SMB1 query_path_info() callback was detected then query also for EA $LXDEV. In this EA are stored device major and minor numbers used by WSL CHR and BLK reparse points. Without major and minor numbers, stat() syscall does not work for char and block devices.
Similar code is already in SMB2+ query_path_info() callback function.
--- fs/smb/client/smb1ops.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
fs/smb/client/smb1ops.c +36 -0
@@ -597,6 +597,42 @@ static int cifs_query_path_info(const unsigned int xid,CIFSSMBClose (xid, tcon, fid.netfid); } +#ifdef CONFIG_CIFS_XATTR +/* +* For WSL CHR and BLK reparse points it is required to fetch +* EA $LXDEV which contains major and minor device numbers. +*/ +if (!rc && data->reparse_point) { +struct smb2_file_full_ea_info *ea; + + ea = (struct smb2_file_full_ea_info *)data->wsl.eas; + rc =CIFSSMBQAllEAs (xid, tcon, full_path,SMB2_WSL_XATTR_DEV , + &ea->ea_data[SMB2_WSL_XATTR_NAME_LEN +1 ], +SMB2_WSL_XATTR_DEV_SIZE , cifs_sb); +if (rc ==SMB2_WSL_XATTR_DEV_SIZE ) { + ea->next_entry_offset =cpu_to_le32 (0 ); + ea->flags =0 ; + ea->ea_name_length =SMB2_WSL_XATTR_NAME_LEN ; + ea->ea_value_length =cpu_to_le16 (SMB2_WSL_XATTR_DEV_SIZE ); +memcpy (&ea->ea_data[0 ],SMB2_WSL_XATTR_DEV ,SMB2_WSL_XATTR_NAME_LEN +1 ); + data->wsl.eas_len =sizeof (*ea) +SMB2_WSL_XATTR_NAME_LEN +1 + +SMB2_WSL_XATTR_DEV_SIZE ; + rc =0 ; + }else if (rc >=0 ) { +/* It is an error if EA $LXDEV has wrong size. */ + rc = -EINVAL ; + }else { +/* +* In all other cases ignore error if fetching +* of EA $LXDEV failed. It is needed only for +* WSL CHR and BLK reparse points and wsl_to_fattr() +* handle the case when EA is missing. +*/ + rc =0 ; + } + } +#endif +return rc; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 175/204 ext4: make block validity check resistent to sb bh corruption
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ojaswin Mujoo <[email protected]>
[ Upstream commit ccad447a3d331a239477c281533bacb585b54a98 ]
Block validity checks need to be skipped in case they are called for journal blocks since they are part of system's protected zone.
Currently, this is done by checking inode->ino against sbi->s_es->s_journal_inum, which is a direct read from the ext4 sb buffer head. If someone modifies this underneath us then the s_journal_inum field might get corrupted. To prevent against this, change the check to directly compare the inode with journal->j_inode.
**Slight change in behavior**: During journal init path, check_block_validity etc might be called for journal inode when sbi->s_journal is not set yet. In this case we now proceed with ext4_inode_block_valid() instead of returning early. Since systems zones have not been set yet, it is okay to proceed so we can perform basic checks on the blocks.
--- fs/ext4/block_validity.c | 5 ++--- fs/ext4/inode.c | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-)
fs/ext4/block_validity.c +2 -3
@@ -351,10 +351,9 @@ int ext4_check_blockref(const char *function, unsigned int line, {__le32 *bref = p;unsigned int blk; +journal_t *journal =EXT4_SB (inode->i_sb)->s_journal; -if (ext4_has_feature_journal (inode->i_sb) && - (inode->i_ino == -le32_to_cpu (EXT4_SB (inode->i_sb)->s_es->s_journal_inum))) +if (journal && inode == journal->j_inode)return 0 ;while (bref < p+max) {
fs/ext4/inode.c +4 -3
@@ -378,10 +378,11 @@ static int __check_block_validity(struct inode *inode, const char *func,unsigned int line, struct ext4_map_blocks *map) { - if (ext4_has_feature_journal(inode->i_sb) && - (inode->i_ino == - le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_journal_inum))) + journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; + +if (journal && inode == journal->j_inode)return 0 ; +if (!ext4_inode_block_valid (inode, map->m_pblk, map->m_len)) {ext4_error_inode (inode, func, line, map->m_pblk, "lblock %lu mapped to illegal pblock %llu "
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 176/204 scsi: hisi_sas: Fix I/O errors caused by hardware port ID changes
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xingui Yang <[email protected]>
[ Upstream commit daff37f00c7506ca322ccfce95d342022f06ec58 ]
The hw port ID of phy may change when inserting disks in batches, causing the port ID in hisi_sas_port and itct to be inconsistent with the hardware, resulting in I/O errors. The solution is to set the device state to gone to intercept I/O sent to the device, and then execute linkreset to discard and find the disk to re-update its information.
--- drivers/scsi/hisi_sas/hisi_sas_main.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/scsi/hisi_sas/hisi_sas_main.c +20 -0
@@ -911,8 +911,28 @@ static void hisi_sas_phyup_work_common(struct work_struct *work,container_of (work,typeof (*phy), works[event]);struct hisi_hba *hisi_hba = phy->hisi_hba;struct asd_sas_phy *sas_phy = &phy->sas_phy; +struct asd_sas_port *sas_port = sas_phy->port; +struct hisi_sas_port *port = phy->port; +struct device *dev = hisi_hba->dev; +struct domain_device *port_dev;int phy_no = sas_phy->id; +if (!test_bit (HISI_SAS_RESETTING_BIT , &hisi_hba->flags) && + sas_port && port && (port->id != phy->port_id)) { +dev_info (dev,"phy%d's hw port id changed from %d to %llu\n" , + phy_no, port->id, phy->port_id); + port_dev = sas_port->port_dev; +if (port_dev && !dev_is_expander (port_dev->dev_type)) { +/* +* Set the device state to gone to block +* sending IO to the device. +*/ +set_bit (SAS_DEV_GONE , &port_dev->state); +hisi_sas_notify_phy_event (phy,HISI_PHYE_LINK_RESET ); +return ; + } + } + phy->wait_phyup_cnt =0 ;if (phy->identify.target_port_protocols ==SAS_PROTOCOL_SSP ) hisi_hba->hw->sl_notify_ssp (hisi_hba, phy_no);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 177/204 scsi: ufs: exynos: Ensure pre_link() executes before exynos_ufs_phy_init()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Griffin <[email protected]>
[ Upstream commit 3d101165e72316775947d71321d97194f03dfef3 ]
Ensure clocks are enabled before configuring unipro. Additionally move the pre_link() hook before the exynos_ufs_phy_init() calls. This means the register write sequence more closely resembles the ordering of the downstream driver.
--- drivers/ufs/host/ufs-exynos.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/ufs/host/ufs-exynos.c +5 -5
@@ -990,9 +990,14 @@ static int exynos_ufs_pre_link(struct ufs_hba *hba)exynos_ufs_config_intr (ufs,DFES_DEF_L4_ERRS ,UNIPRO_L4 );exynos_ufs_set_unipro_pclk_div (ufs); +exynos_ufs_setup_clocks (hba, true,PRE_CHANGE ); +/* unipro */ exynos_ufs_config_unipro (ufs); +if (ufs->drv_data->pre_link) + ufs->drv_data->pre_link (ufs); +/* m-phy */ exynos_ufs_phy_init (ufs);if (!(ufs->opts &EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR )) {
@@ -1000,11 +1005,6 @@ static int exynos_ufs_pre_link(struct ufs_hba *hba)exynos_ufs_config_phy_cap_attr (ufs); } -exynos_ufs_setup_clocks (hba, true,PRE_CHANGE ); - -if (ufs->drv_data->pre_link) - ufs->drv_data->pre_link (ufs); -return 0 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 178/204 scsi: pm80xx: Set phy_attached to zero when device is gone
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Igor Pylypiv <[email protected]>
[ Upstream commit f7b705c238d1483f0a766e2b20010f176e5c0fb7 ]
When a fatal error occurs, a phy down event may not be received to set phy->phy_attached to zero.
--- drivers/scsi/pm8001/pm8001_sas.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/pm8001/pm8001_sas.c +1 -0
@@ -719,6 +719,7 @@ static void pm8001_dev_gone_notify(struct domain_device *dev)spin_lock_irqsave (&pm8001_ha->lock, flags); }PM8001_CHIP_DISP ->dereg_dev_req (pm8001_ha, device_id); + pm8001_ha->phy[pm8001_dev->attached_phy].phy_attached =0 ;pm8001_free_dev (pm8001_dev); }else {pm8001_dbg (pm8001_ha,DISC ,"Found dev has gone.\n" );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 179/204 x86/i8253: Call clockevent_i8253_disable() with interrupts disabled
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fernando Fernandez Mancera <[email protected]>
[ Upstream commit 3940f5349b476197fb079c5aa19c9a988de64efb ]
There's a lockdep false positive warning related to i8253_lock:
WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected
...
systemd-sleep/3324 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
ffffffffb2c23398 (i8253_lock){+.+.}-{2:2}, at: pcspkr_event+0x3f/0xe0 [pcspkr]
...
... which became HARDIRQ-irq-unsafe at:
...
lock_acquire+0xd0/0x2f0
_raw_spin_lock+0x30/0x40
clockevent_i8253_disable+0x1c/0x60
pit_timer_init+0x25/0x50
hpet_time_init+0x46/0x50
x86_late_time_init+0x1b/0x40
start_kernel+0x962/0xa00
x86_64_start_reservations+0x24/0x30
x86_64_start_kernel+0xed/0xf0
common_startup_64+0x13e/0x141
...Lockdep complains due pit_timer_init() using the lock in an IRQ-unsafe fashion, but it's a false positive, because there is no deadlock possible at that point due to init ordering: at the point where pit_timer_init() is called there is no other possible usage of i8253_lock because the system is still in the very early boot stage with no interrupts.
But in any case, pit_timer_init() should disable interrupts before calling clockevent_i8253_disable() out of general principle, and to keep lockdep working even in this scenario.
Use scoped_guard() for that, as suggested by Thomas Gleixner.
[ mingo: Cleaned up the changelog. ]
--- arch/x86/kernel/i8253.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kernel/i8253.c +2 -1
@@ -46,7 +46,8 @@ bool __init pit_timer_init(void)* VMMs otherwise steal CPU time just to pointlessly waggle * the (masked) IRQ. */ -clockevent_i8253_disable (); +scoped_guard (irq) +clockevent_i8253_disable ();return false; }clockevent_i8253_init (true);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 180/204 iomap: skip unnecessary ifs_block_is_uptodate check
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gou Hao <[email protected]>
[ Upstream commit 8e3c15ee0d292c413c66fe10201d1b035a0bea72 ]
In iomap_adjust_read_range, i is either the first !uptodate block, or it is past last for the second loop looking for trailing uptodate blocks. Assuming there's no overflow (there's no combination of huge folios and tiny blksize) then yeah, there is no point in retesting that the same block pointed to by i is uptodate since we hold the folio lock so nobody else could have set it uptodate.
--- fs/iomap/buffered-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/iomap/buffered-io.c +1 -1
@@ -224,7 +224,7 @@ static void iomap_adjust_read_range(struct inode *inode, struct folio *folio, }/* truncate len if we find any trailing uptodate block(s) */ -for ( ; i <= last; i++) { +while (++i <= last) {if (ifs_block_is_uptodate (ifs, i)) { plen -= (last - i +1 ) * block_size; last = i -1 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 181/204 riscv: Provide all alternative macros all the time
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Jones <[email protected]>
[ Upstream commit fb53a9aa5f5b8bf302f3260a7f1f5a24345ce62a ]
We need to provide all six forms of the alternative macros (ALTERNATIVE, ALTERNATIVE_2, _ALTERNATIVE_CFG, _ALTERNATIVE_CFG_2, __ALTERNATIVE_CFG, __ALTERNATIVE_CFG_2) for all four cases derived from the two ifdefs (RISCV_ALTERNATIVE, __ASSEMBLY__) in order to ensure all configs can compile. Define this missing ones and ensure all are defined to consume all parameters passed.
--- arch/riscv/include/asm/alternative-macros.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)
arch/riscv/include/asm/alternative-macros.h +7 -12
@@ -115,24 +115,19 @@ \old_c .endm -#define _ALTERNATIVE_CFG (old_c, ...) \ - ALTERNATIVE_CFG old_c - -#define _ALTERNATIVE_CFG_2 (old_c, ...) \ - ALTERNATIVE_CFG old_c +#define __ALTERNATIVE_CFG (old_c, ...) ALTERNATIVE_CFG old_c +#define __ALTERNATIVE_CFG_2 (old_c, ...) ALTERNATIVE_CFG old_c#else /* !__ASSEMBLY__ */ -#define __ALTERNATIVE_CFG (old_c) \ - old_c "\n" +#define __ALTERNATIVE_CFG (old_c, ...) old_c "\n" +#define __ALTERNATIVE_CFG_2 (old_c, ...) old_c "\n" -#define _ALTERNATIVE_CFG (old_c, ...) \ - __ALTERNATIVE_CFG(old_c) +#endif /* __ASSEMBLY__ */ -#define _ALTERNATIVE_CFG_2 (old_c, ...) \ - __ALTERNATIVE_CFG(old_c) +#define _ALTERNATIVE_CFG (old_c, ...) __ALTERNATIVE_CFG(old_c) +#define _ALTERNATIVE_CFG_2 (old_c, ...) __ALTERNATIVE_CFG_2(old_c) -#endif /* __ASSEMBLY__ */ #endif /* CONFIG_RISCV_ALTERNATIVE */ /*
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 182/204 loop: aio inherit the ioprio of original request
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yunlong Xing <[email protected]>
[ Upstream commit 1fdb8188c3d505452b40cdb365b1bb32be533a8e ]
Set cmd->iocb.ki_ioprio to the ioprio of loop device's request. The purpose is to inherit the original request ioprio in the aio flow.
--- drivers/block/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/loop.c +1 -1
@@ -441,7 +441,7 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd, cmd->iocb.ki_filp = file; cmd->iocb.ki_complete = lo_rw_aio_complete; cmd->iocb.ki_flags =IOCB_DIRECT ; - cmd->iocb.ki_ioprio =IOPRIO_PRIO_VALUE (IOPRIO_CLASS_NONE ,0 ); + cmd->iocb.ki_ioprio =req_get_ioprio (rq);if (rw ==ITER_SOURCE ) ret =call_write_iter (file, &cmd->iocb, &iter);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 183/204 spi: tegra210-quad: use WARN_ON_ONCE instead of WARN_ON for timeouts
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Breno Leitao <[email protected]>
[ Upstream commit 41c721fc093938745d116c3a21326a0ee03bb491 ]
Some machines with tegra_qspi_combined_seq_xfer hardware issues generate excessive kernel warnings, severely polluting the logs:
dmesg | grep -i "WARNING:.*tegra_qspi_transfer_one_message" | wc -l 94451
This patch replaces WARN_ON with WARN_ON_ONCE for timeout conditions to reduce log spam. The subsequent error message still prints on each occurrence, providing sufficient information about the failure, while the stack trace is only needed once for debugging purposes.
--- drivers/spi/spi-tegra210-quad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-tegra210-quad.c +1 -1
@@ -1117,7 +1117,7 @@ static int tegra_qspi_combined_seq_xfer(struct tegra_qspi *tqspi, (&tqspi->xfer_completion,QSPI_DMA_TIMEOUT ); -if (WARN_ON (ret ==0 )) { +if (WARN_ON_ONCE (ret ==0 )) {dev_err (tqspi->dev,"QSPI Transfer failed with timeout: %d\n" , ret); if (tqspi->is_curr_dma_xfer &&
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 184/204 spi: tegra210-quad: add rate limiting and simplify timeout error message
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Breno Leitao <[email protected]>
[ Upstream commit 21f4314e66ed8d40b2ee24185d1a06a07a512eb1 ]
On malfunctioning hardware, timeout error messages can appear thousands of times, creating unnecessary system pressure and log bloat. This patch makes two improvements:
1. Replace dev_err() with dev_err_ratelimited() to prevent log flooding when hardware errors persist
2. Remove the redundant timeout value parameter from the error message, as 'ret' is always zero in this error path
These changes reduce logging overhead while maintaining necessary error reporting for debugging purposes.
--- drivers/spi/spi-tegra210-quad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-tegra210-quad.c +2 -2
@@ -1118,8 +1118,8 @@ static int tegra_qspi_combined_seq_xfer(struct tegra_qspi *tqspi, QSPI_DMA_TIMEOUT);if (WARN_ON_ONCE (ret ==0 )) { -dev_err (tqspi->dev,"QSPI Transfer failed with timeout: %d\n" , - ret); +dev_err_ratelimited (tqspi->dev, +"QSPI Transfer failed with timeout\n" );if (tqspi->is_curr_dma_xfer && (tqspi->cur_direction &DATA_DIR_TX )) dmaengine_terminate_all
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 185/204 ubsan: Fix panic from test_ubsan_out_of_bounds
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mostafa Saleh <[email protected]>
[ Upstream commit 9b044614be12d78d3a93767708b8d02fb7dfa9b0 ]
Running lib_ubsan.ko on arm64 (without CONFIG_UBSAN_TRAP) panics the kernel:
[ 31.616546] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: test_ubsan_out_of_bounds+0x158/0x158 [test_ubsan] [ 31.646817] CPU: 3 UID: 0 PID: 179 Comm: insmod Not tainted 6.15.0-rc2 #1 PREEMPT [ 31.648153] Hardware name: linux,dummy-virt (DT) [ 31.648970] Call trace: [ 31.649345] show_stack+0x18/0x24 (C) [ 31.650960] dump_stack_lvl+0x40/0x84 [ 31.651559] dump_stack+0x18/0x24 [ 31.652264] panic+0x138/0x3b4 [ 31.652812] __ktime_get_real_seconds+0x0/0x10 [ 31.653540] test_ubsan_load_invalid_value+0x0/0xa8 [test_ubsan] [ 31.654388] init_module+0x24/0xff4 [test_ubsan] [ 31.655077] do_one_initcall+0xd4/0x280 [ 31.655680] do_init_module+0x58/0x2b4
That happens because the test corrupts other data in the stack:
400: d5384108 mrs x8, sp_el0 404: f9426d08 ldr x8, [x8, #1240] 408: f85f83a9 ldur x9, [x29, #-8] 40c: eb09011f cmp x8, x9 410: 54000301 b.ne 470 <test_ubsan_out_of_bounds+0x154> // b.any
As there is no guarantee the compiler will order the local variables as declared in the module:
volatile char above[4] = { }; /* Protect surrounding memory. */ volatile int arr[4];
volatile char below[4] = { }; /* Protect surrounding memory. */
There is another problem where the out-of-bound index is 5 which is larger than the extra surrounding memory for protection.
So, use a struct to enforce the ordering, and fix the index to be 4. Also, remove some of the volatiles and rely on OPTIMIZER_HIDE_VAR()
--- lib/test_ubsan.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
lib/test_ubsan.c +11 -7
@@ -35,18 +35,22 @@ static void test_ubsan_shift_out_of_bounds(void)static void test_ubsan_out_of_bounds (void ) { -volatile int i =4 , j =5 , k =-1 ; -volatile char above[4 ] = { };/* Protect surrounding memory. */ -volatile int arr[4 ]; -volatile char below[4 ] = { };/* Protect surrounding memory. */ +int i =4 , j =4 , k =-1 ; +volatile struct { +char above[4 ];/* Protect surrounding memory. */ +int arr[4 ]; +char below[4 ];/* Protect surrounding memory. */ + } data; - above[0 ] = below[0 ]; +OPTIMIZER_HIDE_VAR (i); +OPTIMIZER_HIDE_VAR (j); +OPTIMIZER_HIDE_VAR (k);UBSAN_TEST (CONFIG_UBSAN_BOUNDS ,"above" ); - arr[j] = i; + data.arr[j] = i;UBSAN_TEST (CONFIG_UBSAN_BOUNDS ,"below" ); - arr[k] = i; + data.arr[k] = i; }enum ubsan_test_enum {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 186/204 x86/cpu: Add CPU model number for Bartlett Lake CPUs with Raptor Cove cores
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pi Xiange <[email protected]>
[ Upstream commit d466304c4322ad391797437cd84cca7ce1660de0 ]
Bartlett Lake has a P-core only product with Raptor Cove.
[ mingo: Switch around the define as pointed out by Christian Ludloff:
Ratpr Cove is the core, Bartlett Lake is the product.
--- arch/x86/include/asm/intel-family.h | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/include/asm/intel-family.h +2 -0
@@ -159,6 +159,8 @@#define INTEL_FAM6_GRANITERAPIDS_D 0xAE#define INTEL_GRANITERAPIDS_D IFM(6, 0xAE) +#define INTEL_BARTLETTLAKE IFM(6, 0xD7)/* Raptor Cove */ +/* "Hybrid" Processors (P-Core/E-Core) */ #define INTEL_FAM6_LAKEFIELD 0x8A/* Sunny Cove / Tremont */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 187/204 md/raid1: Add check for missing source disk in process_checks()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Meir Elisha <[email protected]>
[ Upstream commit b7c178d9e57c8fd4238ff77263b877f6f16182ba ]
During recovery/check operations, the process_checks function loops through available disks to find a 'primary' source with successfully read data.
If no suitable source disk is found after checking all possibilities, the 'primary' index will reach conf->raid_disks * 2. Add an explicit check for this condition after the loop. If no source disk was found, print an error message and return early to prevent further processing without a valid primary source.
--- drivers/md/raid1.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/md/raid1.c +16 -10
@@ -2061,14 +2061,9 @@ static int fix_sync_read_error(struct r1bio *r1_bio)if (!rdev_set_badblocks (rdev, sect, s,0 )) abort =1 ; } -if (abort) { - conf->recovery_disabled = - mddev->recovery_disabled; -set_bit (MD_RECOVERY_INTR , &mddev->recovery); -md_done_sync (mddev, r1_bio->sectors,0 ); -put_buf (r1_bio); +if (abort)return 0 ; - } +/* Try next page */ sectors -= s; sect += s;
@@ -2207,10 +2202,21 @@ static void sync_request_write(struct mddev *mddev, struct r1bio *r1_bio)int disks = conf->raid_disks *2 ;struct bio *wbio; -if (!test_bit (R1BIO_Uptodate, &r1_bio->state)) -/* ouch - failed to read all of that. */ -if (!fix_sync_read_error (r1_bio)) +if (!test_bit (R1BIO_Uptodate, &r1_bio->state)) { +/* +* ouch - failed to read all of that. +* No need to fix read error for check/repair +* because all member disks are read. +*/ +if (test_bit (MD_RECOVERY_REQUESTED , &mddev->recovery) || + !fix_sync_read_error (r1_bio)) { + conf->recovery_disabled = mddev->recovery_disabled; +set_bit (MD_RECOVERY_INTR , &mddev->recovery); +md_done_sync (mddev, r1_bio->sectors,0 ); +put_buf (r1_bio);return ; + } + }if (test_bit (MD_RECOVERY_REQUESTED , &mddev->recovery))process_checks (r1_bio);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 188/204 spi: spi-imx: Add check for spi_imx_setupxfer()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tamura Dai <[email protected]>
[ Upstream commit 951a04ab3a2db4029debfa48d380ef834b93207e ]
Add check for the return value of spi_imx_setupxfer(). spi_imx->rx and spi_imx->tx function pointer can be NULL when spi_imx_setupxfer() return error, and make NULL pointer dereference.
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Call trace: 0x0 spi_imx_pio_transfer+0x50/0xd8 spi_imx_transfer_one+0x18c/0x858 spi_transfer_one_message+0x43c/0x790 __spi_pump_transfer_message+0x238/0x5d4 __spi_sync+0x2b0/0x454 spi_write_then_read+0x11c/0x200
--- drivers/spi/spi-imx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/spi/spi-imx.c +4 -1
@@ -1614,10 +1614,13 @@ static int spi_imx_transfer_one(struct spi_controller *controller,struct spi_device *spi, struct spi_transfer *transfer) { + int ret;struct spi_imx_data *spi_imx =spi_controller_get_devdata (spi->controller);unsigned long hz_per_byte, byte_limit; -spi_imx_setupxfer (spi, transfer); + ret =spi_imx_setupxfer (spi, transfer); +if (ret <0 ) +return ret; transfer->effective_speed_hz = spi_imx->spi_bus_clk;/* flush rxfifo before transfer */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 189/204 x86/pvh: Call C code via the kernel virtual mapping
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ard Biesheuvel <[email protected]>
commit e8fbc0d9cab6c1ee6403f42c0991b0c1d5dbc092 upstream.
Calling C code via a different mapping than it was linked at is problematic, because the compiler assumes that RIP-relative and absolute symbol references are interchangeable. GCC in particular may use RIP-relative per-CPU variable references even when not using -fpic.
So call xen_prepare_pvh() via its kernel virtual mapping on x86_64, so that those RIP-relative references produce the correct values. This matches the pre-existing behavior for i386, which also invokes xen_prepare_pvh() via the kernel virtual mapping before invoking startup_32 with paging disabled again.
Message-ID: <[email protected]>
--- arch/x86/platform/pvh/head.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/x86/platform/pvh/head.S +6 -1
@@ -100,7 +100,12 @@ SYM_CODE_START_LOCAL(pvh_start_xen) xor %edx, %edx wrmsr - call xen_prepare_pvh + /* Call xen_prepare_pvh() via the kernel virtual mapping */ + leaq xen_prepare_pvh(%rip), %rax + subq phys_base(%rip), %rax + addq $__START_KERNEL_map, %rax + ANNOTATE_RETPOLINE_SAFE + call *%rax /* startup_64 expects boot_params in %rsi. */ mov $_pa(pvh_bootparams), %rsi
Greg Kroah-Hartman
maintainerPATCH 190/204 Revert "drivers: core: synchronize really_probe() and dev_uevent()"
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Torokhov <[email protected]>
commit dc1771f718548f7d4b93991b174c6e7b5e1ba410 upstream.
This reverts commit c0a40097f0bc81deafc15f9195d1fb54595cd6d0.
Probing a device can take arbitrary long time. In the field we observed that, for example, probing a bad micro-SD cards in an external USB card reader (or maybe cards were good but cables were flaky) sometimes takes longer than 2 minutes due to multiple retries at various levels of the stack. We can not block uevent_show() method for that long because udev is reading that attribute very often and that blocks udev and interferes with booting of the system.
The change that introduced locking was concerned with dev_uevent() racing with unbinding the driver. However we can handle it without locking (which will be done in subsequent patch).
There was also claim that synchronization with probe() is needed to properly load USB drivers, however this is a red herring: the change adding the lock was introduced in May of last year and USB loading and probing worked properly for many years before that.
Revert the harmful locking.
--- drivers/base/core.c | 3 --- 1 file changed, 3 deletions(-)
drivers/base/core.c +0 -3
@@ -2672,11 +2672,8 @@ static ssize_t uevent_show(struct deviceif (!env)return -ENOMEM ; -/* Synchronize with really_probe() */ -device_lock (dev);/* let the kset specific function add its keys */ retval = kset->uevent_ops->uevent (&dev->kobj, env); -device_unlock (dev);if (retval) goto out;
Greg Kroah-Hartman
maintainerPATCH 191/204 driver core: introduce device_set_driver() helper
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Torokhov <[email protected]>
commit 04d3e5461c1f5cf8eec964ab64948ebed826e95e upstream.
In preparation to closing a race when reading driver pointer in dev_uevent() code, instead of setting device->driver pointer directly introduce device_set_driver() helper.
--- drivers/base/base.h | 6 ++++++ drivers/base/core.c | 2 +- drivers/base/dd.c | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-)
drivers/base/base.h +6 -0
@@ -179,6 +179,12 @@ int driver_add_groups(struct device_drivvoid driver_remove_groups (struct device_driver *drv,const struct attribute_group **groups);void device_driver_detach (struct device *dev); +static inline void device_set_driver (struct device *dev,const struct device_driver *drv) +{ +// FIXME - this cast should not be needed "soon" + dev->driver = (struct device_driver *)drv; +} +int devres_release_all (struct device *dev);void device_block_probing (void );void device_unblock_probing (void );
drivers/base/core.c +1 -1
@@ -3688,7 +3688,7 @@ done:device_pm_remove (dev);dpm_sysfs_remove (dev); DPMError: - dev->driver =NULL ; +device_set_driver (dev,NULL );bus_remove_device (dev); BusError:device_remove_attrs (dev);
drivers/base/dd.c +3 -3
@@ -550,7 +550,7 @@ static void device_unbind_cleanup(structarch_teardown_dma_ops (dev);kfree (dev->dma_range_map); dev->dma_range_map =NULL ; - dev->driver =NULL ; +device_set_driver (dev,NULL );dev_set_drvdata (dev,NULL );if (dev->pm_domain && dev->pm_domain->dismiss) dev->pm_domain->dismiss (dev);
@@ -629,7 +629,7 @@ static int really_probe(struct device *d } re_probe: - dev->driver = drv; +device_set_driver (dev, drv);/* If using pinctrl, bind pins now before probing */ ret =pinctrl_bind_pins (dev);
@@ -1014,7 +1014,7 @@ static int __device_attach(struct deviceif (ret ==0 ) ret =1 ;else { - dev->driver =NULL ; +device_set_driver (dev,NULL ); ret =0 ; } }else {
Greg Kroah-Hartman
maintainerPATCH 192/204 driver core: fix potential NULL pointer dereference in dev_uevent()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Torokhov <[email protected]>
commit 18daa52418e7e4629ed1703b64777294209d2622 upstream.
If userspace reads "uevent" device attribute at the same time as another threads unbinds the device from its driver, change to dev->driver from a valid pointer to NULL may result in crash. Fix this by using READ_ONCE() when fetching the pointer, and take bus' drivers klist lock to make sure driver instance will not disappear while we access it.
Use WRITE_ONCE() when setting the driver pointer to ensure there is no tearing.
--- drivers/base/base.h | 13 ++++++++++++- drivers/base/bus.c | 2 +- drivers/base/core.c | 33 +++++++++++++++++++++++++++++++-- 3 files changed, 44 insertions(+), 4 deletions(-)
drivers/base/base.h +12 -1
@@ -73,6 +73,7 @@ static inline void subsys_put(struct subkset_put (&sp->subsys); } +struct subsys_private *bus_to_subsys (const struct bus_type *bus);struct subsys_private *class_to_subsys (const struct class *class);struct driver_private {
@@ -181,8 +182,18 @@ void device_driver_detach(struct devicestatic inline void device_set_driver (struct device *dev,const struct device_driver *drv) { +/* +* Majority (all?) read accesses to dev->driver happens either +* while holding device lock or in bus/driver code that is only +* invoked when the device is bound to a driver and there is no +* concern of the pointer being changed while it is being read. +* However when reading device's uevent file we read driver pointer +* without taking device lock (so we do not block there for +* arbitrary amount of time). We use WRITE_ONCE() here to prevent +* tearing so that READ_ONCE() can safely be used in uevent code. +*/ // FIXME - this cast should not be needed "soon" - dev->driver = (struct device_driver *)drv; +WRITE_ONCE (dev->driver, (struct device_driver *)drv); }int devres_release_all (struct device *dev);
drivers/base/bus.c +1 -1
@@ -57,7 +57,7 @@ static int __must_check bus_rescan_devic* NULL. A call to subsys_put() must be done when finished with the pointer in * order for it to be properly freed. */ -static struct subsys_private *bus_to_subsys (const struct bus_type *bus) +struct subsys_private *bus_to_subsys (const struct bus_type *bus) {struct subsys_private *sp =NULL ;struct kobject *kobj;
drivers/base/core.c +31 -2
@@ -2570,6 +2570,35 @@ static const char *dev_uevent_name(constreturn NULL ; } +/* +* Try filling "DRIVER=<name>" uevent variable for a device. Because this +* function may race with binding and unbinding the device from a driver, +* we need to be careful. Binding is generally safe, at worst we miss the +* fact that the device is already bound to a driver (but the driver +* information that is delivered through uevents is best-effort, it may +* become obsolete as soon as it is generated anyways). Unbinding is more +* risky as driver pointer is transitioning to NULL, so READ_ONCE() should +* be used to make sure we are dealing with the same pointer, and to +* ensure that driver structure is not going to disappear from under us +* we take bus' drivers klist lock. The assumption that only registered +* driver can be bound to a device, and to unregister a driver bus code +* will take the same lock. +*/ +static void dev_driver_uevent (const struct device *dev,struct kobj_uevent_env *env) +{ +struct subsys_private *sp =bus_to_subsys (dev->bus); + +if (sp) { + scoped_guard(spinlock, &sp->klist_drivers.k_lock) { +struct device_driver *drv =READ_ONCE (dev->driver); +if (drv) +add_uevent_var (env,"DRIVER=%s" , drv->name); + } + +subsys_put (sp); + } +} +static int dev_uevent (const struct kobject *kobj,struct kobj_uevent_env *env) {const struct device *dev =kobj_to_dev (kobj);
@@ -2601,8 +2630,8 @@ static int dev_uevent(const struct kobjeif (dev->type && dev->type->name)add_uevent_var (env,"DEVTYPE=%s" , dev->type->name); -if (dev->driver) -add_uevent_var (env,"DRIVER=%s" , dev->driver->name); +/* Add "DRIVER=%s" variable if the device is bound to a driver */ +dev_driver_uevent (dev, env);/* Add common DT information about the device */ of_device_uevent (dev, env);
Greg Kroah-Hartman
maintainerPATCH 193/204 vmxnet3: Fix malformed packet sizing in vmxnet3_process_xdp
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <[email protected]>
commit 4c2227656d9003f4d77afc76f34dd81b95e4c2c4 upstream.
vmxnet3 driver's XDP handling is buggy for packet sizes using ring0 (that is, packet sizes between 128 - 3k bytes).
We noticed MTU-related connectivity issues with Cilium's service load- balancing in case of vmxnet3 as NIC underneath. A simple curl to a HTTP backend service where the XDP LB was doing IPIP encap led to overly large packet sizes but only for *some* of the packets (e.g. HTTP GET request) while others (e.g. the prior TCP 3WHS) looked completely fine on the wire.
In fact, the pcap recording on the backend node actually revealed that the node with the XDP LB was leaking uninitialized kernel data onto the wire for the affected packets, for example, while the packets should have been 152 bytes their actual size was 1482 bytes, so the remainder after 152 bytes was padded with whatever other data was in that page at the time (e.g. we saw user/payload data from prior processed packets).
We only noticed this through an MTU issue, e.g. when the XDP LB node and the backend node both had the same MTU (e.g. 1500) then the curl request got dropped on the backend node's NIC given the packet was too large even though the IPIP-encapped packet normally would never even come close to the MTU limit. Lowering the MTU on the XDP LB (e.g. 1480) allowed to let the curl request succeed (which also indicates that the kernel ignored the padding, and thus the issue wasn't very user-visible).
Commit e127ce7699c1 ("vmxnet3: Fix missing reserved tailroom") was too eager to also switch xdp_prepare_buff() from rcd->len to rbi->len. It really needs to stick to rcd->len which is the actual packet length from the descriptor. The latter we also feed into vmxnet3_process_xdp_small(), by the way, and it indicates the correct length needed to initialize the xdp->{data,data_end} parts. For e127ce7699c1 ("vmxnet3: Fix missing reserved tailroom") the relevant part was adapting xdp_init_buff() to address the warning given the xdp_data_hard_end() depends on xdp->frame_sz. With that fixed, traffic on the wire looks good again.
--- drivers/net/vmxnet3/vmxnet3_xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/vmxnet3/vmxnet3_xdp.c +1 -1
@@ -397,7 +397,7 @@ vmxnet3_process_xdp(struct vmxnet3_adaptxdp_init_buff (&xdp,PAGE_SIZE , &rq->xdp_rxq);xdp_prepare_buff (&xdp,page_address (page), rq->page_pool->p.offset, - rbi->len, false); + rcd->len, false);xdp_buff_clear_frags_flag (&xdp); xdp_prog =rcu_dereference (rq->adapter->xdp_bpf_prog);
Greg Kroah-Hartman
maintainerPATCH 194/204 comedi: jr3_pci: Fix synchronous deletion of timer
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Abbott <[email protected]>
commit 44d9b3f584c59a606b521e7274e658d5b866c699 upstream.
When jr3_pci_detach() is called during device removal, it calls timer_delete_sync() to stop the timer, but the timer expiry function always reschedules the timer, so the synchronization is ineffective.
Call timer_shutdown_sync() instead. It does not matter that the timer expiry function pointer is cleared, because the device is being removed.
--- drivers/comedi/drivers/jr3_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/comedi/drivers/jr3_pci.c +1 -1
@@ -758,7 +758,7 @@ static void jr3_pci_detach(struct comedistruct jr3_pci_dev_private *devpriv = dev->private;if (devpriv) -del_timer_sync (&devpriv->timer); +timer_shutdown_sync (&devpriv->timer);comedi_pci_detach (dev); }
Greg Kroah-Hartman
maintainerPATCH 195/204 ext4: goto right label out_mmap_sem in ext4_setattr()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baokun Li <[email protected]>
commit 7e91ae31e2d264155dfd102101afc2de7bd74a64 upstream.
Otherwise, if ext4_inode_attach_jinode() fails, a hung task will happen because filemap_invalidate_unlock() isn't called to unlock mapping->invalidate_lock. Like this:
EXT4-fs error (device sda) in ext4_setattr:5557: Out of memory
INFO: task fsstress:374 blocked for more than 122 seconds.
Not tainted 6.14.0-rc1-next-20250206-xfstests-dirty #726
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:fsstress state:D stack:0 pid:374 tgid:374 ppid:373
task_flags:0x440140 flags:0x00000000
Call Trace:
<TASK>
__schedule+0x2c9/0x7f0
schedule+0x27/0xa0
schedule_preempt_disabled+0x15/0x30
rwsem_down_read_slowpath+0x278/0x4c0
down_read+0x59/0xb0
page_cache_ra_unbounded+0x65/0x1b0
filemap_get_pages+0x124/0x3e0
filemap_read+0x114/0x3d0
vfs_read+0x297/0x360
ksys_read+0x6c/0xe0
do_syscall_64+0x4b/0x110
entry_SYSCALL_64_after_hwframe+0x76/0x7e--- fs/ext4/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/inode.c +1 -1
@@ -5479,7 +5479,7 @@ int ext4_setattr(struct mnt_idmap *idmap oldsize & (inode->i_sb->s_blocksize - 1)) { error =ext4_inode_attach_jinode (inode);if (error) - goto err_out; + goto out_mmap_sem; } handle =ext4_journal_start (inode,EXT4_HT_INODE ,3 );
Greg Kroah-Hartman
maintainerPATCH 196/204 net: dsa: mv88e6xxx: fix atu_move_port_mask for 6341 family
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Marek Beh�n" <[email protected]>
commit 4ae01ec007716986e1a20f1285eb013cbf188830 upstream.
The atu_move_port_mask for 6341 family (Topaz) is 0xf, not 0x1f. The PortVec field is 8 bits wide, not 11 as in 6390 family. Fix this.
--- drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/dsa/mv88e6xxx/chip.c +2 -2
@@ -5713,7 +5713,7 @@ static const struct mv88e6xxx_info mv88e .global1_addr = 0x1b, .global2_addr = 0x1c, .age_time_coeff = 3750, - .atu_move_port_mask = 0x1f, + .atu_move_port_mask = 0xf, .g1_irqs = 9, .g2_irqs = 10, .pvt = true,
@@ -6174,7 +6174,7 @@ static const struct mv88e6xxx_info mv88e .global1_addr = 0x1b, .global2_addr = 0x1c, .age_time_coeff = 3750, - .atu_move_port_mask = 0x1f, + .atu_move_port_mask = 0xf, .g1_irqs = 9, .g2_irqs = 10, .pvt = true,
Greg Kroah-Hartman
maintainerPATCH 197/204 net: dsa: mv88e6xxx: enable PVT for 6321 switch
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Marek Beh�n" <[email protected]>
commit f85c69369854a43af2c5d3b3896da0908d713133 upstream.
Commit f36456522168 ("net: dsa: mv88e6xxx: move PVT description in info") did not enable PVT for 6321 switch. Fix it.
--- drivers/net/dsa/mv88e6xxx/chip.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/dsa/mv88e6xxx/chip.c +1 -0
@@ -6152,6 +6152,7 @@ static const struct mv88e6xxx_info mv88e .g1_irqs = 8, .g2_irqs = 10, .atu_move_port_mask = 0xf, + .pvt = true, .multi_chip = true, .edsa_support = MV88E6XXX_EDSA_SUPPORTED, .ptp_support = true,
Greg Kroah-Hartman
maintainerPATCH 198/204 net: dsa: mv88e6xxx: enable .port_set_policy() for 6320 family
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Marek Beh�n" <[email protected]>
commit a2ef58e2c4aea4de166fc9832eb2b621e88c98d5 upstream.
Commit f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy") did not add the .port_set_policy() method for the 6320 family. Fix it.
--- drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/dsa/mv88e6xxx/chip.c +2 -0
@@ -5047,6 +5047,7 @@ static const struct mv88e6xxx_ops mv88e6 .port_set_rgmii_delay = mv88e6320_port_set_rgmii_delay, .port_set_speed_duplex = mv88e6185_port_set_speed_duplex, .port_tag_remap = mv88e6095_port_tag_remap, + .port_set_policy = mv88e6352_port_set_policy, .port_set_frame_mode = mv88e6351_port_set_frame_mode, .port_set_ucast_flood = mv88e6352_port_set_ucast_flood, .port_set_mcast_flood = mv88e6352_port_set_mcast_flood,
@@ -5097,6 +5098,7 @@ static const struct mv88e6xxx_ops mv88e6 .port_set_rgmii_delay = mv88e6320_port_set_rgmii_delay, .port_set_speed_duplex = mv88e6185_port_set_speed_duplex, .port_tag_remap = mv88e6095_port_tag_remap, + .port_set_policy = mv88e6352_port_set_policy, .port_set_frame_mode = mv88e6351_port_set_frame_mode, .port_set_ucast_flood = mv88e6352_port_set_ucast_flood, .port_set_mcast_flood = mv88e6352_port_set_mcast_flood,
Greg Kroah-Hartman
maintainerPATCH 199/204 net: dsa: mv88e6xxx: enable STU methods for 6320 family
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Marek Beh�n" <[email protected]>
commit 1428a6109b20e356188c3fb027bdb7998cc2fb98 upstream.
Commit c050f5e91b47 ("net: dsa: mv88e6xxx: Fill in STU support for all supported chips") introduced STU methods, but did not add them to the 6320 family. Fix it.
--- drivers/net/dsa/mv88e6xxx/chip.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/dsa/mv88e6xxx/chip.c +6 -0
@@ -5074,6 +5074,8 @@ static const struct mv88e6xxx_ops mv88e6 .reset = mv88e6352_g1_reset, .vtu_getnext = mv88e6352_g1_vtu_getnext, .vtu_loadpurge = mv88e6352_g1_vtu_loadpurge, + .stu_getnext = mv88e6352_g1_stu_getnext, + .stu_loadpurge = mv88e6352_g1_stu_loadpurge, .gpio_ops = &mv88e6352_gpio_ops, .avb_ops = &mv88e6352_avb_ops, .ptp_ops = &mv88e6352_ptp_ops,
@@ -5124,6 +5126,8 @@ static const struct mv88e6xxx_ops mv88e6 .reset = mv88e6352_g1_reset, .vtu_getnext = mv88e6352_g1_vtu_getnext, .vtu_loadpurge = mv88e6352_g1_vtu_loadpurge, + .stu_getnext = mv88e6352_g1_stu_getnext, + .stu_loadpurge = mv88e6352_g1_stu_loadpurge, .gpio_ops = &mv88e6352_gpio_ops, .avb_ops = &mv88e6352_avb_ops, .ptp_ops = &mv88e6352_ptp_ops,
@@ -6120,6 +6124,7 @@ static const struct mv88e6xxx_info mv88e .internal_phys_offset = 3, .num_gpio = 15, .max_vid = 4095, + .max_sid = 63, .port_base_addr = 0x10, .phy_base_addr = 0x0, .global1_addr = 0x1b,
@@ -6146,6 +6151,7 @@ static const struct mv88e6xxx_info mv88e .internal_phys_offset = 3, .num_gpio = 15, .max_vid = 4095, + .max_sid = 63, .port_base_addr = 0x10, .phy_base_addr = 0x0, .global1_addr = 0x1b,
Greg Kroah-Hartman
maintainerPATCH 200/204 iommu: Handle race with default domain setup
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Robin Murphy <[email protected]>
commit b46064a18810bad3aea089a79993ca5ea7a3d2b2 upstream.
It turns out that deferred default domain creation leaves a subtle race window during iommu_device_register() wherein a client driver may asynchronously probe in parallel and get as far as performing DMA API operations with dma-direct, only to be switched to iommu-dma underfoot once the default domain attachment finally happens, with obviously disastrous consequences. Even the wonky of_iommu_configure() path is at risk, since iommu_fwspec_init() will no longer defer client probe as the instance ops are (necessarily) already registered, and the "replay" iommu_probe_device() call can see dev->iommu_group already set and so think there's nothing to do either.
Fortunately we already have the right tool in the right place in the form of iommu_device_use_default_domain(), which just needs to ensure that said default domain is actually ready to *be* used. Deferring the client probe shouldn't have too much impact, given that this only happens while the IOMMU driver is probing, and thus due to kick the deferred probe list again once it finishes.
--- drivers/iommu/iommu.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
drivers/iommu/iommu.c +16 -0
@@ -566,6 +566,17 @@ int iommu_probe_device(struct device *demutex_lock (&iommu_probe_device_lock); ret =__iommu_probe_device (dev,NULL );mutex_unlock (&iommu_probe_device_lock); + +/* +* The dma_configure replay paths need bus_iommu_probe() to +* finish before they can call arch_setup_dma_ops() +*/ +if (IS_ENABLED (CONFIG_IOMMU_DMA ) && !ret && dev->iommu_group) { +mutex_lock (&dev->iommu_group->mutex); +if (!dev->iommu_group->default_domain) + ret = -EPROBE_DEFER ; +mutex_unlock (&dev->iommu_group->mutex); + }if (ret)return ret;
@@ -3149,6 +3160,11 @@ int iommu_device_use_default_domain(strureturn 0 ;mutex_lock (&group->mutex); +/* We may race against bus_iommu_probe() finalising groups here */ +if (IS_ENABLED (CONFIG_IOMMU_DMA ) && !group->default_domain) { + ret = -EPROBE_DEFER ; + goto unlock_out; + }if (group->owner_cnt) {if (group->owner || !iommu_is_default_domain (group) || !xa_empty (&group->pasid_array)) {
Greg Kroah-Hartman
maintainerPATCH 201/204 MIPS: cm: Fix warning if MIPS_CM is disabled
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Bogendoerfer <[email protected]>
commit b73c3ccdca95c237750c981054997c71d33e09d7 upstream.
Commit e27fbe16af5c ("MIPS: cm: Detect CM quirks from device tree") introduced
arch/mips/include/asm/mips-cm.h:119:13: error: ‘mips_cm_update_property’
defined but not used [-Werror=unused-function]
Fix this by making empty function implementation inline
--- arch/mips/include/asm/mips-cm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/include/asm/mips-cm.h +1 -1
@@ -104,7 +104,7 @@ static inline bool mips_cm_present(void)#ifdef CONFIG_MIPS_CM extern void mips_cm_update_property (void );#else -static void mips_cm_update_property (void ) {} +static inline void mips_cm_update_property (void ) {}#endif /**
Greg Kroah-Hartman
maintainerPATCH 202/204 nvme: fixup scan failure for non-ANA multipath controllers
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Reinecke <[email protected]>
commit 26d7fb4fd4ca1180e2fa96587dea544563b4962a upstream.
Commit 62baf70c3274 caused the ANA log page to be re-read, even on controllers that do not support ANA. While this should generally harmless, some controllers hang on the unsupported log page and never finish probing.
--- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +1 -1
@@ -3977,7 +3977,7 @@ static void nvme_scan_work(struct work_sif (test_bit (NVME_AER_NOTICE_NS_CHANGED , &ctrl->events))nvme_queue_scan (ctrl);#ifdef CONFIG_NVME_MULTIPATH - else + else if (ctrl->ana_log_buf) /* Re-read the ANA log page to not miss updates */ queue_work(nvme_wq, &ctrl->ana_work);#endif
Greg Kroah-Hartman
maintainerPATCH 203/204 objtool: Ignore end-of-section jumps for KCOV/GCOV
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
commit 0d7597749f5a3ac67851d3836635d084df15fb66 upstream.
When KCOV or GCOV is enabled, dead code can be left behind, in which case objtool silences unreachable and undefined behavior (fallthrough) warnings.
Fallthrough warnings, and their variant "end of section" warnings, were silenced with the following commit:
6b023c784204 ("objtool: Silence more KCOV warnings")
Another variant of a fallthrough warning is a jump to the end of a function. If that function happens to be at the end of a section, the jump destination doesn't actually exist.
Normally that would be a fatal objtool error, but for KCOV/GCOV it's just another undefined behavior fallthrough. Silence it like the others.
Fixes the following warning:
drivers/iommu/dma-iommu.o: warning: objtool: iommu_dma_sw_msi+0x92: can't find jump dest instruction at .text+0x54d5
--- tools/objtool/check.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)
tools/objtool/check.c +16 -6
@@ -1552,6 +1552,8 @@ static int add_jump_destinations(structunsigned long dest_off;for_each_insn (file, insn) { +struct symbol *func =insn_func (insn); +if (insn->jump_dest) {/* * handle_group_alt() may have previously set
@@ -1575,7 +1577,7 @@ static int add_jump_destinations(struct }else if (reloc->sym->return_thunk) {add_return_call (file, insn, true);continue ; - }else if (insn_func (insn)) { + }else if (func) {/* * External sibling call or internal sibling call with * STT_FUNC reloc.
@@ -1608,6 +1610,15 @@ static int add_jump_destinations(structcontinue ; } +/* +* GCOV/KCOV dead code can jump to the end of the +* function/section. +*/ +if (file->ignore_unreachables && func && + dest_sec == insn->sec && + dest_off == func->offset + func->len) +continue ; +WARN_INSN (insn,"can't find jump dest instruction at %s+0x%lx" , dest_sec->name, dest_off);return -1 ;
@@ -1616,8 +1627,7 @@ static int add_jump_destinations(struct/* * Cross-function jump. */ -if (insn_func (insn) &&insn_func (jump_dest) && -insn_func (insn) !=insn_func (jump_dest)) { +if (func &&insn_func (jump_dest) && func !=insn_func (jump_dest)) {/* * For GCC 8+, create parent/child links for any cold
@@ -1634,10 +1644,10 @@ static int add_jump_destinations(struct* case where the parent function's only reference to a * subfunction is through a jump table. */ -if (!strstr (insn_func (insn)->name,".cold" ) && +if (!strstr (func->name,".cold" ) &&strstr (insn_func (jump_dest)->name,".cold" )) { -insn_func (insn)->cfunc =insn_func (jump_dest); -insn_func (jump_dest)->pfunc =insn_func (insn); + func->cfunc =insn_func (jump_dest); +insn_func (jump_dest)->pfunc = func; } }
Greg Kroah-Hartman
maintainerPATCH 204/204 objtool: Silence more KCOV warnings, part 2
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
commit 55c78035a1a8dfb05f1472018ce2a651701adb7d upstream.
Similar to GCOV, KCOV can leave behind dead code and undefined behavior. Warnings related to those should be ignored.
The previous commit:
6b023c784204 ("objtool: Silence more KCOV warnings")
... only did so for CONFIG_CGOV_KERNEL. Also do it for CONFIG_KCOV, but for real this time.
Fixes the following warning:
vmlinux.o: warning: objtool: synaptics_report_mt_data: unexpected end of section .text.synaptics_report_mt_data
--- scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.lib +1 -1
@@ -268,7 +268,7 @@ objtool-args-$(CONFIG_SLS) += --sls objtool-args-$(CONFIG_STACK_VALIDATION) += --stackval objtool-args-$(CONFIG_HAVE_STATIC_CALL_INLINE) += --static-call objtool-args-$(CONFIG_HAVE_UACCESS_VALIDATION) += --uaccess -objtool-args-$(CONFIG_GCOV_KERNEL) += --no-unreachable +objtool-args-$(or $(CONFIG_GCOV_KERNEL),$(CONFIG_KCOV)) += --no-unreachable objtool-args-$(CONFIG_PREFIX_SYMBOLS) += --prefix=$(CONFIG_FUNCTION_PADDING_BYTES) objtool-args = $(objtool-args-y) \
Am 29.04.2025 um 18:41 schrieb Greg Kroah-Hartman:
Quoted 4 lines
This is the start of the stable review cycle for the 6.6.89 release. There are 204 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.
Builds, boots and works on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. No dmesg oddities or regressions found.
Beste Grüße,
Peter Schneider
Signature · 8 lines
Climb the mountain not to plant your flag, but to embrace the challenge, enjoy the air and behold the view. Climb it so you can see the world, not so the world can see you. -- David McCullough Jr. OpenPGP: 0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244 Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc https://keys.mailvelope.com/pks/lookup?op=get&[email protected] https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
The kernel, bpf tool and perf tool builds fine for v6.6.89-rc1 on x86 and arm64 Azure VM.
Thanks,
Hardik
Jon Hunter
maintainerQuoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.89 release. There are 204 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 Thu, 01 May 2025 16:10:15 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.89-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Failures detected for Tegra ...
Test results for stable-v6.6:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
116 tests: 104 pass, 12 failLinux version: 6.6.89-rc1-gcbfb000abca1
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
tegra194-p3509-0000+p3668-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04Test failures: tegra186-p2771-0000: cpu-hotplug
tegra186-p2771-0000: pm-system-suspend.sh
tegra194-p2972-0000: boot.py
tegra194-p2972-0000: pm-system-suspend.sh
tegra210-p2371-2180: cpu-hotplug
tegra210-p2371-2180: devices
tegra210-p3450-0000: cpu-hotplug
tegra210-p3450-0000: devicesJon
Jon Hunter
maintainerHi Greg,
Quoted 33 lines · Jon Hunter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.89 release. There are 204 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 Thu, 01 May 2025 16:10:15 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.89-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Failures detected for Tegra ...
Test results for stable-v6.6:
10 builds: 10 pass, 0 fail 28 boots: 28 pass, 0 fail 116 tests: 104 pass, 12 failLinux version: 6.6.89-rc1-gcbfb000abca1
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000, tegra20-ventana, tegra210-p2371-2180, tegra210-p3450-0000, tegra30-cardhu-a04
Quoted 9 lines
Test failures: tegra186-p2771-0000: cpu-hotplug
tegra186-p2771-0000: pm-system-suspend.sh tegra194-p2972-0000: boot.py tegra194-p2972-0000: pm-system-suspend.sh tegra210-p2371-2180: cpu-hotplug tegra210-p2371-2180: devices tegra210-p3450-0000: cpu-hotplug tegra210-p3450-0000: devices
For linux-6.6.y I needed to revert both of the following changes to fix the above failures ...
# first bad commit: [d908866131a314dbbdd34a205d2514f92e42bb80] memcg: drain obj stock on cpu hotplug teardown
# first bad commit: [4cfe77123fd1f76f7b1950c0abc6f131b90ae8bb] iommu: Handle race with default domain setup
Jon
Signature · 1 line
nvpublic
Greg Kroah-Hartman
maintainerQuoted 46 lines · Jon Hunter
Hi Greg,
Quoted 33 lines · Jon Hunter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.89 release. There are 204 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 Thu, 01 May 2025 16:10:15 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.89-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Failures detected for Tegra ...
Test results for stable-v6.6:
10 builds: 10 pass, 0 fail 28 boots: 28 pass, 0 fail 116 tests: 104 pass, 12 failLinux version: 6.6.89-rc1-gcbfb000abca1
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000, tegra20-ventana, tegra210-p2371-2180, tegra210-p3450-0000, tegra30-cardhu-a04Quoted 9 lines
Test failures: tegra186-p2771-0000: cpu-hotplug
tegra186-p2771-0000: pm-system-suspend.sh tegra194-p2972-0000: boot.py tegra194-p2972-0000: pm-system-suspend.sh tegra210-p2371-2180: cpu-hotplug tegra210-p2371-2180: devices tegra210-p3450-0000: cpu-hotplug tegra210-p3450-0000: devices
Quoted 8 lines
For linux-6.6.y I needed to revert both of the following changes to fix the above failures ...
# first bad commit: [d908866131a314dbbdd34a205d2514f92e42bb80] memcg: drain obj stock on cpu hotplug teardown# first bad commit: [4cfe77123fd1f76f7b1950c0abc6f131b90ae8bb] iommu: Handle race with default domain setup
Thanks, I'm going to drop both of these now.
greg k-h
Quoted 8 lines · On Tue, 29 Apr 2025 18:41:28 +0200 Greg Kroah-Hartman…
This is the start of the stable review cycle for the 6.6.89 release. There are 204 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 Thu, 01 May 2025 16:10:15 +0000. Anything received after that time might be too late.
Boot-tested under QEMU for Rust x86_64:
Thanks!
Cheers,
Miguel
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.89 release. There are 204 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 Thu, 01 May 2025 16:10:15 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.89-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.89 release. There are 204 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 Thu, 01 May 2025 16:10:15 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.89-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Following two build regressions found one on riscv and s390.
1)
Regressions on riscv build with allyesconfig and allmodconfig with toolchains gcc-13 and clang-20 failed on stable-rc 6.6.89-rc1.
* riscv, build
- clang-20-allmodconfig
- gcc-13-allmodconfig
- gcc-13-allyesconfig
Regression Analysis:
- New regression? Yes
- Reproducibility? Yes
Build regression: riscv uprobes.c error unused variable 'start'
## Build error riscvarch/riscv/kernel/probes/uprobes.c: In function 'arch_uprobe_copy_ixol':arch/riscv/kernel/probes/uprobes.c:170:23: error: unused variable 'start' [-Werror=unused-variable]
170 | unsigned long start = (unsigned long)dst;
| ^~~~~
cc1: all warnings being treated as errors
## Build riscv
* Build log: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.87-594-gcbfb000abca1/testrun/28273725/suite/build/test/gcc-13-allmodconfig/log
* Build history:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.87-594-gcbfb000abca1/testrun/28273725/suite/build/test/gcc-13-allmodconfig/history/
* Build details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.87-594-gcbfb000abca1/testrun/28273725/suite/build/test/gcc-13-allmodconfig/details/
* Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/2wPmvuQupVPFOxaqXSUOvDNirrW/
* Kernel config:
https://storage.tuxsuite.com/public/linaro/lkft/builds/2wPmvuQupVPFOxaqXSUOvDNirrW/config
* Toolchain: gcc-13 clang-20
2)
Regressions on s390 build regressions with defconfig with gcc-13/8 and clang-20/clang-nightly on the stable-rc 6.6.89-rc1.
* s390, build
- clang-20-defconfig
- clang-nightly-defconfig
- gcc-13-allmodconfig
- gcc-13-defconfig
- gcc-8-defconfig-fe40093d
Regression Analysis:
- New regression? Yes
- Reproducibility? Yes
Build regression: s390 pci_fixup.c error 'struct pci_dev' has no member named 'non_mappable_bars'
## Build error s390arch/s390/pci/pci_fixup.c: In function 'zpci_ism_bar_no_mmap':arch/s390/pci/pci_fixup.c:19:13: error: 'struct pci_dev' has no member named 'non_mappable_bars'
19 | pdev->non_mappable_bars = 1;
| ^~
## Build s390
* Build log: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.87-594-gcbfb000abca1/testrun/28271143/suite/build/test/gcc-13-defconfig/log
* Build history:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.87-594-gcbfb000abca1/testrun/28271143/suite/build/test/gcc-13-defconfig/history/
* Build details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.87-594-gcbfb000abca1/testrun/28271143/suite/build/test/gcc-13-defconfig/details/
* Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/2wPmvTChk1B5KLhldYbYaKP2ckj/
* Kernel config:
https://storage.tuxsuite.com/public/linaro/lkft/builds/2wPmvTChk1B5KLhldYbYaKP2ckj/config
* Toolchain: gcc-8 gcc-13 clang-20 clang-nightly
## Build
* kernel: 6.6.89-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git commit: cbfb000abca1fdde27066eaf6cb77cbddc7a21c6
* git describe: v6.6.87-594-gcbfb000abca1
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.87-594-gcbfb000abca1
## Test Regressions (compared to v6.6.87-394-g2b9f423a149b)
* riscv, build
- clang-20-allmodconfig
- gcc-13-allmodconfig
- gcc-13-allyesconfig
* s390, build
- clang-20-defconfig
- clang-nightly-defconfig
- gcc-13-allmodconfig
- gcc-13-defconfig
- gcc-8-defconfig-fe40093d
## Metric Regressions (compared to v6.6.87-394-g2b9f423a149b)
## Test Fixes (compared to v6.6.87-394-g2b9f423a149b)
## Metric Fixes (compared to v6.6.87-394-g2b9f423a149b)
## Test result summary
total: 127756, pass: 105351, fail: 5243, skip: 16647, xfail: 515
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 129 total, 129 passed, 0 failed
* arm64: 44 total, 44 passed, 0 failed
* i386: 27 total, 20 passed, 7 failed
* mips: 26 total, 22 passed, 4 failed
* parisc: 4 total, 4 passed, 0 failed
* powerpc: 32 total, 31 passed, 1 failed
* riscv: 20 total, 17 passed, 3 failed
* s390: 14 total, 8 passed, 6 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 7 total, 7 passed, 0 failed
* x86_64: 37 total, 33 passed, 4 failed
## Test suites summary
* boot
* commands
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-exec
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-kcmp
* kselftest-kvm
* kselftest-membarrier
* kselftest-memfd
* kselftest-mincore
* kselftest-mqueue
* kselftest-net
* kselftest-net-mptcp
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-tc-testing
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user_events
* kselftest-vDSO
* kselftest-x86
* kunit
* kvm-unit-tests
* lava
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-build-clang
* log-parser-build-gcc
* log-parser-test
* ltp-capability
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* perf
* rcutorture
--
Linaro LKFT
https://lkft.linaro.org
Quoted 39 lines · Naresh Kamboju
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.89 release. There are 204 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 Thu, 01 May 2025 16:10:15 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.89-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Following two build regressions found one on riscv and s390.
1)
Regressions on riscv build with allyesconfig and allmodconfig with toolchains gcc-13 and clang-20 failed on stable-rc 6.6.89-rc1.* riscv, build
- clang-20-allmodconfig
- gcc-13-allmodconfig
- gcc-13-allyesconfigRegression Analysis:
- New regression? Yes
- Reproducibility? YesBuild regression: riscv
uprobes.cerror unused variable 'start'
Quoted 7 lines
## Build error riscv
arch/riscv/kernel/probes/uprobes.c: In function 'arch_uprobe_copy_ixol':arch/riscv/kernel/probes/uprobes.c:170:23: error: unused variable 'start' [-Werror=unused-variable]
170 | unsigned long start = (unsigned long)dst;
| ^~~~~
cc1: all warnings being treated as errors
This warning is caused by not having the fixup patch "riscv: Replace function-like macro by static inline function" upstream commit 121f34341d396b666d8a90b24768b40e08ca0d61 in 6.6.89-rc1, 6.1.136-rc1 and 5.15.181-rc1. Looks like it didn't apply cleanly to those versions.
The fixup patch was included in 6.14.5-rc1 and 6.12.26-rc1.
Greg Kroah-Hartman
maintainerQuoted 48 lines · Ron Economos
Quoted 39 lines · Naresh Kamboju
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.89 release. There are 204 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 Thu, 01 May 2025 16:10:15 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.89-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Following two build regressions found one on riscv and s390.
1)
Regressions on riscv build with allyesconfig and allmodconfig with toolchains gcc-13 and clang-20 failed on stable-rc 6.6.89-rc1.* riscv, build
- clang-20-allmodconfig
- gcc-13-allmodconfig
- gcc-13-allyesconfigRegression Analysis:
- New regression? Yes
- Reproducibility? YesBuild regression: riscv
uprobes.cerror unused variable 'start'Quoted 7 lines
## Build error riscv
arch/riscv/kernel/probes/uprobes.c: In function 'arch_uprobe_copy_ixol':arch/riscv/kernel/probes/uprobes.c:170:23: error: unused variable 'start' [-Werror=unused-variable]
170 | unsigned long start = (unsigned long)dst;
| ^~~~~
cc1: all warnings being treated as errors
Quoted 6 lines
This warning is caused by not having the fixup patch "riscv: Replace function-like macro by static inline function" upstream commit
121f34341d396b666d8a90b24768b40e08ca0d61in 6.6.89-rc1, 6.1.136-rc1 and 5.15.181-rc1. Looks like it didn't apply cleanly to those versions.The fixup patch was included in 6.14.5-rc1 and 6.12.26-rc1.
Thanks, I'll go drop this from 5.15.y, 6.1.y, and 6.6.y for now and wait for some fixes to be resent.
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.89 release. There are 204 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 Thu, 01 May 2025 16:10:15 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.89-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.89 release. There are 204 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.