6.1.15-rc1 review
Subsystems (3)
Greg Kroah-Hartman
maintainerPATCH 1/42 Fix XFRM-I support for nested ESP tunnels
In reply to Greg Kroah-HartmanFrom: Benedict Wong <[email protected]>
[ Upstream commit b0355dbbf13c0052931dd14c38c789efed64d3de ]
This change adds support for nested IPsec tunnels by ensuring that XFRM-I verifies existing policies before decapsulating a subsequent policies. Addtionally, this clears the secpath entries after policies are verified, ensuring that previous tunnels with no-longer-valid do not pollute subsequent policy checks.
This is necessary especially for nested tunnels, as the IP addresses, protocol and ports may all change, thus not matching the previous policies. In order to ensure that packets match the relevant inbound templates, the xfrm_policy_check should be done before handing off to the inner XFRM protocol to decrypt and decapsulate.
Notably, raw ESP/AH packets did not perform policy checks inherently, whereas all other encapsulated packets (UDP, TCP encapsulated) do policy checks after calling xfrm_input handling in the respective encapsulation layer.
Test: Verified with additional Android Kernel Unit tests
--- net/xfrm/xfrm_interface.c | 54 ++++++++++++++++++++++++++++++++++++--- net/xfrm/xfrm_policy.c | 3 +++ 2 files changed, 53 insertions(+), 4 deletions(-)
net/xfrm/xfrm_interface.c +50 -4
@@ -310,6 +310,52 @@ static void xfrmi_scrub_packet(struct sk_buff *skb, bool xnet) skb->mark =0 ; } +static int xfrmi_input (struct sk_buff *skb,int nexthdr,__be32 spi, +int encap_type,unsigned short family) +{ +struct sec_path *sp; + + sp =skb_sec_path (skb); +if (sp && (sp->len || sp->olen) && + !xfrm_policy_check (NULL ,XFRM_POLICY_IN , skb, family)) + goto discard; + +XFRM_SPI_SKB_CB (skb)->family = family; +if (family ==AF_INET ) { +XFRM_SPI_SKB_CB (skb)->daddroff = offsetof(struct iphdr , daddr); +XFRM_TUNNEL_SKB_CB (skb)->tunnel.ip4 =NULL ; + }else { +XFRM_SPI_SKB_CB (skb)->daddroff = offsetof(struct ipv6hdr , daddr); +XFRM_TUNNEL_SKB_CB (skb)->tunnel.ip6 =NULL ; + } + +return xfrm_input (skb, nexthdr, spi, encap_type); +discard: +kfree_skb (skb); +return 0 ; +} + +static int xfrmi4_rcv (struct sk_buff *skb) +{ +return xfrmi_input (skb,ip_hdr (skb)->protocol,0 ,0 ,AF_INET ); +} + +static int xfrmi6_rcv (struct sk_buff *skb) +{ +return xfrmi_input (skb,skb_network_header (skb)[IP6CB (skb)->nhoff], +0 ,0 ,AF_INET6 ); +} + +static int xfrmi4_input (struct sk_buff *skb,int nexthdr,__be32 spi,int encap_type) +{ +return xfrmi_input (skb, nexthdr, spi, encap_type,AF_INET ); +} + +static int xfrmi6_input (struct sk_buff *skb,int nexthdr,__be32 spi,int encap_type) +{ +return xfrmi_input (skb, nexthdr, spi, encap_type,AF_INET6 ); +} +static int xfrmi_rcv_cb (struct sk_buff *skb,int err) {const struct xfrm_mode *inner_mode;
@@ -937,8 +983,8 @@ static struct pernet_operations xfrmi_net_ops = { };static struct xfrm6_protocol xfrmi_esp6_protocol__read_mostly = { - .handler = xfrm6_rcv, - .input_handler = xfrm_input, + .handler = xfrmi6_rcv, + .input_handler = xfrmi6_input, .cb_handler = xfrmi_rcv_cb, .err_handler = xfrmi6_err, .priority =10 ,
@@ -988,8 +1034,8 @@ static struct xfrm6_tunnel xfrmi_ip6ip_handler __read_mostly = {#endif static struct xfrm4_protocol xfrmi_esp4_protocol__read_mostly = { - .handler = xfrm4_rcv, - .input_handler = xfrm_input, + .handler = xfrmi4_rcv, + .input_handler = xfrmi4_input, .cb_handler = xfrmi_rcv_cb, .err_handler = xfrmi4_err, .priority =10 ,
net/xfrm/xfrm_policy.c +3 -0
@@ -3670,6 +3670,9 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, goto reject; } +if (if_id) +secpath_reset (skb); +xfrm_pols_put (pols, npols);return 1 ; }
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 10/42 pinctrl: amd: Fix debug output for debounce time
In reply to Greg Kroah-HartmanFrom: Mario Limonciello <[email protected]>
[ Upstream commit c6e0679b8381bf03315e6660cf5370f916c1a1c6 ]
If one GPIO has debounce enabled but future GPIOs in the list don't have debounce the time never gets reset and shows wrong value.
--- drivers/pinctrl/pinctrl-amd.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/pinctrl-amd.c +1 -0
@@ -365,6 +365,7 @@ static void amd_gpio_dbg_show(struct seq_file *s, struct gpio_chip *gc) }else { debounce_enable =" ∅" ; + time =0 ; }snprintf (debounce_value,sizeof (debounce_value),"%u" , time * unit);seq_printf (s,"debounce %s (🕑 %sus)| " , debounce_enable, debounce_value);
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 11/42 btrfs: send: limit number of clones and allocated memory size
In reply to Greg Kroah-HartmanFrom: David Sterba <[email protected]>
[ Upstream commit 33e17b3f5ab74af12aca58c515bc8424ff69a343 ]
The arg->clone_sources_count is u64 and can trigger a warning when a huge value is passed from user space and a huge array is allocated. Limit the allocated memory to 8MiB (can be increased if needed), which in turn limits the number of clone sources to 8M / sizeof(struct clone_root) = 8M / 40 = 209715. Real world number of clones is from tens to hundreds, so this is future proof.
--- fs/btrfs/send.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
fs/btrfs/send.c +3 -3
@@ -7839,10 +7839,10 @@ long btrfs_ioctl_send(struct inode *inode, struct btrfs_ioctl_send_args *arg)/* * Check that we don't overflow at later allocations, we request * clone_sources_count + 1 items, and compare to unsigned long inside -* access_ok. +* access_ok. Also set an upper limit for allocation size so this can't +* easily exhaust memory. Max number of clone sources is about 200K. */ -if (arg->clone_sources_count > -ULONG_MAX /sizeof (struct clone_root ) -1 ) { +if (arg->clone_sources_count >SZ_8M /sizeof (struct clone_root )) { ret = -EINVAL ; goto out; }
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 12/42 arm64: dts: rockchip: align rk3399 DMC OPP table with bindings
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit b67b09733d8a41eec33d5d37be2f8cff8af82a5e ]
Bindings expect certain pattern for OPP table node name and underscores are not allowed:
rk3399-rock-pi-4a-plus.dtb: dmc_opp_table: $nodename:0: 'dmc_opp_table' does not match '^opp-table(-[a-z0-9]+)?$'
--- arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi +1 -1
@@ -111,7 +111,7 @@ opp05 { }; }; - dmc_opp_table: dmc_opp_table { + dmc_opp_table: opp-table-3 { compatible = "operating-points-v2"; opp00 {
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 13/42 ASoC: rt715-sdca: fix clock stop prepare timeout issue
In reply to Greg Kroah-HartmanFrom: Jack Yu <[email protected]>
[ Upstream commit 2036890282d56bcbf7f915ba9e04bf77967ab231 ]
Modify clock_stop_timeout value for rt715-sdca according to the requirement of internal clock trimming.
--- sound/soc/codecs/rt715-sdca-sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt715-sdca-sdw.c +1 -1
@@ -167,7 +167,7 @@ static int rt715_sdca_read_prop(struct sdw_slave *slave) }/* set the timeout values */ - prop->clk_stop_timeout =20 ; + prop->clk_stop_timeout =200 ;return 0 ; }
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 14/42 IB/hfi1: Assign npages earlier
In reply to Greg Kroah-HartmanFrom: Dean Luick <[email protected]>
[ Upstream commit f9c47b2caa7ffc903ec950b454b59c209afe3182 ]
Improve code clarity and enable earlier use oftidbuf->npages by moving its assignment to
structure creation time.
--- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/infiniband/hw/hfi1/user_exp_rcv.c +2 -7
@@ -160,16 +160,11 @@ static void unpin_rcv_pages(struct hfi1_filedata *fd,static int pin_rcv_pages (struct hfi1_filedata *fd,struct tid_user_buf *tidbuf) {int pinned; -unsigned int npages; +unsigned int npages = tidbuf->npages;unsigned long vaddr = tidbuf->vaddr;struct page **pages =NULL ;struct hfi1_devdata *dd = fd->uctxt->dd; -/* Get the number of pages the user buffer spans */ - npages =num_user_pages (vaddr, tidbuf->length); -if (!npages) -return -EINVAL ; -if (npages > fd->uctxt->expected_count) {dd_dev_err (dd,"Expected buffer too big\n" );return -EINVAL ;
@@ -196,7 +191,6 @@ static int pin_rcv_pages(struct hfi1_filedata *fd, struct tid_user_buf *tidbuf)return pinned; } tidbuf->pages = pages; - tidbuf->npages = npages; fd->tid_n_pinned += pinned;return pinned; }
@@ -274,6 +268,7 @@ int hfi1_user_exp_rcv_setup(struct hfi1_filedata *fd,mutex_init (&tidbuf->cover_mutex); tidbuf->vaddr = tinfo->vaddr; tidbuf->length = tinfo->length; + tidbuf->npages =num_user_pages (tidbuf->vaddr, tidbuf->length); tidbuf->psets =kcalloc (uctxt->expected_count,sizeof (*tidbuf->psets),GFP_KERNEL );if (!tidbuf->psets) {
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 15/42 powerpc: Dont select ARCH_WANTS_NO_INSTR
In reply to Greg Kroah-HartmanFrom: Michael Ellerman <[email protected]>
[ Upstream commit e33416fca8a2313b8650bd5807aaf34354d39a4c ]
Commit 41b7a347bf14 ("powerpc: Book3S 64-bit outline-only KASAN support") added a select of ARCH_WANTS_NO_INSTR, because it also added some uses of noinstr. However noinstr is always defined, regardless of ARCH_WANTS_NO_INSTR, so there's no need to select it just for that.
As PeterZ says [1]:
Note that by selecting ARCH_WANTS_NO_INSTR you effectively state to abide by its rules.
As of now the powerpc code does not abide by those rules, and trips some new warnings added by Peter in linux-next.
So until the code can be fixed to avoid those warnings, disable ARCH_WANTS_NO_INSTR.
Note that ARCH_WANTS_NO_INSTR is also used to gate building KCOV and parts of KCSAN. However none of the noinstr annotations in powerpc were added for KCOV or KCSAN, instead instrumentation is blocked at the file level using KCOV_INSTRUMENT_foo.o := n.
[1]: https://lore.kernel.org/linuxppc-dev/[email protected]
--- arch/powerpc/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/powerpc/Kconfig +0 -1
@@ -161,7 +161,6 @@ config PPC select ARCH_WANT_IRQS_OFF_ACTIVATE_MM select ARCH_WANT_LD_ORPHAN_WARN select ARCH_WANTS_MODULES_DATA_IN_VMALLOC if PPC_BOOK3S_32 || PPC_8xx - select ARCH_WANTS_NO_INSTR select ARCH_WEAK_RELEASE_ACQUIRE select BINFMT_ELF select BUILDTIME_TABLE_SORT
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 16/42 ASoC: SOF: amd: Fix for handling spurious interrupts from DSP
In reply to Greg Kroah-HartmanFrom: V sujith kumar Reddy <[email protected]>
[ Upstream commit 2e7c6652f9b86c01cbd4e988057a746a3a461969 ]
As interrupts are Level-triggered,unless and until we deassert the register the interrupts are generated which causes spurious interrupts unhandled.
Now we deasserted the interrupt at top half which solved the below "nobody cared" warning.
warning reported in dmesg:
irq 80: nobody cared (try booting with the "irqpoll" option) CPU: 5 PID: 2735 Comm: irq/80-AudioDSP Not tainted 5.15.86-15817-g4c19f3e06d49 #1 1bd3fd932cf58caacc95b0504d6ea1e3eab22289 Hardware name: Google Skyrim/Skyrim, BIOS Google_Skyrim.15303.0.0 01/03/2023 Call Trace: <IRQ> dump_stack_lvl+0x69/0x97 __report_bad_irq+0x3a/0xae note_interrupt+0x1a9/0x1e3 handle_irq_event_percpu+0x4b/0x6e handle_irq_event+0x36/0x5b handle_fasteoi_irq+0xae/0x171 __common_interrupt+0x48/0xc4 </IRQ> handlers: acp_irq_handler [snd_sof_amd_acp] threaded [<000000007e089f34>] acp_irq_thread [snd_sof_amd_acp] Disabling IRQ #80
--- sound/soc/sof/amd/acp.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-)
sound/soc/sof/amd/acp.c +15 -21
@@ -316,7 +316,6 @@ static irqreturn_t acp_irq_thread(int irq, void *context) {struct snd_sof_dev *sdev = context;const struct sof_amd_acp_desc *desc =get_chip_info (sdev->pdata); -unsigned int base = desc->dsp_intr_base;unsigned int val, count =ACP_HW_SEM_RETRY_COUNT ; val =snd_sof_dsp_read (sdev,ACP_DSP_BAR , desc->ext_intr_stat);
@@ -326,28 +325,20 @@ static irqreturn_t acp_irq_thread(int irq, void *context)return IRQ_HANDLED ; } - val =snd_sof_dsp_read (sdev,ACP_DSP_BAR , base +DSP_SW_INTR_STAT_OFFSET ); -if (val &ACP_DSP_TO_HOST_IRQ ) { -while (snd_sof_dsp_read (sdev,ACP_DSP_BAR , desc->hw_semaphore_offset)) { -/* Wait until acquired HW Semaphore lock or timeout */ - count--; -if (!count) { -dev_err (sdev->dev,"%s: Failed to acquire HW lock\n" , __func__); -return IRQ_NONE ; - } +while (snd_sof_dsp_read (sdev,ACP_DSP_BAR , desc->hw_semaphore_offset)) { +/* Wait until acquired HW Semaphore lock or timeout */ + count--; +if (!count) { +dev_err (sdev->dev,"%s: Failed to acquire HW lock\n" , __func__); +return IRQ_NONE ; } - -sof_ops (sdev)->irq_thread (irq, sdev); - val |=ACP_DSP_TO_HOST_IRQ ; -snd_sof_dsp_write (sdev,ACP_DSP_BAR , base +DSP_SW_INTR_STAT_OFFSET , val); - -/* Unlock or Release HW Semaphore */ -snd_sof_dsp_write (sdev,ACP_DSP_BAR , desc->hw_semaphore_offset,0x0 ); - -return IRQ_HANDLED ; } -return IRQ_NONE ; +sof_ops (sdev)->irq_thread (irq, sdev); +/* Unlock or Release HW Semaphore */ +snd_sof_dsp_write (sdev,ACP_DSP_BAR , desc->hw_semaphore_offset,0x0 ); + +return IRQ_HANDLED ; };static irqreturn_t acp_irq_handler (int irq,void *dev_id)
@@ -358,8 +349,11 @@ static irqreturn_t acp_irq_handler(int irq, void *dev_id)unsigned int val; val =snd_sof_dsp_read (sdev,ACP_DSP_BAR , base +DSP_SW_INTR_STAT_OFFSET ); -if (val) +if (val) { + val |=ACP_DSP_TO_HOST_IRQ ; +snd_sof_dsp_write (sdev,ACP_DSP_BAR , base +DSP_SW_INTR_STAT_OFFSET , val);return IRQ_WAKE_THREAD ; + }return IRQ_NONE ; }
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 17/42 ARM: dts: stihxxx-b2120: fix polarity of reset line of tsin0 port
In reply to Greg Kroah-HartmanFrom: Dmitry Torokhov <[email protected]>
[ Upstream commit 4722dd4029c63f10414ffd8d3ffdd6c748391cd7 ]
According to c8sectpfe driver code we first drive reset line low and then high to reset the port, therefore the reset line is supposed to be annotated as "active low". This will be important when we convert the driver to gpiod API.
--- arch/arm/boot/dts/stihxxx-b2120.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/stihxxx-b2120.dtsi +1 -1
@@ -178,7 +178,7 @@ tsin0: port { tsin-num = <0>; serial-not-parallel; i2c-bus = <&ssc2>; - reset-gpios = <&pio15 4 GPIO_ACTIVE_HIGH>; + reset-gpios = <&pio15 4 GPIO_ACTIVE_LOW>; dvb-card = <STV0367_TDA18212_NIMA_1>; }; };
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 18/42 neigh: make sure used and confirmed times are valid
In reply to Greg Kroah-HartmanFrom: Julian Anastasov <[email protected]>
[ Upstream commit c1d2ecdf5e38e3489ce8328238b558b3b2866fe1 ]
Entries can linger in cache without timer for days, thanks to the gc_thresh1 limit. As result, without traffic, the confirmed time can be outdated and to appear to be in the future. Later, on traffic, NUD_STALE entries can switch to NUD_DELAY and start the timer which can see the invalid confirmed time and wrongly switch to NUD_REACHABLE state instead of NUD_PROBE. As result, timer is set many days in the future. This is more visible on 32-bit platforms, with higher HZ value.
Why this is a problem? While we expect unused entries to expire, such entries stay in REACHABLE state for too long, locked in cache. They are not expired normally, only when cache is full.
Problem and the wrong state change reported by Zhang Changzhong:
172.16.1.18 dev bond0 lladdr 0a:0e:0f:01:12:01 ref 1 used 350521/15994171/350520 probes 4 REACHABLE
350520 seconds have elapsed since this entry was last updated, but it is still in the REACHABLE state (base_reachable_time_ms is 30000), preventing lladdr from being updated through probe.
Fix it by ensuring timer is started with valid used/confirmed times. Considering the valid time range is LONG_MAX jiffies, we try not to go too much in the past while we are in DELAY/PROBE state. There are also places that need used/updated times to be validated while timer is not running.
--- net/core/neighbour.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
net/core/neighbour.c +15 -3
@@ -269,7 +269,7 @@ static int neigh_forced_gc(struct neigh_table *tbl) (n->nud_state == NUD_NOARP) || (tbl->is_multicast && tbl->is_multicast(n->primary_key)) || - time_after(tref, n->updated)) + !time_in_range(n->updated, tref, jiffies)) remove = true;write_unlock (&n->lock);
@@ -289,7 +289,17 @@ static int neigh_forced_gc(struct neigh_table *tbl)static void neigh_add_timer (struct neighbour *n,unsigned long when) { +/* Use safe distance from the jiffies - LONG_MAX point while timer +* is running in DELAY/PROBE state but still show to user space +* large times in the past. +*/ +unsigned long mint = jiffies - (LONG_MAX -86400 *HZ ); +neigh_hold (n); +if (!time_in_range (n->confirmed, mint, jiffies)) + n->confirmed = mint; +if (time_before (n->used, n->confirmed)) + n->used = n->confirmed;if (unlikely (mod_timer (&n->timer, when))) {printk ("NEIGH: BUG, double timer add, state is %x\n" , n->nud_state);
@@ -1001,12 +1011,14 @@ static void neigh_periodic_work(struct work_struct *work) goto next_elt; } -if (time_before (n->used, n->confirmed)) +if (time_before (n->used, n->confirmed) && +time_is_before_eq_jiffies (n->confirmed)) n->used = n->confirmed;if (refcount_read (&n->refcnt) ==1 && (state ==NUD_FAILED || -time_after (jiffies, n->used +NEIGH_VAR (n->parms,GC_STALETIME )))) { + !time_in_range_open (jiffies, n->used, + n->used +NEIGH_VAR (n->parms,GC_STALETIME )))) { *np = n->next;neigh_mark_dead (n);write_unlock (&n->lock);
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 19/42 HID: core: Fix deadloop in hid_apply_multiplier.
In reply to Greg Kroah-HartmanFrom: Xin Zhao <[email protected]>
[ Upstream commit ea427a222d8bdf2bc1a8a6da3ebe247f7dced70c ]
The initial value of hid->collection[].parent_idx if 0. When Report descriptor doesn't contain "HID Collection", the value remains as 0.
In the meanwhile, when the Report descriptor fullfill all following conditions, it will trigger hid_apply_multiplier function call.
1. Usage page is Generic Desktop Ctrls (0x01)
2. Usage is RESOLUTION_MULTIPLIER (0x48)
3. Contain any FEATURE items
The while loop in hid_apply_multiplier will search the top-most collection by searching parent_idx == -1. Because all parent_idx is 0. The loop will run forever.
There is a Report Descriptor triggerring the deadloop
0x05, 0x01, // Usage Page (Generic Desktop Ctrls) 0x09, 0x48, // Usage (0x48) 0x95, 0x01, // Report Count (1) 0x75, 0x08, // Report Size (8) 0xB1, 0x01, // Feature
--- drivers/hid/hid-core.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/hid/hid-core.c +3 -0
@@ -1202,6 +1202,7 @@ int hid_open_report(struct hid_device *device)__u8 *end;__u8 *next;int ret; +int i;static int (*dispatch_type[])(struct hid_parser *parser,struct hid_item *item) = { hid_parser_main,
@@ -1252,6 +1253,8 @@ int hid_open_report(struct hid_device *device) goto err; } device->collection_size =HID_DEFAULT_NUM_COLLECTIONS ; +for (i =0 ; i <HID_DEFAULT_NUM_COLLECTIONS ; i++) + device->collection[i].parent_idx =-1 ; ret = -EINVAL ;while ((next =fetch_item (start, end, &item)) !=NULL ) {
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 2/42 arm64: dts: rockchip: reduce thermal limits on rk3399-pinephone-pro
In reply to Greg Kroah-HartmanFrom: Jarrah Gosbell <[email protected]>
[ Upstream commit 33e24f0738b922b6f5f4118dbdc26cac8400d7b9 ]
While this device uses the rk3399 it is also enclosed in a tight package and cooled through the screen and back case. The default rk3399 thermal limits can result in a burnt screen.
These lower limits have resulted in the existing burn not expanding and will hopefully result in future devices not experiencing the issue.
--- arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +7 -0
@@ -83,6 +83,13 @@ vcc1v8_codec: vcc1v8-codec-regulator { }; }; +&cpu_alert0 { + temperature = <65000>; +}; +&cpu_alert1 { + temperature = <68000>; +}; + &cpu_l0 { cpu-supply = <&vdd_cpu_l>; };
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 20/42 ASoC: codecs: es8326: Fix DTS properties reading
In reply to Greg Kroah-HartmanFrom: Alexey Firago <[email protected]>
[ Upstream commit fe1e7e8ce2c47bd8fd9885eab63fca0a522e94c9 ]
Seems like properties parsing and reading was copy-pasted, so "everest,interrupt-src" and "everest,interrupt-clk" are saved into the es8326->jack_pol variable. This might lead to wrong settings being saved into the reg 57 (ES8326_HP_DET).
Fix this by using proper variables while reading properties.
--- sound/soc/codecs/es8326.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
sound/soc/codecs/es8326.c +4 -2
@@ -729,14 +729,16 @@ static int es8326_probe(struct snd_soc_component *component) }dev_dbg (component->dev,"jack-pol %x" , es8326->jack_pol); - ret =device_property_read_u8 (component->dev,"everest,interrupt-src" , &es8326->jack_pol); + ret =device_property_read_u8 (component->dev,"everest,interrupt-src" , + &es8326->interrupt_src);if (ret !=0 ) {dev_dbg (component->dev,"interrupt-src return %d" , ret); es8326->interrupt_src =ES8326_HP_DET_SRC_PIN9 ; }dev_dbg (component->dev,"interrupt-src %x" , es8326->interrupt_src); - ret =device_property_read_u8 (component->dev,"everest,interrupt-clk" , &es8326->jack_pol); + ret =device_property_read_u8 (component->dev,"everest,interrupt-clk" , + &es8326->interrupt_clk);if (ret !=0 ) {dev_dbg (component->dev,"interrupt-clk return %d" , ret); es8326->interrupt_clk =0x45 ;
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 21/42 HID: Ignore battery for ELAN touchscreen 29DF on HP
In reply to Greg Kroah-HartmanFrom: Luka Guzenko <[email protected]>
[ Upstream commit ebebf05a4b06a1be49788ca0edf990de01c4b0d0 ]
The touchscreen reports a battery status of 0% and jumps to 1% when a stylus is used. The device ID was added and the battery ignore quirk was enabled for it.
--- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/hid/hid-ids.h +1 -0
@@ -413,6 +413,7 @@#define I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100 0x29CF#define I2C_DEVICE_ID_HP_ENVY_X360_EU0009NV 0x2CF9#define I2C_DEVICE_ID_HP_SPECTRE_X360_15 0x2817 +#define I2C_DEVICE_ID_HP_SPECTRE_X360_13_AW0020NG 0x29DF#define I2C_DEVICE_ID_ASUS_TP420IA_TOUCHSCREEN 0x2BC8#define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN 0x2544#define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706
drivers/hid/hid-input.c +2 -0
@@ -386,6 +386,8 @@ static const struct hid_device_id hid_battery_quirks[] = { HID_BATTERY_QUIRK_IGNORE }, {HID_I2C_DEVICE (USB_VENDOR_ID_ELAN ,I2C_DEVICE_ID_HP_SPECTRE_X360_15 ), HID_BATTERY_QUIRK_IGNORE }, + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_13_AW0020NG), + HID_BATTERY_QUIRK_IGNORE }, { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN), HID_BATTERY_QUIRK_IGNORE }, { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_GO2_TOUCHSCREEN),
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 22/42 selftests: ocelot: tc_flower_chains: make test_vlan_ingress_modify() more comprehensive
In reply to Greg Kroah-HartmanFrom: Vladimir Oltean <[email protected]>
[ Upstream commit bbb253b206b9c417928a6c827d038e457f3012e9 ]
We have two IS1 filters of the OCELOT_VCAP_KEY_ANY key type (the one with "action vlan pop" and the one with "action vlan modify") and one of the OCELOT_VCAP_KEY_IPV4 key type (the one with "action skbedit priority"). But we have no IS1 filter with the OCELOT_VCAP_KEY_ETYPE key type, and there was an uncaught breakage there.
To increase test coverage, convert one of the OCELOT_VCAP_KEY_ANY filters to OCELOT_VCAP_KEY_ETYPE, by making the filter also match on the MAC SA of the traffic sent by mausezahn, $h1_mac.
--- tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh +1 -1
@@ -246,7 +246,7 @@ test_vlan_ingress_modify() bridge vlan add dev $swp2 vid 300 tc filter add dev $swp1 ingress chain $(IS1 2) pref 3 \ - protocol 802.1Q flower skip_sw vlan_id 200 \ + protocol 802.1Q flower skip_sw vlan_id 200 src_mac $h1_mac \ action vlan modify id 300 \ action goto chain $(IS2 0 0)
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 23/42 x86/cpu: Add Lunar Lake M
In reply to Greg Kroah-HartmanFrom: Kan Liang <[email protected]>
[ Upstream commit f545e8831e70065e127f903fc7aca09aa50422c7 ]
Intel confirmed the existence of this CPU in Q4'2022 earnings presentation.
Add the CPU model number.
[ dhansen: Merging these as soon as possible makes it easier
on all the folks developing model-specific features. ]
--- arch/x86/include/asm/intel-family.h | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/include/asm/intel-family.h +2 -0
@@ -123,6 +123,8 @@#define INTEL_FAM6_METEORLAKE 0xAC#define INTEL_FAM6_METEORLAKE_L 0xAA +#define INTEL_FAM6_LUNARLAKE_M 0xBD +/* "Small Core" Processors (Atom/E-Core) */ #define INTEL_FAM6_ATOM_BONNELL 0x1C/* Diamondville, Pineview */
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 24/42 PM: sleep: Avoid using pr_cont() in the tasks freezing code
In reply to Greg Kroah-HartmanFrom: Rafael J. Wysocki <[email protected]>
commit a449dfbfc0894676ad0aa1873383265047529e3a upstream.
Using pr_cont() in the tasks freezing code related to system-wide suspend and hibernation is problematic, because the continuation messages printed there are susceptible to interspersing with other unrelated messages which results in output that is hard to understand.
Address this issue by modifying try_to_freeze_tasks() to print messages that don't require continuations and adjusting its callers accordingly.
--- kernel/power/process.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-)
kernel/power/process.c +8 -13
@@ -27,6 +27,8 @@ unsigned int __read_mostly freeze_timeoustatic int try_to_freeze_tasks (bool user_only) { +const char *what = user_only ?"user space processes" : +"remaining freezable tasks" ;struct task_struct *g, *p;unsigned long end_time;unsigned int todo;
@@ -36,6 +38,8 @@ static int try_to_freeze_tasks(bool userbool wakeup = false;int sleep_usecs =USEC_PER_MSEC ; +pr_info ("Freezing %s\n" , what); + start =ktime_get_boottime (); end_time = jiffies +msecs_to_jiffies (freeze_timeout_msecs);
@@ -82,7 +86,6 @@ static int try_to_freeze_tasks(bool user elapsed_msecs =ktime_to_ms (elapsed);if (todo) { -pr_cont ("\n" ); pr_err("Freezing of tasks %s after %d.%03d seconds " "(%d tasks refusing to freeze, wq_busy=%d):\n", wakeup ? "aborted" : "failed",
@@ -101,8 +104,8 @@ static int try_to_freeze_tasks(bool userread_unlock (&tasklist_lock); } }else { -pr_cont ("(elapsed %d.%03d seconds) " , elapsed_msecs /1000 , - elapsed_msecs %1000 ); +pr_info ("Freezing %s completed (elapsed %d.%03d seconds)\n" , + what, elapsed_msecs /1000 , elapsed_msecs %1000 ); }return todo ? -EBUSY :0 ;
@@ -130,14 +133,11 @@ int freeze_processes(void)static_branch_inc (&freezer_active);pm_wakeup_clear (0 ); -pr_info ("Freezing user space processes ... " ); pm_freezing = true; error =try_to_freeze_tasks (true); -if (!error) { +if (!error)__usermodehelper_set_disable_depth (UMH_DISABLED ); -pr_cont ("done." ); - } -pr_cont ("\n" ); +BUG_ON (in_atomic ());/*
@@ -166,14 +166,9 @@ int freeze_kernel_threads(void) {int error; -pr_info ("Freezing remaining freezable tasks ... " ); - pm_nosig_freezing = true; error =try_to_freeze_tasks (false); -if (!error) -pr_cont ("done." ); -pr_cont ("\n" );BUG_ON (in_atomic ());if (error)
Greg Kroah-Hartman
maintainerPATCH 3/42 arm64: dts: rockchip: drop unused LED mode property from rk3328-roc-cc
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 1692bffec674551163a7a4be32f59fdde04ecd27 ]
GPIO LEDs do not have a 'mode' property:
rockchip/rk3328-roc-pc.dtb: leds: led-0: Unevaluated properties are not allowed ('mode' was unexpected)
--- arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 2 -- 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts +0 -2
@@ -96,7 +96,6 @@ power_led: led-0 { linux,default-trigger = "heartbeat"; gpios = <&rk805 1 GPIO_ACTIVE_LOW>; default-state = "on"; - mode = <0x23>; }; user_led: led-1 {
@@ -104,7 +103,6 @@ user_led: led-1 { linux,default-trigger = "mmc1"; gpios = <&rk805 0 GPIO_ACTIVE_LOW>; default-state = "off"; - mode = <0x05>; }; }; };
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 4/42 ARM: dts: rockchip: add power-domains property to dp node on rk3288
In reply to Greg Kroah-HartmanFrom: Johan Jonker <[email protected]>
[ Upstream commit 80422339a75088322b4d3884bd12fa0fe5d11050 ]
The clocks in the Rockchip rk3288 DisplayPort node are included in the power-domain@RK3288_PD_VIO logic, but the power-domains property in the dp node is missing, so fix it.
--- arch/arm/boot/dts/rk3288.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/rk3288.dtsi +1 -0
@@ -1181,6 +1181,7 @@ edp: dp@ff970000 { clock-names = "dp", "pclk"; phys = <&edp_phy>; phy-names = "dp"; + power-domains = <&power RK3288_PD_VIO>; resets = <&cru SRST_EDP>; reset-names = "dp"; rockchip,grf = <&grf>;
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 5/42 arm64: dts: rockchip: add missing #interrupt-cells to rk356x pcie2x1
In reply to Greg Kroah-HartmanFrom: Jensen Huang <[email protected]>
[ Upstream commit a323e6b5737bb6e3d3946369b97099abb7dde695 ]
This fixes the following issue:
pcieport 0000:00:00.0: of_irq_parse_pci: failed with rc=-22
--- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk356x.dtsi +1 -0
@@ -966,6 +966,7 @@ pcie2x1: pcie@fe260000 { clock-names = "aclk_mst", "aclk_slv", "aclk_dbi", "pclk", "aux"; device_type = "pci"; + #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 7>; interrupt-map = <0 0 0 1 &pcie_intc 0>, <0 0 0 2 &pcie_intc 1>,
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 6/42 arm64: dts: rockchip: fix probe of analog sound card on rock-3a
In reply to Greg Kroah-HartmanFrom: Jonas Karlman <[email protected]>
[ Upstream commit 1104693cdfcd337e73ab585a225f05445ff7a864 ]
The following was observed on my Radxa ROCK 3 Model A board:
rockchip-pinctrl pinctrl: pin gpio1-9 already requested by vcc-cam-regulator; cannot claim for fe410000.i2s
...
platform rk809-sound: deferred probe pending
Fix this by supplying a board specific pinctrl with the i2s1 pins used by pmic codec according to the schematic [1].
[1] https://dl.radxa.com/rock3/docs/hw/3a/ROCK-3A-V1.3-SCH.pdf
--- arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +2 -0
@@ -521,6 +521,8 @@ &i2s0_8ch { }; &i2s1_8ch { + pinctrl-names = "default"; + pinctrl-0 = <&i2s1m0_sclktx &i2s1m0_lrcktx &i2s1m0_sdi0 &i2s1m0_sdo0>; rockchip,trcm-sync-tx-only; status = "okay"; };
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 7/42 HID: elecom: add support for TrackBall 056E:011C
In reply to Greg Kroah-HartmanFrom: Takahiro Fujii <[email protected]>
[ Upstream commit 29f316a1d7e0a570be9a47fa283ece53a67cebb7 ]
Make function buttons on ELECOM M-HT1DRBK trackball mouse work. This model has two devices with different device IDs (010D and 011C). Both of them misreports the number of buttons as 5 in the report descriptor, even though they have 8 buttons. hid-elecom overwrites the report to fix them, but supports only on 010D and does not work on 011C. This patch fixes 011C in the similar way but with specialized position parameters. In fact, it is sufficient to rewrite only 17th byte (05 -> 08). However I followed the existing way.
--- drivers/hid/hid-elecom.c | 16 ++++++++++++++-- drivers/hid/hid-ids.h | 3 ++- drivers/hid/hid-quirks.c | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-)
drivers/hid/hid-elecom.c +14 -2
@@ -12,6 +12,7 @@* Copyright (c) 2017 Alex Manoussakis <[email protected]> * Copyright (c) 2017 Tomasz Kramkowski <[email protected]> * Copyright (c) 2020 YOSHIOKA Takuma <[email protected]> +* Copyright (c) 2022 Takahiro Fujii <[email protected]> */ /*
@@ -89,7 +90,7 @@ static __u8 *elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc,case USB_DEVICE_ID_ELECOM_M_DT1URBK :case USB_DEVICE_ID_ELECOM_M_DT1DRBK :case USB_DEVICE_ID_ELECOM_M_HT1URBK : -case USB_DEVICE_ID_ELECOM_M_HT1DRBK : +case USB_DEVICE_ID_ELECOM_M_HT1DRBK_010D :/* * Report descriptor format: * 12: button bit count
@@ -99,6 +100,16 @@ static __u8 *elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc,*/ mouse_button_fixup (hdev, rdesc, *rsize,12 ,30 ,14 ,20 ,8 );break ; +case USB_DEVICE_ID_ELECOM_M_HT1DRBK_011C : +/* +* Report descriptor format: +* 22: button bit count +* 30: padding bit count +* 24: button report size +* 16: button usage maximum +*/ +mouse_button_fixup (hdev, rdesc, *rsize,22 ,30 ,24 ,16 ,8 ); +break ; }return rdesc; }
@@ -112,7 +123,8 @@ static const struct hid_device_id elecom_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_DT1URBK) }, { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_DT1DRBK) }, { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_HT1URBK) }, - { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_HT1DRBK) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_HT1DRBK_010D) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_HT1DRBK_011C) }, { } };MODULE_DEVICE_TABLE (hid, elecom_devices);
drivers/hid/hid-ids.h +2 -1
@@ -428,7 +428,8 @@#define USB_DEVICE_ID_ELECOM_M_DT1URBK 0x00fe#define USB_DEVICE_ID_ELECOM_M_DT1DRBK 0x00ff#define USB_DEVICE_ID_ELECOM_M_HT1URBK 0x010c -#define USB_DEVICE_ID_ELECOM_M_HT1DRBK 0x010d +#define USB_DEVICE_ID_ELECOM_M_HT1DRBK_010D 0x010d +#define USB_DEVICE_ID_ELECOM_M_HT1DRBK_011C 0x011c#define USB_VENDOR_ID_DREAM_CHEEKY 0x1d34#define USB_DEVICE_ID_DREAM_CHEEKY_WN 0x0004
drivers/hid/hid-quirks.c +2 -1
@@ -393,7 +393,8 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_DT1URBK) }, { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_DT1DRBK) }, { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_HT1URBK) }, - { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_HT1DRBK) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_HT1DRBK_010D) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_HT1DRBK_011C) }, #endif #if IS_ENABLED(CONFIG_HID_ELO) { HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0009) },
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 8/42 HID: Ignore battery for Elan touchscreen on Asus TP420IA
In reply to Greg Kroah-HartmanFrom: [email protected] <[email protected]>
[ Upstream commit cb963b2c011a62838852c902eccb3f72e5d3dbb6 ]
This device has a touchscreen thats report a battery even if it doesn't have one.
Ask Linux to ignore the battery so it will not always report it as low.
--- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/hid/hid-ids.h +1 -0
@@ -413,6 +413,7 @@#define I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100 0x29CF#define I2C_DEVICE_ID_HP_ENVY_X360_EU0009NV 0x2CF9#define I2C_DEVICE_ID_HP_SPECTRE_X360_15 0x2817 +#define I2C_DEVICE_ID_ASUS_TP420IA_TOUCHSCREEN 0x2BC8#define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN 0x2544#define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706#define I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN 0x261A
drivers/hid/hid-input.c +2 -0
@@ -370,6 +370,8 @@ static const struct hid_device_id hid_battery_quirks[] = { {HID_BLUETOOTH_DEVICE (USB_VENDOR_ID_LOGITECH ,USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD ), HID_BATTERY_QUIRK_IGNORE }, + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_ASUS_TP420IA_TOUCHSCREEN), + HID_BATTERY_QUIRK_IGNORE }, { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN), HID_BATTERY_QUIRK_IGNORE }, { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN),
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainerPATCH 9/42 ACPI: NFIT: fix a potential deadlock during NFIT teardown
In reply to Greg Kroah-HartmanFrom: Vishal Verma <[email protected]>
[ Upstream commit fb6df4366f86dd252bfa3049edffa52d17e7b895 ]
Lockdep reports that acpi_nfit_shutdown() may deadlock against an opportune acpi_nfit_scrub(). acpi_nfit_scrub () is run from inside a 'work' and therefore has already acquired workqueue-internal locks. It also acquiires acpi_desc->init_mutex. acpi_nfit_shutdown() first acquires init_mutex, and was subsequently attempting to cancel any pending workqueue items. This reversed locking order causes a potential deadlock:
======================================================
WARNING: possible circular locking dependency detected
6.2.0-rc3 #116 Tainted: G O N
------------------------------------------------------
libndctl/1958 is trying to acquire lock:
ffff888129b461c0 ((work_completion)(&(&acpi_desc->dwork)->work)){+.+.}-{0:0}, at: __flush_work+0x43/0x450
but task is already holding lock:
ffff888129b460e8 (&acpi_desc->init_mutex){+.+.}-{3:3}, at: acpi_nfit_shutdown+0x87/0xd0 [nfit]
which lock already depends on the new lock.
...
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&acpi_desc->init_mutex);
lock((work_completion)(&(&acpi_desc->dwork)->work));
lock(&acpi_desc->init_mutex);
lock((work_completion)(&(&acpi_desc->dwork)->work));
*** DEADLOCK ***Since the workqueue manipulation is protected by its own internal locking, the cancellation of pending work doesn't need to be done under acpi_desc->init_mutex. Move cancel_delayed_work_sync() outside the init_mutex to fix the deadlock. Any work that starts after acpi_nfit_shutdown() drops the lock will see ARS_CANCEL, and the cancel_delayed_work_sync() will safely flush it out.
--- drivers/acpi/nfit/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/nfit/core.c +1 -1
@@ -3297,8 +3297,8 @@ void acpi_nfit_shutdown(void *data)mutex_lock (&acpi_desc->init_mutex);set_bit (ARS_CANCEL , &acpi_desc->scrub_flags); -cancel_delayed_work_sync (&acpi_desc->dwork);mutex_unlock (&acpi_desc->init_mutex); +cancel_delayed_work_sync (&acpi_desc->dwork);/* * Bounce the nvdimm bus lock to make sure any in-flight
Signature · 1 line
2.39.0
Greg Kroah-Hartman
maintainercover 6.1.15-rc1 review
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.15-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.1.15-rc1
Alan Stern <[email protected]>
USB: core: Don't hold device lock while reading the "descriptors" sysfs file
Carlos Llamas <[email protected]>
scripts/tags.sh: fix incompatibility with PCRE2
Christian Brauner <[email protected]>
fs: use consistent setgid checks in is_sxid()
Christian Brauner <[email protected]>
attr: use consistent sgid stripping checks
Christian Brauner <[email protected]>
attr: add setattr_should_drop_sgid()
Christian Brauner <[email protected]>
fs: move should_remove_suid()
Christian Brauner <[email protected]>
attr: add in_group_or_capable()
Stylon Wang <[email protected]>
drm/amd/display: Properly reuse completion structure
Saranya Gopal <[email protected]>
usb: typec: pd: Remove usb_suspend_supported sysfs from sink PDO
Kunihiko Hayashi <[email protected]>
arm64: dts: uniphier: Fix property name in PXs3 USB node
Prashanth K <[email protected]>
usb: gadget: u_serial: Add null pointer check in gserial_resume
Florian Zumbiehl <[email protected]>
USB: serial: option: add support for VW/Skoda "Carstick LTE"
Heikki Krogerus <[email protected]>
usb: dwc3: pci: add support for the Intel Meteor Lake-M
Stylon Wang <[email protected]>
drm/amd/display: Fix race condition in DPIA AUX transfer
Nicholas Kazlauskas <[email protected]>
drm/amd/display: Move DCN314 DOMAIN power control to DMCUB
Thomas Weißschuh <[email protected]>
vc_screen: don't clobber return value in vcs_read
Kuniyuki Iwashima <[email protected]>
net: Remove WARN_ON_ONCE(sk->sk_forward_alloc) from sk_stream_kill_queues().
Martin KaFai Lau <[email protected]>
bpf: bpf_fib_lookup should not return neigh in NUD_FAILED state
Rafael J. Wysocki <[email protected]>
PM: sleep: Avoid using pr_cont() in the tasks freezing code
Kan Liang <[email protected]>
x86/cpu: Add Lunar Lake M
Vladimir Oltean <[email protected]>
selftests: ocelot: tc_flower_chains: make test_vlan_ingress_modify() more comprehensive
Luka Guzenko <[email protected]>
HID: Ignore battery for ELAN touchscreen 29DF on HP
Alexey Firago <[email protected]>
ASoC: codecs: es8326: Fix DTS properties reading
Xin Zhao <[email protected]>
HID: core: Fix deadloop in hid_apply_multiplier.
Julian Anastasov <[email protected]>
neigh: make sure used and confirmed times are valid
Dmitry Torokhov <[email protected]>
ARM: dts: stihxxx-b2120: fix polarity of reset line of tsin0 port
V sujith kumar Reddy <[email protected]>
ASoC: SOF: amd: Fix for handling spurious interrupts from DSP
Michael Ellerman <[email protected]>
powerpc: Don't select ARCH_WANTS_NO_INSTR
Dean Luick <[email protected]>
IB/hfi1: Assign npages earlier
Jack Yu <[email protected]>
ASoC: rt715-sdca: fix clock stop prepare timeout issue
Krzysztof Kozlowski <[email protected]>
arm64: dts: rockchip: align rk3399 DMC OPP table with bindings
David Sterba <[email protected]>
btrfs: send: limit number of clones and allocated memory size
Mario Limonciello <[email protected]>
pinctrl: amd: Fix debug output for debounce time
Vishal Verma <[email protected]>
ACPI: NFIT: fix a potential deadlock during NFIT teardown
[email protected] <[email protected]>
HID: Ignore battery for Elan touchscreen on Asus TP420IA
Takahiro Fujii <[email protected]>
HID: elecom: add support for TrackBall 056E:011C
Jonas Karlman <[email protected]>
arm64: dts: rockchip: fix probe of analog sound card on rock-3a
Jensen Huang <[email protected]>
arm64: dts: rockchip: add missing #interrupt-cells to rk356x pcie2x1
Johan Jonker <[email protected]>
ARM: dts: rockchip: add power-domains property to dp node on rk3288
Krzysztof Kozlowski <[email protected]>
arm64: dts: rockchip: drop unused LED mode property from rk3328-roc-cc
Jarrah Gosbell <[email protected]>
arm64: dts: rockchip: reduce thermal limits on rk3399-pinephone-pro
Benedict Wong <[email protected]>
Fix XFRM-I support for nested ESP tunnels
-------------
Diffstat:
Documentation/trace/ftrace.rst | 2 +- Makefile | 4 +- arch/arm/boot/dts/rk3288.dtsi | 1 + arch/arm/boot/dts/stihxxx-b2120.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 2 - arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 2 +- .../boot/dts/rockchip/rk3399-pinephone-pro.dts | 7 + arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 + arch/arm64/boot/dts/rockchip/rk356x.dtsi | 1 + .../dts/socionext/uniphier-pxs3-ref-gadget0.dts | 2 +- .../dts/socionext/uniphier-pxs3-ref-gadget1.dts | 2 +- arch/powerpc/Kconfig | 1 - arch/x86/include/asm/intel-family.h | 2 + drivers/acpi/nfit/core.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 150 ++++++++++----------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 17 ++- .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 10 +- .../gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c | 24 ++++ .../gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h | 2 + .../gpu/drm/amd/display/dc/dcn314/dcn314_init.c | 2 +- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 25 ++++ drivers/hid/hid-core.c | 3 + drivers/hid/hid-elecom.c | 16 ++- drivers/hid/hid-ids.h | 5 +- drivers/hid/hid-input.c | 4 + drivers/hid/hid-quirks.c | 3 +- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 9 +- drivers/pinctrl/pinctrl-amd.c | 1 + drivers/tty/vt/vc_screen.c | 7 +- drivers/usb/core/hub.c | 5 +- drivers/usb/core/sysfs.c | 5 - drivers/usb/dwc3/dwc3-pci.c | 4 + drivers/usb/gadget/function/u_serial.c | 23 +++- drivers/usb/serial/option.c | 4 + drivers/usb/typec/pd.c | 1 - fs/attr.c | 74 +++++++++- fs/btrfs/send.c | 6 +- fs/fuse/file.c | 2 +- fs/inode.c | 64 ++++----- fs/internal.h | 10 +- fs/ocfs2/file.c | 4 +- fs/open.c | 8 +- include/linux/fs.h | 4 +- kernel/power/process.c | 21 ++- net/caif/caif_socket.c | 1 + net/core/filter.c | 4 +- net/core/neighbour.c | 18 ++- net/core/stream.c | 1 - net/xfrm/xfrm_interface.c | 54 +++++++- net/xfrm/xfrm_policy.c | 3 + scripts/tags.sh | 2 +- sound/soc/codecs/es8326.c | 6 +- sound/soc/codecs/rt715-sdca-sdw.c | 2 +- sound/soc/sof/amd/acp.c | 36 +++-- .../drivers/net/ocelot/tc_flower_chains.sh | 2 +- 55 files changed, 446 insertions(+), 228 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 26/42 net: Remove WARN_ON_ONCE(sk->sk_forward_alloc) from sk_stream_kill_queues().
From: Kuniyuki Iwashima <[email protected]>
commit 62ec33b44e0f7168ff2886520fec6fb62d03b5a3 upstream.
Christoph Paasch reported that commit b5fc29233d28 ("inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().") started triggering WARN_ON_ONCE(sk->sk_forward_alloc) in sk_stream_kill_queues(). [0 - 2] Also, we can reproduce it by a program in [3].
In the commit, we delay freeing ipv6_pinfo.pktoptions from sk->destroy() to sk->sk_destruct(), so sk->sk_forward_alloc is no longer zero in inet_csk_destroy_sock().
The same check has been in inet_sock_destruct() from at least v2.6, we can just remove the WARN_ON_ONCE(). However, among the users of sk_stream_kill_queues(), only CAIF is not calling inet_sock_destruct(). Thus, we add the same WARN_ON_ONCE() to caif_sock_destructor().
[0]: https://lore.kernel.org/netdev/[email protected]/
[1]: https://github.com/multipath-tcp/mptcp_net-next/issues/341
[2]:
WARNING: CPU: 0 PID: 3232 at net/core/stream.c:212 sk_stream_kill_queues+0x2f9/0x3e0 Modules linked in: CPU: 0 PID: 3232 Comm: syz-executor.0 Not tainted 6.2.0-rc5ab24eb4698afbe147b424149c529e2a43ec24eb5 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:sk_stream_kill_queues+0x2f9/0x3e0 Code: 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e ec 00 00 00 8b ab 08 01 00 00 e9 60 ff ff ff e8 d0 5f b6 fe 0f 0b eb 97 e8 c7 5f b6 fe <0f> 0b eb a0 e8 be 5f b6 fe 0f 0b e9 6a fe ff ff e8 02 07 e3 fe e9 RSP: 0018:ffff88810570fc68 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff888101f38f40 RSI: ffffffff8285e529 RDI: 0000000000000005 RBP: 0000000000000ce0 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000ce0 R11: 0000000000000001 R12: ffff8881009e9488 R13: ffffffff84af2cc0 R14: 0000000000000000 R15: ffff8881009e9458 FS: 00007f7fdfbd5800(0000) GS:ffff88811b600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b32923000 CR3: 00000001062fc006 CR4: 0000000000170ef0 Call Trace: <TASK> inet_csk_destroy_sock+0x1a1/0x320 __tcp_close+0xab6/0xe90 tcp_close+0x30/0xc0 inet_release+0xe9/0x1f0 inet6_release+0x4c/0x70 __sock_release+0xd2/0x280 sock_close+0x15/0x20 __fput+0x252/0xa20 task_work_run+0x169/0x250 exit_to_user_mode_prepare+0x113/0x120 syscall_exit_to_user_mode+0x1d/0x40 do_syscall_64+0x48/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f7fdf7ae28d Code: c1 20 00 00 75 10 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ee fb ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 37 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00000000007dfbb0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f7fdf7ae28d RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000000000003 RBP: 0000000000000000 R08: 000000007f338e0f R09: 0000000000000e0f R10: 000000007f338e13 R11: 0000000000000293 R12: 00007f7fdefff000 R13: 00007f7fdefffcd8 R14: 00007f7fdefffce0 R15: 00007f7fdefffcd8 </TASK>
[3]: https://lore.kernel.org/netdev/[email protected]/
--- net/caif/caif_socket.c | 1 + net/core/stream.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
net/caif/caif_socket.c +1 -0
@@ -1015,6 +1015,7 @@ static void caif_sock_destructor(structreturn ; }sk_stream_kill_queues (&cf_sk->sk); +WARN_ON_ONCE (sk->sk_forward_alloc);caif_free_client (&cf_sk->layer); }
net/core/stream.c +0 -1
@@ -209,7 +209,6 @@ void sk_stream_kill_queues(struct sock *sk_mem_reclaim_final (sk);WARN_ON_ONCE (sk->sk_wmem_queued); -WARN_ON_ONCE (sk->sk_forward_alloc);/* It is _impossible_ for the backlog to contain anything * when we get here. All user references to this socket
Greg Kroah-Hartman
maintainerPATCH 35/42 drm/amd/display: Properly reuse completion structure
In reply to Greg Kroah-HartmanFrom: Stylon Wang <[email protected]>
commit 0cf8307adbc6beb5ff3b8a76afedc6e4e0b536a9 upstream.
[Why]
Connecting displays to TBT3 docks often produces invalid replies for DPIA AUX requests. It turns out the completion structure was not re-initialized before reusing it, resulting in immature wake up to completion.
[How]
Properly call reinit_completion() on reused completion structure.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -0
@@ -10251,6 +10251,7 @@ int amdgpu_dm_process_dmub_aux_transfer_ ret = p_notify->aux_reply.length; *operation_result = p_notify->result; out: +reinit_completion (&adev->dm.dmub_aux_transfer_done);mutex_unlock (&adev->dm.dpia_aux_lock);return ret; }
@@ -10278,6 +10279,8 @@ int amdgpu_dm_process_dmub_set_config_sy *operation_result =SET_CONFIG_UNKNOWN_ERROR ; } +if (!is_cmd_complete) +reinit_completion (&adev->dm.dmub_aux_transfer_done);mutex_unlock (&adev->dm.dpia_aux_lock);return ret; }
Greg Kroah-Hartman
maintainerPATCH 36/42 attr: add in_group_or_capable()
In reply to Greg Kroah-HartmanFrom: Christian Brauner <[email protected]>
commit 11c2a8700cdcabf9b639b7204a1e38e2a0b6798e upstream.
In setattr_{copy,prepare}() we need to perform the same permission checks to determine whether we need to drop the setgid bit or not. Instead of open-coding it twice add a simple helper the encapsulates the logic. We will reuse this helpers to make dropping the setgid bit during write operations more consistent in a follow up patch.
--- fs/attr.c | 10 +++++----- fs/inode.c | 28 ++++++++++++++++++++++++---- fs/internal.h | 2 ++ 3 files changed, 31 insertions(+), 9 deletions(-)
fs/attr.c +5 -5
@@ -18,6 +18,8 @@#include <linux/evm.h> #include <linux/ima.h> +#include "internal.h" +/** * chown_ok - verify permissions to chown inode * @mnt_userns: user namespace of the mount @inode was found from
@@ -140,8 +142,7 @@ int setattr_prepare(struct user_namespac vfsgid =i_gid_into_vfsgid (mnt_userns, inode);/* Also check the setgid bit! */ -if (!vfsgid_in_group_p (vfsgid) && - !capable_wrt_inode_uidgid (mnt_userns, inode,CAP_FSETID )) +if (!in_group_or_capable (mnt_userns, inode, vfsgid)) attr->ia_mode &= ~S_ISGID ; }
@@ -251,9 +252,8 @@ void setattr_copy(struct user_namespace inode->i_ctime = attr->ia_ctime;if (ia_valid &ATTR_MODE ) {umode_t mode = attr->ia_mode; -vfsgid_t vfsgid =i_gid_into_vfsgid (mnt_userns, inode); -if (!vfsgid_in_group_p (vfsgid) && - !capable_wrt_inode_uidgid (mnt_userns, inode,CAP_FSETID )) +if (!in_group_or_capable (mnt_userns, inode, +i_gid_into_vfsgid (mnt_userns, inode))) mode &= ~S_ISGID ; inode->i_mode = mode; }
fs/inode.c +24 -4
@@ -2488,6 +2488,28 @@ struct timespec64 current_time(struct inEXPORT_SYMBOL (current_time);/** +* in_group_or_capable - check whether caller is CAP_FSETID privileged +* @mnt_userns: user namespace of the mount @inode was found from +* @inode: inode to check +* @vfsgid: the new/current vfsgid of @inode +* +* Check wether @vfsgid is in the caller's group list or if the caller is +* privileged with CAP_FSETID over @inode. This can be used to determine +* whether the setgid bit can be kept or must be dropped. +* +* Return: true if the caller is sufficiently privileged, false if not. +*/ +bool in_group_or_capable (struct user_namespace *mnt_userns, +const struct inode *inode,vfsgid_t vfsgid) +{ +if (vfsgid_in_group_p (vfsgid)) +return true; +if (capable_wrt_inode_uidgid (mnt_userns, inode,CAP_FSETID )) +return true; +return false; +} + +/** * mode_strip_sgid - handle the sgid bit for non-directories * @mnt_userns: User namespace of the mount the inode was created from * @dir: parent directory inode
@@ -2508,11 +2530,9 @@ umode_t mode_strip_sgid(struct user_namereturn mode;if (S_ISDIR (mode) || !dir || !(dir->i_mode &S_ISGID ))return mode; -if (in_group_p (i_gid_into_mnt (mnt_userns, dir))) +if (in_group_or_capable (mnt_userns, dir, +i_gid_into_vfsgid (mnt_userns, dir)))return mode; -if (capable_wrt_inode_uidgid (mnt_userns, dir,CAP_FSETID )) -return mode; -return mode & ~S_ISGID ; }EXPORT_SYMBOL (mode_strip_sgid);
fs/internal.h +2 -0
@@ -151,6 +151,8 @@ extern int vfs_open(const struct path *,*/ extern long prune_icache_sb (struct super_block *sb,struct shrink_control *sc);extern int dentry_needs_remove_privs (struct dentry *dentry); +bool in_group_or_capable (struct user_namespace *mnt_userns, +const struct inode *inode,vfsgid_t vfsgid);/* * fs-writeback.c
Greg Kroah-Hartman
maintainerPATCH 37/42 fs: move should_remove_suid()
In reply to Greg Kroah-HartmanFrom: Christian Brauner <[email protected]>
commit e243e3f94c804ecca9a8241b5babe28f35258ef4 upstream.
Move the helper from inode.c to attr.c. This keeps the the core of the set{g,u}id stripping logic in one place when we add follow-up changes. It is the better place anyway, since should_remove_suid() returns ATTR_KILL_S{G,U}ID flags.
--- fs/attr.c | 29 +++++++++++++++++++++++++++++ fs/inode.c | 29 ----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-)
fs/attr.c +29 -0
@@ -20,6 +20,35 @@#include "internal.h" +/* +* The logic we want is +* +* if suid or (sgid and xgrp) +* remove privs +*/ +int should_remove_suid (struct dentry *dentry) +{ +umode_t mode =d_inode (dentry)->i_mode; +int kill =0 ; + +/* suid always must be killed */ +if (unlikely (mode &S_ISUID )) + kill =ATTR_KILL_SUID ; + +/* +* sgid without any exec bits is just a mandatory locking mark; leave +* it alone. If some exec bits are set, it's a real sgid; kill it. +*/ +if (unlikely ((mode &S_ISGID ) && (mode &S_IXGRP ))) + kill |=ATTR_KILL_SGID ; + +if (unlikely (kill && !capable (CAP_FSETID ) &&S_ISREG (mode))) +return kill; + +return 0 ; +} +EXPORT_SYMBOL (should_remove_suid); +/** * chown_ok - verify permissions to chown inode * @mnt_userns: user namespace of the mount @inode was found from
fs/inode.c +0 -29
@@ -1949,35 +1949,6 @@ skip_update:EXPORT_SYMBOL (touch_atime);/* -* The logic we want is -* -* if suid or (sgid and xgrp) -* remove privs -*/ -int should_remove_suid (struct dentry *dentry) -{ -umode_t mode =d_inode (dentry)->i_mode; -int kill =0 ; - -/* suid always must be killed */ -if (unlikely (mode &S_ISUID )) - kill =ATTR_KILL_SUID ; - -/* -* sgid without any exec bits is just a mandatory locking mark; leave -* it alone. If some exec bits are set, it's a real sgid; kill it. -*/ -if (unlikely ((mode &S_ISGID ) && (mode &S_IXGRP ))) - kill |=ATTR_KILL_SGID ; - -if (unlikely (kill && !capable (CAP_FSETID ) &&S_ISREG (mode))) -return kill; - -return 0 ; -} -EXPORT_SYMBOL (should_remove_suid); - -/* * Return mask of changes for notify_change() that need to be done as a * response to write or truncate. Return 0 if nothing has to be changed. * Negative value on error (change should be denied).
Greg Kroah-Hartman
maintainerPATCH 38/42 attr: add setattr_should_drop_sgid()
In reply to Greg Kroah-HartmanFrom: Christian Brauner <[email protected]>
commit 72ae017c5451860443a16fb2a8c243bff3e396b8 upstream.
The current setgid stripping logic during write and ownership change operations is inconsistent and strewn over multiple places. In order to consolidate it and make more consistent we'll add a new helper setattr_should_drop_sgid(). The function retains the old behavior where we remove the S_ISGID bit unconditionally when S_IXGRP is set but also when it isn't set and the caller is neither in the group of the inode nor privileged over the inode.
We will use this helper both in write operation permission removal such as file_remove_privs() as well as in ownership change operations.
--- fs/attr.c | 28 ++++++++++++++++++++++++++++ fs/internal.h | 6 ++++++ 2 files changed, 34 insertions(+)
fs/attr.c +28 -0
@@ -20,6 +20,34 @@#include "internal.h" +/** +* setattr_should_drop_sgid - determine whether the setgid bit needs to be +* removed +* @mnt_userns: user namespace of the mount @inode was found from +* @inode: inode to check +* +* This function determines whether the setgid bit needs to be removed. +* We retain backwards compatibility and require setgid bit to be removed +* unconditionally if S_IXGRP is set. Otherwise we have the exact same +* requirements as setattr_prepare() and setattr_copy(). +* +* Return: ATTR_KILL_SGID if setgid bit needs to be removed, 0 otherwise. +*/ +int setattr_should_drop_sgid (struct user_namespace *mnt_userns, +const struct inode *inode) +{ +umode_t mode = inode->i_mode; + +if (!(mode &S_ISGID )) +return 0 ; +if (mode &S_IXGRP ) +return ATTR_KILL_SGID ; +if (!in_group_or_capable (mnt_userns, inode, +i_gid_into_vfsgid (mnt_userns, inode))) +return ATTR_KILL_SGID ; +return 0 ; +} +/* * The logic we want is *
fs/internal.h +6 -0
@@ -236,3 +236,9 @@ int do_setxattr(struct user_namespace *m struct xattr_ctx *ctx);ssize_t __kernel_write_iter (struct file *file,struct iov_iter *from,loff_t *pos); + +/* +* fs/attr.c +*/ +int setattr_should_drop_sgid (struct user_namespace *mnt_userns, +const struct inode *inode);
Greg Kroah-Hartman
maintainerPATCH 39/42 attr: use consistent sgid stripping checks
In reply to Greg Kroah-HartmanFrom: Christian Brauner <[email protected]>
commit ed5a7047d2011cb6b2bf84ceb6680124cc6a7d95 upstream.
Currently setgid stripping in file_remove_privs()'s should_remove_suid() helper is inconsistent with other parts of the vfs. Specifically, it only raises ATTR_KILL_SGID if the inode is S_ISGID and S_IXGRP but not if the inode isn't in the caller's groups and the caller isn't privileged over the inode although we require this already in setattr_prepare() and setattr_copy() and so all filesystem implement this requirement implicitly because they have to use setattr_{prepare,copy}() anyway.
But the inconsistency shows up in setgid stripping bugs for overlayfs in xfstests (e.g., generic/673, generic/683, generic/685, generic/686, generic/687). For example, we test whether suid and setgid stripping works correctly when performing various write-like operations as an unprivileged user (fallocate, reflink, write, etc.):
echo "Test 1 - qa_user, non-exec file $verb"setup_testfile
chmod a+rws $junk_filecommit_and_check "$qa_user" "$verb" 64k 64k
The test basically creates a file with 6666 permissions. While the file has the S_ISUID and S_ISGID bits set it does not have the S_IXGRP set. On a regular filesystem like xfs what will happen is:
sys_fallocate()
-> vfs_fallocate()
-> xfs_file_fallocate()
-> file_modified()
-> __file_remove_privs()
-> dentry_needs_remove_privs()
-> should_remove_suid()
-> __remove_privs()
newattrs.ia_valid = ATTR_FORCE | kill;
-> notify_change()
-> setattr_copy()In should_remove_suid() we can see that ATTR_KILL_SUID is raised unconditionally because the file in the test has S_ISUID set.
But we also see that ATTR_KILL_SGID won't be set because while the file is S_ISGID it is not S_IXGRP (see above) which is a condition for ATTR_KILL_SGID being raised.
So by the time we call notify_change() we have attr->ia_valid set to ATTR_KILL_SUID | ATTR_FORCE. Now notify_change() sees that ATTR_KILL_SUID is set and does:
ia_valid = attr->ia_valid |= ATTR_MODEattr->ia_mode = (inode->i_mode & ~S_ISUID);
which means that when we call setattr_copy() later we will definitely update inode->i_mode. Note that attr->ia_mode still contains S_ISGID.
Now we call into the filesystem's ->setattr() inode operation which will end up calling setattr_copy(). Since ATTR_MODE is set we will hit:
if (ia_valid & ATTR_MODE) {
umode_t mode = attr->ia_mode;
vfsgid_t vfsgid = i_gid_into_vfsgid(mnt_userns, inode);
if (!vfsgid_in_group_p(vfsgid) &&
!capable_wrt_inode_uidgid(mnt_userns, inode, CAP_FSETID))
mode &= ~S_ISGID;
inode->i_mode = mode;
}and since the caller in the test is neither capable nor in the group of the inode the S_ISGID bit is stripped.
But assume the file isn't suid then ATTR_KILL_SUID won't be raised which has the consequence that neither the setgid nor the suid bits are stripped even though it should be stripped because the inode isn't in the caller's groups and the caller isn't privileged over the inode.
If overlayfs is in the mix things become a bit more complicated and the bug shows up more clearly. When e.g., ovl_setattr() is hit from ovl_fallocate()'s call to file_remove_privs() then ATTR_KILL_SUID and ATTR_KILL_SGID might be raised but because the check in notify_change() is questioning the ATTR_KILL_SGID flag again by requiring S_IXGRP for it to be stripped the S_ISGID bit isn't removed even though it should be stripped:
sys_fallocate()
-> vfs_fallocate()
-> ovl_fallocate()
-> file_remove_privs()
-> dentry_needs_remove_privs()
-> should_remove_suid()
-> __remove_privs()
newattrs.ia_valid = ATTR_FORCE | kill;
-> notify_change()
-> ovl_setattr()
// TAKE ON MOUNTER'S CREDS
-> ovl_do_notify_change()
-> notify_change()
// GIVE UP MOUNTER'S CREDS
// TAKE ON MOUNTER'S CREDS
-> vfs_fallocate()
-> xfs_file_fallocate()
-> file_modified()
-> __file_remove_privs()
-> dentry_needs_remove_privs()
-> should_remove_suid()
-> __remove_privs()
newattrs.ia_valid = attr_force | kill;
-> notify_change()The fix for all of this is to make file_remove_privs()'s should_remove_suid() helper to perform the same checks as we already require in setattr_prepare() and setattr_copy() and have notify_change() not pointlessly requiring S_IXGRP again. It doesn't make any sense in the first place because the caller must calculate the flags via should_remove_suid() anyway which would raise ATTR_KILL_SGID.
While we're at it we move should_remove_suid() from inode.c to attr.c where it belongs with the rest of the iattr helpers. Especially since it returns ATTR_KILL_S{G,U}ID flags. We also rename it to setattr_should_drop_suidgid() to better reflect that it indicates both setuid and setgid bit removal and also that it returns attr flags.
Running xfstests with this doesn't report any regressions. We should really try and use consistent checks.
--- Documentation/trace/ftrace.rst | 2 +- fs/attr.c | 33 +++++++++++++++++++-------------- fs/fuse/file.c | 2 +- fs/inode.c | 7 ++++--- fs/internal.h | 2 +- fs/ocfs2/file.c | 4 ++-- fs/open.c | 8 ++++---- include/linux/fs.h | 2 +- 8 files changed, 33 insertions(+), 27 deletions(-)
Documentation/trace/ftrace.rst +1 -1
@@ -2940,7 +2940,7 @@ Produces:: bash-1994 [000] .... 4342.324898: ima_get_action <-process_measurement bash-1994 [000] .... 4342.324898: ima_match_policy <-ima_get_action bash-1994 [000] .... 4342.324899: do_truncate <-do_last - bash-1994 [000] .... 4342.324899: should_remove_suid <-do_truncate + bash-1994 [000] .... 4342.324899: setattr_should_drop_suidgid <-do_truncate bash-1994 [000] .... 4342.324899: notify_change <-do_truncate bash-1994 [000] .... 4342.324900: current_fs_time <-notify_change bash-1994 [000] .... 4342.324900: current_kernel_time <-current_fs_time
fs/attr.c +19 -14
@@ -48,34 +48,39 @@ int setattr_should_drop_sgid(struct userreturn 0 ; } -/* -* The logic we want is +/** +* setattr_should_drop_suidgid - determine whether the set{g,u}id bit needs to +* be dropped +* @mnt_userns: user namespace of the mount @inode was found from +* @inode: inode to check +* +* This function determines whether the set{g,u}id bits need to be removed. +* If the setuid bit needs to be removed ATTR_KILL_SUID is returned. If the +* setgid bit needs to be removed ATTR_KILL_SGID is returned. If both +* set{g,u}id bits need to be removed the corresponding mask of both flags is +* returned. * -* if suid or (sgid and xgrp) -* remove privs +* Return: A mask of ATTR_KILL_S{G,U}ID indicating which - if any - setid bits +* to remove, 0 otherwise. */ -int should_remove_suid (struct dentry *dentry) +int setattr_should_drop_suidgid (struct user_namespace *mnt_userns, +struct inode *inode) { -umode_t mode =d_inode (dentry)->i_mode; +umode_t mode = inode->i_mode;int kill =0 ;/* suid always must be killed */ if (unlikely (mode &S_ISUID )) kill =ATTR_KILL_SUID ; -/* -* sgid without any exec bits is just a mandatory locking mark; leave -* it alone. If some exec bits are set, it's a real sgid; kill it. -*/ -if (unlikely ((mode &S_ISGID ) && (mode &S_IXGRP ))) - kill |=ATTR_KILL_SGID ; + kill |=setattr_should_drop_sgid (mnt_userns, inode);if (unlikely (kill && !capable (CAP_FSETID ) &&S_ISREG (mode)))return kill;return 0 ; } -EXPORT_SYMBOL (should_remove_suid); +EXPORT_SYMBOL (setattr_should_drop_suidgid);/** * chown_ok - verify permissions to chown inode
@@ -432,7 +437,7 @@ int notify_change(struct user_namespace } }if (ia_valid &ATTR_KILL_SGID ) { -if ((mode & (S_ISGID |S_IXGRP )) == (S_ISGID |S_IXGRP )) { +if (mode &S_ISGID ) {if (!(ia_valid &ATTR_MODE )) { ia_valid = attr->ia_valid |=ATTR_MODE ; attr->ia_mode = inode->i_mode;
fs/fuse/file.c +1 -1
@@ -1313,7 +1313,7 @@ static ssize_t fuse_cache_write_iter(strreturn err;if (fc->handle_killpriv_v2 && -should_remove_suid (file_dentry (file))) { +setattr_should_drop_suidgid (&init_user_ns,file_inode (file))) { goto writethrough; }
fs/inode.c +4 -3
@@ -1953,7 +1953,8 @@ EXPORT_SYMBOL(touch_atime);* response to write or truncate. Return 0 if nothing has to be changed. * Negative value on error (change should be denied). */ -int dentry_needs_remove_privs (struct dentry *dentry) +int dentry_needs_remove_privs (struct user_namespace *mnt_userns, +struct dentry *dentry) {struct inode *inode =d_inode (dentry);int mask =0 ;
@@ -1962,7 +1963,7 @@ int dentry_needs_remove_privs(struct denif (IS_NOSEC (inode))return 0 ; - mask =should_remove_suid (dentry); + mask =setattr_should_drop_suidgid (mnt_userns, inode); ret =security_inode_need_killpriv (dentry);if (ret <0 )return ret;
@@ -1994,7 +1995,7 @@ static int __file_remove_privs(struct fiif (IS_NOSEC (inode) || !S_ISREG (inode->i_mode))return 0 ; - kill =dentry_needs_remove_privs (dentry); + kill =dentry_needs_remove_privs (file_mnt_user_ns (file), dentry);if (kill <0 )return kill;
fs/internal.h +1 -1
@@ -150,7 +150,7 @@ extern int vfs_open(const struct path *,* inode.c */ extern long prune_icache_sb (struct super_block *sb,struct shrink_control *sc); -extern int dentry_needs_remove_privs (struct dentry *dentry); +int dentry_needs_remove_privs (struct user_namespace *,struct dentry *dentry);bool in_group_or_capable (struct user_namespace *mnt_userns,const struct inode *inode,vfsgid_t vfsgid);
fs/ocfs2/file.c +2 -2
@@ -1991,7 +1991,7 @@ static int __ocfs2_change_file_space(str } } -if (file &&should_remove_suid (file->f_path.dentry)) { +if (file &&setattr_should_drop_suidgid (&init_user_ns,file_inode (file))) { ret =__ocfs2_write_remove_suid (inode, di_bh);if (ret) {mlog_errno (ret);
@@ -2279,7 +2279,7 @@ static int ocfs2_prepare_inode_for_write* inode. There's also the dinode i_size state which * can be lost via setattr during extending writes (we * set inode->i_size at the end of a write. */ -if (should_remove_suid (dentry)) { +if (setattr_should_drop_suidgid (&init_user_ns, inode)) {if (meta_level ==0 ) { ocfs2_inode_unlock_for_extent_tree(inode, &di_bh,
fs/open.c +4 -4
@@ -54,7 +54,7 @@ int do_truncate(struct user_namespace *m }/* Remove suid, sgid, and file capabilities on truncate too */ - ret =dentry_needs_remove_privs (dentry); + ret =dentry_needs_remove_privs (mnt_userns, dentry);if (ret <0 )return ret;if (ret)
@@ -723,10 +723,10 @@ retry_deleg:return -EINVAL ;if ((group != (gid_t)-1 ) && !setattr_vfsgid (&newattrs, gid))return -EINVAL ; -if (!S_ISDIR (inode->i_mode)) - newattrs.ia_valid |= -ATTR_KILL_SUID |ATTR_KILL_SGID |ATTR_KILL_PRIV ;inode_lock (inode); +if (!S_ISDIR (inode->i_mode)) + newattrs.ia_valid |=ATTR_KILL_SUID |ATTR_KILL_PRIV | +setattr_should_drop_sgid (mnt_userns, inode);/* Continue to send actual fs values, not the mount values. */ error = security_path_chown( path,
include/linux/fs.h +1 -1
@@ -3118,7 +3118,7 @@ extern void __destroy_inode(struct inodeextern struct inode *new_inode_pseudo (struct super_block *sb);extern struct inode *new_inode (struct super_block *sb);extern void free_inode_nonrcu (struct inode *inode); -extern int should_remove_suid (struct dentry *); +extern int setattr_should_drop_suidgid (struct user_namespace *,struct inode *);extern int file_remove_privs (struct file *);/*
Greg Kroah-Hartman
maintainerPATCH 40/42 fs: use consistent setgid checks in is_sxid()
In reply to Greg Kroah-HartmanFrom: Christian Brauner <[email protected]>
commit 8d84e39d76bd83474b26cb44f4b338635676e7e8 upstream.
Now that we made the VFS setgid checking consistent an inode can't be marked security irrelevant even if the setgid bit is still set. Make this function consistent with all other helpers.
Note that enforcing consistent setgid stripping checks for file modification and mode- and ownership changes will cause the setgid bit to be lost in more cases than useed to be the case. If an unprivileged user wrote to a non-executable setgid file that they don't have privilege over the setgid bit will be dropped. This will lead to temporary failures in some xfstests until they have been updated.
--- include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/fs.h +1 -1
@@ -3549,7 +3549,7 @@ int __init list_bdev_fs_names(char *buf,static inline bool is_sxid (umode_t mode) { -return (mode &S_ISUID ) || ((mode &S_ISGID ) && (mode &S_IXGRP )); +return mode & (S_ISUID |S_ISGID ); } static inline int check_sticky(struct user_namespace *mnt_userns,
Greg Kroah-Hartman
maintainerPATCH 41/42 scripts/tags.sh: fix incompatibility with PCRE2
In reply to Greg Kroah-HartmanFrom: Carlos Llamas <[email protected]>
commit 6ec363fc6142226b9ab5a6528f65333d729d2b6b upstream.
Starting with release 10.38 PCRE2 drops default support for using \K in lookaround patterns as described in [1]. Unfortunately, scripts/tags.sh relies on such functionality to collect all_compiled_soures() leading to the following error:
$ make COMPILED_SOURCE=1 tags
GEN tags
grep: \K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK)The usage of \K for this pattern was introduced in commit 4f491bb6ea2a ("scripts/tags.sh: collect compiled source precisely") which speeds up the generation of tags significantly.
In order to fix this issue without compromising the performance we can switch over to an equivalent sed expression. The same matching pattern is preserved here except \K is replaced with a backreference \1.
[1] https://www.pcre.org/current/doc/html/pcre2syntax.html#SEC11
--- scripts/tags.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/tags.sh +1 -1
@@ -91,7 +91,7 @@ all_compiled_sources() { echo include/generated/autoconf.h find $ignore -name "*.cmd" -exec \ - grep -Poh '(?(?=^source_.* \K).*|(?=^ \K\S).*(?= \\))' {} \+ | + sed -n -E 's/^source_.* (.*)/\1/p; s/^ (\S.*) \\/\1/p' {} \+ | awk '!a[$0]++' } | xargs realpath -esq $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) | sort -u
Greg Kroah-Hartman
maintainerPATCH 42/42 USB: core: Dont hold device lock while reading the "descriptors" sysfs file
In reply to Greg Kroah-HartmanFrom: Alan Stern <[email protected]>
commit 45bf39f8df7f05efb83b302c65ae3b9bc92b7065 upstream.
Ever since commit 83e83ecb79a8 ("usb: core: get config and string descriptors for unauthorized devices") was merged in 2013, there has been no mechanism for reallocating the rawdescriptors buffers in struct usb_device after the initial enumeration. Before that commit, the buffers would be deallocated when a device was deauthorized and reallocated when it was authorized and enumerated.
This means that the locking in the read_descriptors() routine is not needed, since the buffers it reads will never be reallocated while the routine is running. This locking can interfere with user programs trying to read a hub's descriptors via sysfs while new child devices of the hub are being initialized, since the hub is locked during this procedure.
Since the locking in read_descriptors() hasn't been needed for over nine years, we can remove it.
--- drivers/usb/core/hub.c | 5 ++--- drivers/usb/core/sysfs.c | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-)
drivers/usb/core/hub.c +2 -3
@@ -2389,9 +2389,8 @@ static int usb_enumerate_device_otg(stru* usb_enumerate_device - Read device configs/intfs/otg (usbcore-internal) * @udev: newly addressed device (in ADDRESS state) * -* This is only called by usb_new_device() and usb_authorize_device() -* and FIXME -- all comments that apply to them apply here wrt to -* environment. +* This is only called by usb_new_device() -- all comments that apply there +* apply here wrt to environment. * * If the device is WUSB and not authorized, we don't attempt to read * the string descriptors, as they will be errored out by the device
drivers/usb/core/sysfs.c +0 -5
@@ -868,11 +868,7 @@ read_descriptors(struct file *filp, strusize_t srclen, n;int cfgno;void *src; -int retval; - retval =usb_lock_device_interruptible (udev); -if (retval <0 ) -return -EINTR ;/* The binary attribute begins with the device descriptor. * Following that are the raw descriptor entries for all the * configurations (config plus subsidiary descriptors).
@@ -897,7 +893,6 @@ read_descriptors(struct file *filp, stru off -= srclen; } } -usb_unlock_device (udev);return count - nleft; }
Greg Kroah-Hartman
maintainerPATCH 27/42 vc_screen: dont clobber return value in vcs_read
In reply to Greg Kroah-HartmanFrom: Thomas Weißschuh <[email protected]>
commit ae3419fbac845b4d3f3a9fae4cc80c68d82cdf6e upstream.
Commit 226fae124b2d ("vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF") moved the call to vcs_vc() into the loop.
While doing this it also moved the unconditional assignment of
ret = -ENXIO;
This unconditional assignment was valid outside the loop but within it it clobbers the actual value of ret.
To avoid this only assign "ret = -ENXIO" when actually needed.
[ Also, the 'goto unlock_out" needs to be just a "break", so that it
does the right thing when it exits on later iterations when partial success has happened - Linus ]
--- drivers/tty/vt/vc_screen.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/tty/vt/vc_screen.c +4 -3
@@ -403,10 +403,11 @@ vcs_read(struct file *file, char __userunsigned int this_round, skip =0 ;int size; - ret = -ENXIO ; vc =vcs_vc (inode, &viewed); -if (!vc) - goto unlock_out; +if (!vc) { + ret = -ENXIO ; +break ; + }/* Check whether we are above size each round, * as copy_to_user at the end of this loop
Greg Kroah-Hartman
maintainerPATCH 28/42 drm/amd/display: Move DCN314 DOMAIN power control to DMCUB
In reply to Greg Kroah-HartmanFrom: Nicholas Kazlauskas <[email protected]>
commit e383b12709e32d6494c948422070c2464b637e44 upstream.
[Why]
DOMAIN power gating control is now required to be done via firmware due to interlock with other power features. This is to avoid intermittent issues in the LB memories.
[How]
If the firmware supports the command then use the new firmware as the sequence can avoid potential display corruption issues.
The command will be ignored on firmware that does not support DOMAIN power control and the pipes will remain always on - frequent PG cycling can cause the issue to occur on the old sequence, so we should avoid it.
--- drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c | 24 ++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h | 2 + drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c | 2 - drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 25 +++++++++++++++++++ 4 files changed, 52 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c +24 -0
@@ -391,3 +391,27 @@ void dcn314_set_pixels_per_cycle(struct pipe_ctx->stream_res.stream_enc->funcs->set_input_mode (pipe_ctx->stream_res.stream_enc, pix_per_cycle); } + +void dcn314_hubp_pg_control (struct dce_hwseq *hws,unsigned int hubp_inst,bool power_on) +{ +struct dc_context *ctx = hws->ctx; +union dmub_rb_cmd cmd; + +if (hws->ctx->dc->debug.disable_hubp_power_gate) +return ; + +PERF_TRACE (); + +memset (&cmd,0 ,sizeof (cmd)); + cmd.domain_control.header.type =DMUB_CMD__VBIOS ; + cmd.domain_control.header.sub_type =DMUB_CMD__VBIOS_DOMAIN_CONTROL ; + cmd.domain_control.header.payload_bytes =sizeof (cmd.domain_control.data); + cmd.domain_control.data.inst = hubp_inst; + cmd.domain_control.data.power_gate = !power_on; + +dc_dmub_srv_cmd_queue (ctx->dmub_srv, &cmd); +dc_dmub_srv_cmd_execute (ctx->dmub_srv); +dc_dmub_srv_wait_idle (ctx->dmub_srv); + +PERF_TRACE (); +}
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h +2 -0
@@ -41,4 +41,6 @@ unsigned int dcn314_calculate_dccg_k1_k2void dcn314_set_pixels_per_cycle (struct pipe_ctx *pipe_ctx); +void dcn314_hubp_pg_control (struct dce_hwseq *hws,unsigned int hubp_inst,bool power_on); +#endif /* __DC_HWSS_DCN314_H__ */
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c +1 -1
@@ -137,7 +137,7 @@ static const struct hwseq_private_funcs .plane_atomic_disable = dcn20_plane_atomic_disable, .plane_atomic_power_down = dcn10_plane_atomic_power_down, .enable_power_gating_plane = dcn314_enable_power_gating_plane, - .hubp_pg_control = dcn31_hubp_pg_control, + .hubp_pg_control = dcn314_hubp_pg_control, .program_all_writeback_pipes_in_tree = dcn30_program_all_writeback_pipes_in_tree, .update_odm = dcn314_update_odm, .dsc_pg_control = dcn314_dsc_pg_control,
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +25 -0
@@ -450,6 +450,10 @@ enum dmub_cmd_vbios_type {* Query DP alt status on a transmitter. */ DMUB_CMD__VBIOS_TRANSMITTER_QUERY_DP_ALT =26 , +/** +* Controls domain power gating +*/ + DMUB_CMD__VBIOS_DOMAIN_CONTROL = 28, };//==============================================================================
@@ -1192,6 +1196,23 @@ struct dmub_rb_cmd_dig1_transmitter_cont };/** +* struct dmub_rb_cmd_domain_control_data - Data for DOMAIN power control +*/ +struct dmub_rb_cmd_domain_control_data { +uint8_t inst :6 ;/**< DOMAIN instance to control */ +uint8_t power_gate :1 ;/**< 1=power gate, 0=power up */ +uint8_t reserved[3 ];/**< Reserved for future use */ +}; + +/** +* struct dmub_rb_cmd_domain_control - Controls DOMAIN power gating +*/ +struct dmub_rb_cmd_domain_control { +struct dmub_cmd_header header;/**< header */ +struct dmub_rb_cmd_domain_control_data data;/**< payload */ +}; + +/** * DPIA tunnel command parameters. */ struct dmub_cmd_dig_dpia_control_data {
@@ -3188,6 +3209,10 @@ union dmub_rb_cmd {*/ struct dmub_rb_cmd_dig1_transmitter_control dig1_transmitter_control;/** +* Definition of a DMUB_CMD__VBIOS_DOMAIN_CONTROL command. +*/ +struct dmub_rb_cmd_domain_control domain_control; +/** * Definition of a DMUB_CMD__PSR_SET_VERSION command. */ struct dmub_rb_cmd_psr_set_version psr_set_version;
Greg Kroah-Hartman
maintainerPATCH 29/42 drm/amd/display: Fix race condition in DPIA AUX transfer
In reply to Greg Kroah-HartmanFrom: Stylon Wang <[email protected]>
commit ead08b95fa50f40618c72b93a849c4ae30c9cd50 upstream.
[Why]
This fix was intended for improving on coding style but in the process uncovers a race condition, which explains why we are getting incorrect length in DPIA AUX replies. Due to the call path of DPIA AUX going from DC back to DM layer then again into DC and the added complexities on top of current DC AUX implementation, a proper fix to rely on current dc_lock to address the race condition is difficult without a major overhual on how DPIA AUX is implemented.
[How]
- Add a mutex dpia_aux_lock to protect DPIA AUX transfers
- Remove DMUB_ASYNC_TO_SYNC_ACCESS_* codes and rely solely on aux_return_code_type for error reporting and handling
- Separate SET_CONFIG from DPIA AUX transfer because they have quiet different processing logic
- Remove unnecessary type casting to and from void * type
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 147 ++++++-------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 17 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 10 3 files changed, 89 insertions(+), 85 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +71 -76
@@ -147,14 +147,6 @@ MODULE_FIRMWARE(FIRMWARE_NAVI12_DMCU);/* Number of bytes in PSP footer for firmware. */ #define PSP_FOOTER_BYTES 0x100 -/* -* DMUB Async to Sync Mechanism Status -*/ -#define DMUB_ASYNC_TO_SYNC_ACCESS_FAIL 1 -#define DMUB_ASYNC_TO_SYNC_ACCESS_TIMEOUT 2 -#define DMUB_ASYNC_TO_SYNC_ACCESS_SUCCESS 3 -#define DMUB_ASYNC_TO_SYNC_ACCESS_INVALID 4 -/** * DOC: overview *
@@ -1456,6 +1448,7 @@ static int amdgpu_dm_init(struct amdgpu_memset (&init_params,0 ,sizeof (init_params));#endif +mutex_init (&adev->dm.dpia_aux_lock);mutex_init (&adev->dm.dc_lock);mutex_init (&adev->dm.audio_lock);spin_lock_init (&adev->dm.vblank_lock);
@@ -1814,6 +1807,7 @@ static void amdgpu_dm_fini(struct amdgpumutex_destroy (&adev->dm.audio_lock);mutex_destroy (&adev->dm.dc_lock); +mutex_destroy (&adev->dm.dpia_aux_lock);return ; }
@@ -10198,91 +10192,92 @@ uint32_t dm_read_reg_func(const struct dreturn value; } -static int amdgpu_dm_set_dmub_async_sync_status (bool is_cmd_aux, -struct dc_context *ctx, -uint8_t status_type, -uint32_t *operation_result) +int amdgpu_dm_process_dmub_aux_transfer_sync ( +struct dc_context *ctx, +unsigned int link_index, +struct aux_payload *payload, +enum aux_return_code_type *operation_result) {struct amdgpu_device *adev = ctx->driver_context; -int return_status =-1 ;struct dmub_notification *p_notify = adev->dm.dmub_notify; +int ret =-1 ; -if (is_cmd_aux) { -if (status_type ==DMUB_ASYNC_TO_SYNC_ACCESS_SUCCESS ) { - return_status = p_notify->aux_reply.length; - *operation_result = p_notify->result; - }else if (status_type ==DMUB_ASYNC_TO_SYNC_ACCESS_TIMEOUT ) { - *operation_result =AUX_RET_ERROR_TIMEOUT ; - }else if (status_type ==DMUB_ASYNC_TO_SYNC_ACCESS_FAIL ) { - *operation_result =AUX_RET_ERROR_ENGINE_ACQUIRE ; - }else if (status_type ==DMUB_ASYNC_TO_SYNC_ACCESS_INVALID ) { - *operation_result =AUX_RET_ERROR_INVALID_REPLY ; - }else { - *operation_result =AUX_RET_ERROR_UNKNOWN ; +mutex_lock (&adev->dm.dpia_aux_lock); +if (!dc_process_dmub_aux_transfer_async (ctx->dc, link_index, payload)) { + *operation_result =AUX_RET_ERROR_ENGINE_ACQUIRE ; + goto out; + } + +if (!wait_for_completion_timeout (&adev->dm.dmub_aux_transfer_done,10 *HZ )) { +DRM_ERROR ("wait_for_completion_timeout timeout!" ); + *operation_result =AUX_RET_ERROR_TIMEOUT ; + goto out; + } + +if (p_notify->result !=AUX_RET_SUCCESS ) { +/* +* Transient states before tunneling is enabled could +* lead to this error. We can ignore this for now. +*/ +if (p_notify->result !=AUX_RET_ERROR_PROTOCOL_ERROR ) { +DRM_WARN ("DPIA AUX failed on 0x%x(%d), error %d\n" , + payload->address, payload->length, + p_notify->result); } - }else { -if (status_type ==DMUB_ASYNC_TO_SYNC_ACCESS_SUCCESS ) { - return_status =0 ; - *operation_result = p_notify->sc_status; - }else { - *operation_result =SET_CONFIG_UNKNOWN_ERROR ; + *operation_result =AUX_RET_ERROR_INVALID_REPLY ; + goto out; + } + + + payload->reply[0 ] = adev->dm.dmub_notify->aux_reply.command; +if (!payload->write && p_notify->aux_reply.length && + (payload->reply[0 ] ==AUX_TRANSACTION_REPLY_AUX_ACK )) { + +if (payload->length != p_notify->aux_reply.length) { +DRM_WARN ("invalid read length %d from DPIA AUX 0x%x(%d)!\n" , + p_notify->aux_reply.length, + payload->address, payload->length); + *operation_result =AUX_RET_ERROR_INVALID_REPLY ; + goto out; } + +memcpy (payload->data, p_notify->aux_reply.data, + p_notify->aux_reply.length); } -return return_status; +/* success */ + ret = p_notify->aux_reply.length; + *operation_result = p_notify->result; +out: +mutex_unlock (&adev->dm.dpia_aux_lock); +return ret; } -int amdgpu_dm_process_dmub_aux_transfer_sync (bool is_cmd_aux,struct dc_context *ctx, -unsigned int link_index,void *cmd_payload,void *operation_result) +int amdgpu_dm_process_dmub_set_config_sync ( +struct dc_context *ctx, +unsigned int link_index, +struct set_config_cmd_payload *payload, +enum set_config_status *operation_result) {struct amdgpu_device *adev = ctx->driver_context; -int ret =0 ; +bool is_cmd_complete; +int ret; -if (is_cmd_aux) { -dc_process_dmub_aux_transfer_async (ctx->dc, - link_index, (struct aux_payload *)cmd_payload); - }else if (dc_process_dmub_set_config_async (ctx->dc, link_index, - (struct set_config_cmd_payload *)cmd_payload, - adev->dm.dmub_notify)) { -return amdgpu_dm_set_dmub_async_sync_status (is_cmd_aux, - ctx,DMUB_ASYNC_TO_SYNC_ACCESS_SUCCESS , - (uint32_t *)operation_result); - } +mutex_lock (&adev->dm.dpia_aux_lock); + is_cmd_complete =dc_process_dmub_set_config_async (ctx->dc, + link_index, payload, adev->dm.dmub_notify); - ret =wait_for_completion_timeout (&adev->dm.dmub_aux_transfer_done,10 *HZ ); -if (ret ==0 ) { +if (is_cmd_complete ||wait_for_completion_timeout (&adev->dm.dmub_aux_transfer_done,10 *HZ )) { + ret =0 ; + *operation_result = adev->dm.dmub_notify->sc_status; + }else {DRM_ERROR ("wait_for_completion_timeout timeout!" ); -return amdgpu_dm_set_dmub_async_sync_status (is_cmd_aux, - ctx,DMUB_ASYNC_TO_SYNC_ACCESS_TIMEOUT , - (uint32_t *)operation_result); - } - -if (is_cmd_aux) { -if (adev->dm.dmub_notify->result ==AUX_RET_SUCCESS ) { -struct aux_payload *payload = (struct aux_payload *)cmd_payload; - - payload->reply[0 ] = adev->dm.dmub_notify->aux_reply.command; -if (!payload->write && adev->dm.dmub_notify->aux_reply.length && - payload->reply[0 ] ==AUX_TRANSACTION_REPLY_AUX_ACK ) { - -if (payload->length != adev->dm.dmub_notify->aux_reply.length) { -DRM_WARN ("invalid read from DPIA AUX %x(%d) got length %d!\n" , - payload->address, payload->length, - adev->dm.dmub_notify->aux_reply.length); -return amdgpu_dm_set_dmub_async_sync_status (is_cmd_aux, ctx, -DMUB_ASYNC_TO_SYNC_ACCESS_INVALID , - (uint32_t *)operation_result); - } - -memcpy (payload->data, adev->dm.dmub_notify->aux_reply.data, - adev->dm.dmub_notify->aux_reply.length); - } - } + ret =-1 ; + *operation_result =SET_CONFIG_UNKNOWN_ERROR ; } -return amdgpu_dm_set_dmub_async_sync_status (is_cmd_aux, - ctx,DMUB_ASYNC_TO_SYNC_ACCESS_SUCCESS , - (uint32_t *)operation_result); +mutex_unlock (&adev->dm.dpia_aux_lock); +return ret; }/*
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +14 -3
@@ -59,7 +59,9 @@#include "signal_types.h" #include "amdgpu_dm_crc.h" struct aux_payload ; +struct set_config_cmd_payload ;enum aux_return_code_type ; +enum set_config_status ;/* Forward declarations */ struct amdgpu_device ;
@@ -549,6 +551,13 @@ struct amdgpu_display_manager {* occurred on certain intel platform */ bool aux_hpd_discon_quirk; + +/** +* @dpia_aux_lock: +* +* Guards access to DPIA AUX +*/ +struct mutex dpia_aux_lock; };enum dsc_clock_force_state {
@@ -792,9 +801,11 @@ void amdgpu_dm_update_connector_after_deextern const struct drm_encoder_helper_funcs amdgpu_dm_encoder_helper_funcs; -int amdgpu_dm_process_dmub_aux_transfer_sync (bool is_cmd_aux, -struct dc_context *ctx,unsigned int link_index, -void *payload,void *operation_result); +int amdgpu_dm_process_dmub_aux_transfer_sync (struct dc_context *ctx,unsigned int link_index, +struct aux_payload *payload,enum aux_return_code_type *operation_result); + +int amdgpu_dm_process_dmub_set_config_sync (struct dc_context *ctx,unsigned int link_index, +struct set_config_cmd_payload *payload,enum set_config_status *operation_result);bool check_seamless_boot_capability (struct amdgpu_device *adev);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +4 -6
@@ -844,9 +844,8 @@ int dm_helper_dmub_aux_transfer_sync(struct aux_payload *payload, enum aux_return_code_type *operation_result) { - return amdgpu_dm_process_dmub_aux_transfer_sync(true, ctx, - link->link_index, (void *)payload, - (void *)operation_result); + return amdgpu_dm_process_dmub_aux_transfer_sync(ctx, link->link_index, payload, +operation_result ); } int dm_helpers_dmub_set_config_sync(struct dc_context *ctx,
@@ -854,9 +853,8 @@ int dm_helpers_dmub_set_config_sync(strustruct set_config_cmd_payload *payload, enum set_config_status *operation_result) { - return amdgpu_dm_process_dmub_aux_transfer_sync(false, ctx, - link->link_index, (void *)payload, - (void *)operation_result); + return amdgpu_dm_process_dmub_set_config_sync(ctx, link->link_index, payload, +operation_result ); }void dm_set_dcn_clocks (struct dc_context *ctx,struct dc_clocks *clks)
Greg Kroah-Hartman
maintainerPATCH 30/42 usb: dwc3: pci: add support for the Intel Meteor Lake-M
In reply to Greg Kroah-HartmanFrom: Heikki Krogerus <[email protected]>
commit 8e5248c3a8778f3e394e9a19195bc7a48f567ca2 upstream.
This patch adds the necessary PCI IDs for Intel Meteor Lake-M devices.
--- drivers/usb/dwc3/dwc3-pci.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/dwc3/dwc3-pci.c +4 -0
@@ -47,6 +47,7 @@#define PCI_DEVICE_ID_INTEL_ADLS 0x7ae1#define PCI_DEVICE_ID_INTEL_RPL 0xa70e#define PCI_DEVICE_ID_INTEL_RPLS 0x7a61 +#define PCI_DEVICE_ID_INTEL_MTLM 0x7eb1#define PCI_DEVICE_ID_INTEL_MTLP 0x7ec1#define PCI_DEVICE_ID_INTEL_MTL 0x7e7e#define PCI_DEVICE_ID_INTEL_TGL 0x9a15
@@ -467,6 +468,9 @@ static const struct pci_device_id dwc3_p {PCI_VDEVICE (INTEL ,PCI_DEVICE_ID_INTEL_RPLS ), (kernel_ulong_t) &dwc3_pci_intel_swnode, }, + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MTLM), + (kernel_ulong_t) &dwc3_pci_intel_swnode, }, + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MTLP), (kernel_ulong_t) &dwc3_pci_intel_swnode, },
Greg Kroah-Hartman
maintainerPATCH 31/42 USB: serial: option: add support for VW/Skoda "Carstick LTE"
In reply to Greg Kroah-HartmanFrom: Florian Zumbiehl <[email protected]>
commit 617c331d91077f896111044628c096802551dc66 upstream.
Add support for VW/Skoda "Carstick LTE"
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1c9e ProdID=7605 Rev=02.00 S: Manufacturer=USB Modem S: Product=USB Modem C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) I: If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
The stick has AT command interfaces on interfaces 1, 2, and 3, and does PPP on interface 3.
--- drivers/usb/serial/option.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/serial/option.c +4 -0
@@ -402,6 +402,8 @@ static void option_instat_callback(struc#define LONGCHEER_VENDOR_ID 0x1c9e/* 4G Systems products */ +/* This one was sold as the VW and Skoda "Carstick LTE" */ +#define FOUR_G_SYSTEMS_PRODUCT_CARSTICK_LTE 0x7605/* This is the 4G XS Stick W14 a.k.a. Mobilcom Debitel Surf-Stick * * It seems to contain a Qualcomm QSC6240/6290 chipset */ #define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603
@@ -1976,6 +1978,8 @@ static const struct usb_device_id option .driver_info = RSVD(2) }, { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, + { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_CARSTICK_LTE), + .driver_info = RSVD(0) }, { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), .driver_info = NCTRL(0) | NCTRL(1) }, { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W100),
Greg Kroah-Hartman
maintainerPATCH 32/42 usb: gadget: u_serial: Add null pointer check in gserial_resume
In reply to Greg Kroah-HartmanFrom: Prashanth K <[email protected]>
commit 5ec63fdbca604568890c577753c6f66c5b3ef0b5 upstream.
Consider a case where gserial_disconnect has already cleared gser->ioport. And if a wakeup interrupt triggers afterwards, gserial_resume gets called, which will lead to accessing of gser->ioport and thus causing null pointer dereference.Add a null pointer check to prevent this.
Added a static spinlock to prevent gser->ioport from becoming null after the newly added check.
--- drivers/usb/gadget/function/u_serial.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)
drivers/usb/gadget/function/u_serial.c +19 -4
@@ -81,6 +81,9 @@#define WRITE_BUF_SIZE 8192/* TX only */ #define GS_CONSOLE_BUF_SIZE 8192 +/* Prevents race conditions while accessing gser->ioport */ +static DEFINE_SPINLOCK (serial_port_lock); +/* console info */ struct gs_console {struct console console;
@@ -1374,8 +1377,10 @@ void gserial_disconnect(struct gserial *if (!port)return ; +spin_lock_irqsave (&serial_port_lock, flags); +/* tell the TTY glue not to do I/O here any more */ -spin_lock_irqsave (&port->port_lock, flags); +spin_lock (&port->port_lock);gs_console_disconnect (port);
@@ -1390,7 +1395,8 @@ void gserial_disconnect(struct gserial *tty_hangup (port->port.tty); } port->suspended = false; -spin_unlock_irqrestore (&port->port_lock, flags); +spin_unlock (&port->port_lock); +spin_unlock_irqrestore (&serial_port_lock, flags);/* disable endpoints, aborting down any active I/O */ usb_ep_disable (gser->out);
@@ -1424,10 +1430,19 @@ EXPORT_SYMBOL_GPL(gserial_suspend);void gserial_resume (struct gserial *gser) { -struct gs_port *port = gser->ioport; +struct gs_port *port;unsigned long flags; -spin_lock_irqsave (&port->port_lock, flags); +spin_lock_irqsave (&serial_port_lock, flags); + port = gser->ioport; + +if (!port) { +spin_unlock_irqrestore (&serial_port_lock, flags); +return ; + } + +spin_lock (&port->port_lock); +spin_unlock (&serial_port_lock); port->suspended = false;if (!port->start_delayed) {spin_unlock_irqrestore (&port->port_lock, flags);
Greg Kroah-Hartman
maintainerPATCH 33/42 arm64: dts: uniphier: Fix property name in PXs3 USB node
In reply to Greg Kroah-HartmanFrom: Kunihiko Hayashi <[email protected]>
commit 2508d5efd7a588d07915a762e1731173854525f9 upstream.
The property "snps,usb2_gadget_lpm_disable" is wrong. It should be fixed to "snps,usb2-gadget-lpm-disable".
--- arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget0.dts | 2 +- arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget1.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget0.dts +1 -1
@@ -24,7 +24,7 @@ snps,dis_enblslpm_quirk; snps,dis_u2_susphy_quirk; snps,dis_u3_susphy_quirk; - snps,usb2_gadget_lpm_disable; + snps,usb2-gadget-lpm-disable; phy-names = "usb2-phy", "usb3-phy"; phys = <&usb0_hsphy0>, <&usb0_ssphy0>; };
arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget1.dts +1 -1
@@ -24,7 +24,7 @@ snps,dis_enblslpm_quirk; snps,dis_u2_susphy_quirk; snps,dis_u3_susphy_quirk; - snps,usb2_gadget_lpm_disable; + snps,usb2-gadget-lpm-disable; phy-names = "usb2-phy", "usb3-phy"; phys = <&usb1_hsphy0>, <&usb1_ssphy0>; };
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 34/42 usb: typec: pd: Remove usb_suspend_supported sysfs from sink PDO
In reply to Greg Kroah-HartmanFrom: Saranya Gopal <[email protected]>
commit e4e7b2dc27c4bb877d850eaff69d41410b2f4237 upstream.
As per USB PD specification, 28th bit of fixed supply sink PDO represents "higher capability" attribute and not "usb suspend supported" attribute. So, this patch removes the usb_suspend_supported attribute from sink PDO.
--- drivers/usb/typec/pd.c | 1 - 1 file changed, 1 deletion(-)
drivers/usb/typec/pd.c +0 -1
@@ -161,7 +161,6 @@ static struct device_type source_fixed_supply_type = {static struct attribute *sink_fixed_supply_attrs[] = { &dev_attr_dual_role_power.attr, - &dev_attr_usb_suspend_supported.attr, &dev_attr_unconstrained_power.attr, &dev_attr_usb_communication_capable.attr, &dev_attr_dual_role_data.attr,
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 25/42 bpf: bpf_fib_lookup should not return neigh in NUD_FAILED state
In reply to Greg Kroah-HartmanFrom: Martin KaFai Lau <[email protected]>
commit 1fe4850b34ab512ff911e2c035c75fb6438f7307 upstream.
The bpf_fib_lookup() helper does not only look up the fib (ie. route) but it also looks up the neigh. Before returning the neigh, the helper does not check for NUD_VALID. When a neigh state (neigh->nud_state) is in NUD_FAILED, its dmac (neigh->ha) could be all zeros. The helper still returns SUCCESS instead of NO_NEIGH in this case. Because of the SUCCESS return value, the bpf prog directly uses the returned dmac and ends up filling all zero in the eth header.
This patch checks for NUD_VALID and returns NO_NEIGH if the neigh is not valid.
--- net/core/filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/core/filter.c +2 -2
@@ -5807,7 +5807,7 @@ static int bpf_ipv4_fib_lookup(struct ne neigh =__ipv6_neigh_lookup_noref_stub (dev, dst); } -if (!neigh) +if (!neigh || !(neigh->nud_state &NUD_VALID ))return BPF_FIB_LKUP_RET_NO_NEIGH ;return bpf_fib_set_fwd_params (params, neigh, dev, mtu);
@@ -5922,7 +5922,7 @@ static int bpf_ipv6_fib_lookup(struct ne* not needed here. */ neigh =__ipv6_neigh_lookup_noref_stub (dev, dst); -if (!neigh) +if (!neigh || !(neigh->nud_state &NUD_VALID ))return BPF_FIB_LKUP_RET_NO_NEIGH ;return bpf_fib_set_fwd_params (params, neigh, dev, mtu);
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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.
Quoted 8 lines
Responses should be made by Fri, 03 Mar 2023 18:06:43 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.
On our RISC-V stuff, LGTM:
Thanks,
Conor.
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Tested rc1 against the Fedora build system (aarch64, armv7, ppc64le, s390x, x86_64), and boot tested x86_64. No regressions noted.
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.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 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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.
Successfully cross-compiled for arm64 (bcm2711_defconfig, GCC 10.2.0) and powerpc (ps3_defconfig, GCC 12.2.0).
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.1:
11 builds: 11 pass, 0 fail
28 boots: 28 pass, 0 fail
130 tests: 130 pass, 0 failLinux version: 6.1.15-rc1-gb6150251d4dd
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Regression found on Linux version 6.1.15-rc1 on 32-bit arm x15 and i386.
## Build
* kernel: 6.1.15-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit: b6150251d4ddf8a80510c185d839631e252e6317
* git describe: v6.1.14-43-gb6150251d4dd
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.14-43-gb6150251d4dd
Regression test cases,
i386:
x15:
* kselftest-net-mptcp/net_mptcp_mptcp_sockopt_sh
# mptcp_sockopt: mptcp_sockopt.c:353: do_getsockopt_tcp_info:
Assertion `ti.d.size_user == sizeof(struct tcp_info)' failed. # mptcp_sockopt: mptcp_sockopt.c:353: do_getsockopt_tcp_info:
Assertion `ti.d.size_user == sizeof(struct tcp_info)' failed.
test log:
----------
# selftests: net/mptcp: mptcp_sockopt.sh
[ 918.263983] IPv6: ADDRCONF(NETDEV_CHANGE): ns1eth1: link becomes ready [ 918.398851] IPv6: ADDRCONF(NETDEV_CHANGE): ns1eth2: link becomes ready [ 918.538987] IPv6: ADDRCONF(NETDEV_CHANGE): ns1eth3: link becomes ready [ 918.678270] IPv6: ADDRCONF(NETDEV_CHANGE): ns1eth4: link becomes ready [ 918.800671] audit: type=1325 audit(1677748585.128:33): table=filter family=2 entries=0 op=xt_register pid=18489 subj=kernel comm=\"iptables\" [ 918.813228] audit: type=1300 audit(1677748585.128:33):
arch=40000003 syscall=102 success=yes exit=0 a0=f a1=bf94ed3c a2=40 a3=b7edfe3c items=0 ppid=18412 pid=18489 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 ses=4294967295 comm=\"iptables\" exe=\"/usr/sbin/xtables-legacy-multi\" subj=kernel key=(null)
[ 918.842987] audit: type=1327 audit(1677748585.128:33): proctitle=69707461626C6573002D41004F5554505554002D7000746370002D2D73796E002D6D006D61726B002D2D6D61726B0031002D6A00414343455054 [ 918.859285] audit: type=1325 audit(1677748585.128:34): table=filter family=2 entries=4 op=xt_replace pid=18489 subj=kernel comm=\"iptables\" [ 918.871788] audit: type=1300 audit(1677748585.128:34):
arch=40000003 syscall=102 success=yes exit=0 a0=e a1=bf94ef64 a2=40 a3=b7edfe3c items=0 ppid=18412 pid=18489 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 ses=4294967295 comm=\"iptables\" exe=\"/usr/sbin/xtables-legacy-multi\" subj=kernel key=(null)
[ 918.901496] audit: type=1327 audit(1677748585.128:34): proctitle=69707461626C6573002D41004F5554505554002D7000746370002D2D73796E002D6D006D61726B002D2D6D61726B0031002D6A00414343455054 [ 918.934555] audit: type=1325 audit(1677748585.262:35): table=filter family=2 entries=5 op=xt_replace pid=18490 subj=kernel comm=\"iptables\" [ 918.947242] audit: type=1300 audit(1677748585.262:35):
arch=40000003 syscall=102 success=yes exit=0 a0=e a1=bfc21cd4 a2=40 a3=b7f27e3c items=0 ppid=18412 pid=18490 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 ses=4294967295 comm=\"iptables\" exe=\"/usr/sbin/xtables-legacy-multi\" subj=kernel key=(null)
[ 918.976905] audit: type=1327 audit(1677748585.262:35): proctitle=69707461626C6573002D41004F5554505554002D7000746370002D2D7463702D666C6167730052535400525354002D6D006D61726B002D2D6D61726B0030002D6A00414343455054 [ 919.013445] audit: type=1325 audit(1677748585.341:36): table=filter
family=2 entries=6 op=xt_replace pid=18491 subj=kernel comm=\"iptables\"
# Created /tmp/tmp.CG4evZjYl7 (size 1 KB) containing data sent by client # Created /tmp/tmp.urARJfNrFp (size 1 KB) containing data sent by server # PASS: all packets had packet mark set
# mptcp_[ 944.426054] kauditd_printk_skb: 50 callbacks suppressed
sockopt: mptcp_s[ 944.426057] audit: type=1701 audit(1677748610.753:53): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=18532 comm=\"mptcp_sockopt\" exe=\"/opt/kselftests/default-in-kernel/net/mptcp/mptcp_sockopt\" sig=6 res=1
[ 944.452415] audit: type=1701 audit(1677748610.753:54):
auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=18533 comm=\"mptcp_sockopt\" exe=\"/opt/kselftests/default-in-kernel/net/mptcp/mptcp_sockopt\" sig=6 res=1
ockopt.c:353: do_getsockopt_tcp_info: Assertion `ti.d.size_user == sizeof(struct tcp_info)' failed.
# mptcp_sockopt: mptcp_sockopt.c:353: do_getsockopt_tcp_info:
Assertion `ti.d.size_user == sizeof(struct tcp_info)' failed.
# server killed by signal 6 # # FAIL: SOL_MPTCP getsockopt # PASS: TCP_INQ cmsg/ioctl -t tcp # PASS: TCP_INQ cmsg/ioctl -6 -t tcp # PASS: TCP_INQ cmsg/ioctl -r tcp # PASS: TCP_INQ cmsg/ioctl -6 -r tcp # PASS: TCP_INQ cmsg/ioctl -r tcp -t tcp not ok 6 selftests: net/mptcp: mptcp_sockopt.sh # exit=1
Test results comparision link,
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.14-43-gb6150251d4dd/testrun/15204254/suite/kselftest-net-mptcp/test/net_mptcp_mptcp_sockopt_sh/history/?page=1
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.14-43-gb6150251d4dd/testrun/15204254/suite/kselftest-net-mptcp/test/net_mptcp_mptcp_sockopt_sh/details/
https://lkft.validation.linaro.org/scheduler/job/6211923#L2664
--
Linaro LKFT
https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 97 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Regression found on Linux version 6.1.15-rc1 on 32-bit arm x15 and i386.
## Build
* kernel: 6.1.15-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit:b6150251d4ddf8a80510c185d839631e252e6317
* git describe: v6.1.14-43-gb6150251d4dd
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.14-43-gb6150251d4ddRegression test cases,
i386:
x15:
* kselftest-net-mptcp/net_mptcp_mptcp_sockopt_sh#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed. #mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.test log:
----------# selftests: net/mptcp:
mptcp_sockopt.sh[ 918.263983] IPv6: ADDRCONF(NETDEV_CHANGE): ns1eth1: link becomes ready [ 918.398851] IPv6: ADDRCONF(NETDEV_CHANGE): ns1eth2: link becomes ready [ 918.538987] IPv6: ADDRCONF(NETDEV_CHANGE): ns1eth3: link becomes ready [ 918.678270] IPv6: ADDRCONF(NETDEV_CHANGE): ns1eth4: link becomes ready [ 918.800671] audit: type=1325 audit(1677748585.128:33): table=filter family=2 entries=0 op=xt_register pid=18489 subj=kernel comm=\"iptables\" [ 918.813228] audit: type=1300 audit(1677748585.128:33):arch=40000003 syscall=102 success=yes exit=0 a0=f a1=bf94ed3c a2=40 a3=b7edfe3c items=0 ppid=18412 pid=18489 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 ses=4294967295 comm=\"iptables\" exe=\"/usr/sbin/xtables-legacy-multi\" subj=kernel key=(null)
[ 918.842987] audit: type=1327 audit(1677748585.128:33): proctitle=69707461626C6573002D41004F5554505554002D7000746370002D2D73796E002D6D006D61726B002D2D6D61726B0031002D6A00414343455054 [ 918.859285] audit: type=1325 audit(1677748585.128:34): table=filter family=2 entries=4 op=xt_replace pid=18489 subj=kernel comm=\"iptables\" [ 918.871788] audit: type=1300 audit(1677748585.128:34):arch=40000003 syscall=102 success=yes exit=0 a0=e a1=bf94ef64 a2=40 a3=b7edfe3c items=0 ppid=18412 pid=18489 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 ses=4294967295 comm=\"iptables\" exe=\"/usr/sbin/xtables-legacy-multi\" subj=kernel key=(null)
[ 918.901496] audit: type=1327 audit(1677748585.128:34): proctitle=69707461626C6573002D41004F5554505554002D7000746370002D2D73796E002D6D006D61726B002D2D6D61726B0031002D6A00414343455054 [ 918.934555] audit: type=1325 audit(1677748585.262:35): table=filter family=2 entries=5 op=xt_replace pid=18490 subj=kernel comm=\"iptables\" [ 918.947242] audit: type=1300 audit(1677748585.262:35):arch=40000003 syscall=102 success=yes exit=0 a0=e a1=bfc21cd4 a2=40 a3=b7f27e3c items=0 ppid=18412 pid=18490 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 ses=4294967295 comm=\"iptables\" exe=\"/usr/sbin/xtables-legacy-multi\" subj=kernel key=(null)
[ 918.976905] audit: type=1327 audit(1677748585.262:35): proctitle=69707461626C6573002D41004F5554505554002D7000746370002D2D7463702D666C6167730052535400525354002D6D006D61726B002D2D6D61726B0030002D6A00414343455054 [ 919.013445] audit: type=1325 audit(1677748585.341:36): table=filterfamily=2 entries=6 op=xt_replace pid=18491 subj=kernel comm=\"iptables\"
# Created/tmp/tmp.CG4evZjYl7(size 1 KB) containing data sent by client # Created/tmp/tmp.urARJfNrFp(size 1 KB) containing data sent by server # PASS: all packets had packet mark set
# mptcp_[ 944.426054]kauditd_printk_skb: 50 callbacks suppressed
sockopt: mptcp_s[ 944.426057] audit: type=1701 audit(1677748610.753:53): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=18532 comm=\"mptcp_sockopt\" exe=\"/opt/kselftests/default-in-kernel/net/mptcp/mptcp_sockopt\" sig=6 res=1
Quoted 7 lines
[ 944.452415] audit: type=1701 audit(1677748610.753:54):auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=18533 comm=\"mptcp_sockopt\" exe=\"/opt/kselftests/default-in-kernel/net/mptcp/mptcp_sockopt\" sig=6 res=1
ockopt.c:353:do_getsockopt_tcp_info: Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.
Nit, wrapping a log like this makes it hard to read, don't you think?
Quoted 11 lines
#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.# server killed by signal 6 # # FAIL: SOL_MPTCP getsockopt # PASS: TCP_INQ cmsg/ioctl -t tcp # PASS: TCP_INQ cmsg/ioctl -6 -t tcp # PASS: TCP_INQ cmsg/ioctl -r tcp # PASS: TCP_INQ cmsg/ioctl -6 -r tcp # PASS: TCP_INQ cmsg/ioctl -r tcp -t tcp not ok 6 selftests: net/mptcp: mptcp_sockopt.sh # exit=1
Any chance you can bisect?
And is this an issue on 6.2 and/or Linus's tree? I don't see any mptcp changes in this 6.1-rc cycle, they were in the last one...
thanks,
greg k-h
Quoted 50 lines · Greg Kroah-Hartman
Quoted 48 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Regression found on Linux version 6.1.15-rc1 on 32-bit arm x15 and i386.
## Build
* kernel: 6.1.15-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit:b6150251d4ddf8a80510c185d839631e252e6317
* git describe: v6.1.14-43-gb6150251d4dd
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.14-43-gb6150251d4ddRegression test cases,
i386:
x15:
* kselftest-net-mptcp/net_mptcp_mptcp_sockopt_sh#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed. #mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.test log:
----------# selftests: net/mptcp:
mptcp_sockopt.sh
....
Quoted 1 line
Nit, wrapping a log like this makes it hard to read, don't you think?
Me either.
That is the reason I have shared "Assertion" above.
Quoted 13 lines
Quoted 12 lines
#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.# server killed by signal 6 # # FAIL: SOL_MPTCP getsockopt # PASS: TCP_INQ cmsg/ioctl -t tcp # PASS: TCP_INQ cmsg/ioctl -6 -t tcp # PASS: TCP_INQ cmsg/ioctl -r tcp # PASS: TCP_INQ cmsg/ioctl -6 -r tcp # PASS: TCP_INQ cmsg/ioctl -r tcp -t tcp not ok 6 selftests: net/mptcp: mptcp_sockopt.sh # exit=1
Quoted 1 line
Any chance you can bisect?
We are running our bisection scripts.
Quoted 2 lines
And is this an issue on 6.2 and/or Linus's tree?
Not seen on Linux mainline, next and 6.2.
Quoted 6 lines
I don't see any mptcp
changes in this 6.1-rc cycle, they were in the last one...thanks,
greg k-h
Hi Greg,
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +0000. Anything received after that time might be too late.
Build test (gcc version 12.2.1 20230210):
mips: 52 configs -> no failure
arm: 100 configs -> no failure
arm64: 3 configs -> no failurex86_64: 4 configs -> no failure
alpha allmodconfig -> no failure
csky allmodconfig -> no failure
powerpc allmodconfig -> no failure
riscv allmodconfig -> no failure
s390 allmodconfig -> no failure
xtensa allmodconfig -> no failure
Boot test:x86_64: Booted on my test laptop. No regression.x86_64: Booted on qemu. No regression. [1]
arm64: Booted on rpi4b (4GB model). No regression. [2]
mips: Booted on ci20 board. No regression. [3]
[1]. https://openqa.qa.codethink.co.uk/tests/2975
[2]. https://openqa.qa.codethink.co.uk/tests/2981
[3]. https://openqa.qa.codethink.co.uk/tests/2983
Signature · 2 lines
Regards Sudip
Naresh Kamboju
Tested-by Linux Kernel Functional TestingQuoted 74 lines · Naresh Kamboju
Quoted 50 lines · Greg Kroah-Hartman
Quoted 48 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Regression found on Linux version 6.1.15-rc1 on 32-bit arm x15 and i386.
## Build
* kernel: 6.1.15-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit:b6150251d4ddf8a80510c185d839631e252e6317
* git describe: v6.1.14-43-gb6150251d4dd
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.14-43-gb6150251d4ddRegression test cases,
i386:
x15:
* kselftest-net-mptcp/net_mptcp_mptcp_sockopt_sh#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed. #mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.test log:
----------# selftests: net/mptcp:
mptcp_sockopt.sh....
Quoted 1 line
Nit, wrapping a log like this makes it hard to read, don't you think?
Me either.
That is the reason I have shared "Assertion" above.Quoted 13 lines
Quoted 12 lines
#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.# server killed by signal 6 # # FAIL: SOL_MPTCP getsockopt # PASS: TCP_INQ cmsg/ioctl -t tcp # PASS: TCP_INQ cmsg/ioctl -6 -t tcp # PASS: TCP_INQ cmsg/ioctl -r tcp # PASS: TCP_INQ cmsg/ioctl -6 -r tcp # PASS: TCP_INQ cmsg/ioctl -r tcp -t tcp not ok 6 selftests: net/mptcp: mptcp_sockopt.sh # exit=1
Quoted 3 lines
Quoted 1 line
Any chance you can bisect?
We are running our bisection scripts.
We have tested with 6.1.14 kselftests source again and it passes. Now that we have upgraded to 6.2.1 kselftests source, we find that there is this problem reported. so, not a kernel regression.
## Build
* kernel: 6.1.15-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit: b6150251d4ddf8a80510c185d839631e252e6317
* git describe: v6.1.14-43-gb6150251d4dd
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.14-43-gb6150251d4dd
--
Linaro LKFT
https://lkft.linaro.org
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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.
Quoted 8 lines
Responses should be made by Fri, 03 Mar 2023 18:06:43 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.
6.1.15-rc1 compiled and booted on my x86_64 test system. No errors or regressions.
-- Slade
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +0000. Anything received after that time might be too late.
Hi Greg,
6.1.15-rc1 tested.
Run tested on:
- Allwinner H6 (Tanix TX6)
- Intel Alder Lake x86_64 (nuc12 i7-1260P)
In addition - build tested for:
- Allwinner A64
- Allwinner H3
- Allwinner H5
- NXP iMX6
- NXP iMX8
- Qualcomm Dragonboard
- Rockchip RK3288
- Rockchip RK3328
- Rockchip RK3399pro
- Samsung Exynos
--
Rudi
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +0000. Anything received after that time might be too late.
Build results:
total: 155 pass: 155 fail: 0 Qemu test results: total: 503 pass: 503 fail: 0
Guenter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Greg Kroah-Hartman
maintainerQuoted 75 lines · Naresh Kamboju
Quoted 74 lines · Naresh Kamboju
Quoted 50 lines · Greg Kroah-Hartman
Quoted 48 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Regression found on Linux version 6.1.15-rc1 on 32-bit arm x15 and i386.
## Build
* kernel: 6.1.15-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit:b6150251d4ddf8a80510c185d839631e252e6317
* git describe: v6.1.14-43-gb6150251d4dd
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.14-43-gb6150251d4ddRegression test cases,
i386:
x15:
* kselftest-net-mptcp/net_mptcp_mptcp_sockopt_sh#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed. #mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.test log:
----------# selftests: net/mptcp:
mptcp_sockopt.sh....
Quoted 1 line
Nit, wrapping a log like this makes it hard to read, don't you think?
Me either.
That is the reason I have shared "Assertion" above.Quoted 13 lines
Quoted 12 lines
#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.# server killed by signal 6 # # FAIL: SOL_MPTCP getsockopt # PASS: TCP_INQ cmsg/ioctl -t tcp # PASS: TCP_INQ cmsg/ioctl -6 -t tcp # PASS: TCP_INQ cmsg/ioctl -r tcp # PASS: TCP_INQ cmsg/ioctl -6 -r tcp # PASS: TCP_INQ cmsg/ioctl -r tcp -t tcp not ok 6 selftests: net/mptcp: mptcp_sockopt.sh # exit=1
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Any chance you can bisect?
We are running our bisection scripts.
We have tested with 6.1.14 kselftests source again and it passes. Now that we have upgraded to 6.2.1 kselftests source, we find that there is this problem reported. so, not a kernel regression.
Where is this problem reported? Is this a 6.2 test checking for something that is not in 6.1?
thanks,
greg k-h
Hello,
Quoted 75 lines · Naresh Kamboju
Quoted 74 lines · Naresh Kamboju
Quoted 50 lines · Greg Kroah-Hartman
Quoted 48 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Regression found on Linux version 6.1.15-rc1 on 32-bit arm x15 and i386.
## Build
* kernel: 6.1.15-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit:b6150251d4ddf8a80510c185d839631e252e6317
* git describe: v6.1.14-43-gb6150251d4dd
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.14-43-gb6150251d4ddRegression test cases,
i386:
x15:
* kselftest-net-mptcp/net_mptcp_mptcp_sockopt_sh#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed. #mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.test log:
----------# selftests: net/mptcp:
mptcp_sockopt.sh....
Quoted 1 line
Nit, wrapping a log like this makes it hard to read, don't you think?
Me either.
That is the reason I have shared "Assertion" above.Quoted 13 lines
Quoted 12 lines
#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.# server killed by signal 6 # # FAIL: SOL_MPTCP getsockopt # PASS: TCP_INQ cmsg/ioctl -t tcp # PASS: TCP_INQ cmsg/ioctl -6 -t tcp # PASS: TCP_INQ cmsg/ioctl -r tcp # PASS: TCP_INQ cmsg/ioctl -6 -r tcp # PASS: TCP_INQ cmsg/ioctl -r tcp -t tcp not ok 6 selftests: net/mptcp: mptcp_sockopt.sh # exit=1
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Any chance you can bisect?
We are running our bisection scripts.
We have tested with 6.1.14 kselftests source again and it passes. Now that we have upgraded to 6.2.1 kselftests source, we find that there is this problem reported. so, not a kernel regression.
I read the above as you are running self-tests from 6.2.1 on top of an older (6.1) kernel. Is that correct? If so failures are expected; please use the self-tests and kernel from the same release.
Otherwise, could you please re-phrase the above?
Thanks,
Paolo
Quoted 79 lines · Greg Kroah-Hartman
Quoted 77 lines · Naresh Kamboju
Quoted 76 lines · Naresh Kamboju
Quoted 50 lines · Greg Kroah-Hartman
Quoted 48 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Regression found on Linux version 6.1.15-rc1 on 32-bit arm x15 and i386.
## Build
* kernel: 6.1.15-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit:b6150251d4ddf8a80510c185d839631e252e6317
* git describe: v6.1.14-43-gb6150251d4dd
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.14-43-gb6150251d4ddRegression test cases,
i386:
x15:
* kselftest-net-mptcp/net_mptcp_mptcp_sockopt_sh#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed. #mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.test log:
----------# selftests: net/mptcp:
mptcp_sockopt.sh....
Quoted 1 line
Nit, wrapping a log like this makes it hard to read, don't you think?
Me either.
That is the reason I have shared "Assertion" above.Quoted 14 lines
Quoted 12 lines
#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.# server killed by signal 6 # # FAIL: SOL_MPTCP getsockopt # PASS: TCP_INQ cmsg/ioctl -t tcp # PASS: TCP_INQ cmsg/ioctl -6 -t tcp # PASS: TCP_INQ cmsg/ioctl -r tcp # PASS: TCP_INQ cmsg/ioctl -6 -r tcp # PASS: TCP_INQ cmsg/ioctl -r tcp -t tcp not ok 6 selftests: net/mptcp: mptcp_sockopt.sh # exit=1Any chance you can bisect?
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
We are running our bisection scripts.
We have tested with 6.1.14 kselftests source again and it passes. Now that we have upgraded to 6.2.1 kselftests source, we find that there is this problem reported. so, not a kernel regression.
Where is this problem reported?
We have been running most recent stable (6.2) selftest sources on older stable-rc branches ( 6.1 ... 4.14).
Quoted 2 lines
Is this a 6.2 test checking for
something that is not in 6.1?
mptcp developers might have a better idea,
- Naresh
Quoted 81 lines · Paolo Abeni
Hello,
Quoted 77 lines · Naresh Kamboju
Quoted 76 lines · Naresh Kamboju
Quoted 50 lines · Greg Kroah-Hartman
Quoted 48 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Regression found on Linux version 6.1.15-rc1 on 32-bit arm x15 and i386.
## Build
* kernel: 6.1.15-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit:b6150251d4ddf8a80510c185d839631e252e6317
* git describe: v6.1.14-43-gb6150251d4dd
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.14-43-gb6150251d4ddRegression test cases,
i386:
x15:
* kselftest-net-mptcp/net_mptcp_mptcp_sockopt_sh#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed. #mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.test log:
----------# selftests: net/mptcp:
mptcp_sockopt.sh....
Quoted 1 line
Nit, wrapping a log like this makes it hard to read, don't you think?
Me either.
That is the reason I have shared "Assertion" above.Quoted 14 lines
Quoted 12 lines
#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.# server killed by signal 6 # # FAIL: SOL_MPTCP getsockopt # PASS: TCP_INQ cmsg/ioctl -t tcp # PASS: TCP_INQ cmsg/ioctl -6 -t tcp # PASS: TCP_INQ cmsg/ioctl -r tcp # PASS: TCP_INQ cmsg/ioctl -6 -r tcp # PASS: TCP_INQ cmsg/ioctl -r tcp -t tcp not ok 6 selftests: net/mptcp: mptcp_sockopt.sh # exit=1Any chance you can bisect?
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
We are running our bisection scripts.
We have tested with 6.1.14 kselftests source again and it passes. Now that we have upgraded to 6.2.1 kselftests source, we find that there is this problem reported. so, not a kernel regression.
I read the above as you are running self-tests from 6.2.1 on top of an older (6.1) kernel. Is that correct?
correct.
Quoted 1 line
If so failures are expected;
Thanks for clarifying this.
Quoted 8 lines
please use the self-tests and kernel from the same release.
Otherwise, could you please re-phrase the above?
Thanks,
Paolo
- Naresh
Greg Kroah-Hartman
maintainerQuoted 84 lines · Naresh Kamboju
Quoted 83 lines · Paolo Abeni
Hello,
Quoted 79 lines · Naresh Kamboju
Quoted 77 lines · Naresh Kamboju
Quoted 50 lines · Greg Kroah-Hartman
Quoted 48 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.15 release. There are 42 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 Fri, 03 Mar 2023 18:06:43 +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.1.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Regression found on Linux version 6.1.15-rc1 on 32-bit arm x15 and i386.
## Build
* kernel: 6.1.15-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit:b6150251d4ddf8a80510c185d839631e252e6317
* git describe: v6.1.14-43-gb6150251d4dd
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.14-43-gb6150251d4ddRegression test cases,
i386:
x15:
* kselftest-net-mptcp/net_mptcp_mptcp_sockopt_sh#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed. #mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.test log:
----------# selftests: net/mptcp:
mptcp_sockopt.sh....
Quoted 1 line
Nit, wrapping a log like this makes it hard to read, don't you think?
Me either.
That is the reason I have shared "Assertion" above.Quoted 13 lines
Quoted 12 lines
#
mptcp_sockopt: mptcp_sockopt.c:353:do_getsockopt_tcp_info:
Assertion `ti.d.size_user ==sizeof(struct tcp_info)' failed.# server killed by signal 6 # # FAIL: SOL_MPTCP getsockopt # PASS: TCP_INQ cmsg/ioctl -t tcp # PASS: TCP_INQ cmsg/ioctl -6 -t tcp # PASS: TCP_INQ cmsg/ioctl -r tcp # PASS: TCP_INQ cmsg/ioctl -6 -r tcp # PASS: TCP_INQ cmsg/ioctl -r tcp -t tcp not ok 6 selftests: net/mptcp: mptcp_sockopt.sh # exit=1Quoted 1 line
Any chance you can bisect?
We are running our bisection scripts.
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
We have tested with 6.1.14 kselftests source again and it passes. Now that we have upgraded to 6.2.1 kselftests source, we find that there is this problem reported. so, not a kernel regression.
I read the above as you are running self-tests from 6.2.1 on top of an older (6.1) kernel. Is that correct?
correct.
Quoted 1 line
If so failures are expected;
Shouldn't the test be able to know that "new features" are not present and properly skip the test for when that happens? Otherwise this feels like a problem going forward as no one will know if this feature can be used or not (assuming it is a new feature and not just a functional change.)
thanks,
greg k-h
Hi Greg, Naresh, Paolo,
Thank you for the new version and for having reported the issue and running MPTCP selftests!
3 Mar 2023 10:23:06 Greg Kroah-Hartman <[email protected]>:
Quoted 32 lines · Naresh Kamboju
Quoted 31 lines · Paolo Abeni
Quoted 19 lines
Hello,
Quoted 15 lines · Naresh Kamboju
Quoted 14 lines · Naresh Kamboju
Quoted 1 line · Greg Kroah-Hartman
…
....
Quoted 1 line
…
Me either.
That is the reason I have shared "Assertion" above.Quoted 1 line
…
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
We are running our bisection scripts.
We have tested with 6.1.14 kselftests source again and it passes. Now that we have upgraded to 6.2.1 kselftests source, we find that there is this problem reported. so, not a kernel regression.
I read the above as you are running self-tests from 6.2.1 on top of an older (6.1) kernel. Is that correct?
correct.
Quoted 7 lines
Quoted 1 line
Quoted 1 line
If so failures are expected;
Shouldn't the test be able to know that "new features" are not present and properly skip the test for when that happens? Otherwise this feels like a problem going forward as no one will know if this feature can be used or not (assuming it is a new feature and not just a functional change.)
All MPTCP selftests are designed to run on the same kernel version they are attached to. This allows us to do more checks knowing they are not supposed to fail on newer kernel versions and not being skipped if there is an error when trying to use the new feature. If there are fixes, we make sure the stable team is Cc'ed. If there are API changes, it would be visible because we would need to adapt existing selftests.
That's how we thought we should design MPTCP selftests. Maybe we need to change this design?
Is it a common practice to run selftests' latest version on older kernels?
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
Greg Kroah-Hartman
maintainerQuoted 46 lines · Matthieu Baerts
Hi Greg, Naresh, Paolo,
Thank you for the new version and for having reported the issue and running MPTCP selftests!
3 Mar 2023 10:23:06 Greg Kroah-Hartman <[email protected]>:
Quoted 32 lines · Naresh Kamboju
Quoted 31 lines · Paolo Abeni
Quoted 19 lines
Hello,
Quoted 15 lines · Naresh Kamboju
Quoted 14 lines · Naresh Kamboju
Quoted 1 line · Greg Kroah-Hartman
…
....
Quoted 1 line
…
Me either.
That is the reason I have shared "Assertion" above.Quoted 1 line
…
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
We are running our bisection scripts.
We have tested with 6.1.14 kselftests source again and it passes. Now that we have upgraded to 6.2.1 kselftests source, we find that there is this problem reported. so, not a kernel regression.
I read the above as you are running self-tests from 6.2.1 on top of an older (6.1) kernel. Is that correct?
correct.
Quoted 7 lines
Quoted 1 line
Quoted 1 line
If so failures are expected;
Shouldn't the test be able to know that "new features" are not present and properly skip the test for when that happens? Otherwise this feels like a problem going forward as no one will know if this feature can be used or not (assuming it is a new feature and not just a functional change.)
Quoted 7 lines
All MPTCP selftests are designed to run on the same kernel version they are attached to. This allows us to do more checks knowing they are not supposed to fail on newer kernel versions and not being skipped if there is an error when trying to use the new feature. If there are fixes, we make sure the stable team is Cc'ed. If there are API changes, it would be visible because we would need to adapt existing selftests.
"Features" are not usually limited to specific kernel versions (think about the mess that "enterprise" kernels create by backports). And if they are, running a userspace test should be able to detect if the feature is present or not by the error returned to it, right? If not, then the feature is mis-designed.
Quoted 1 line
That's how we thought we should design MPTCP selftests. Maybe we need to change this design?
Yes, please "skip" tests for features that are just not present, do not fail them.
Quoted 1 line
Is it a common practice to run selftests' latest version on older kernels?
Yes.
thanks,
greg k-h
Hi Greg,
3 Mar 2023 11:26:46 Greg Kroah-Hartman <[email protected]>:
Quoted 36 lines · Matthieu Baerts
Quoted 27 lines
Hi Greg, Naresh, Paolo,
Thank you for the new version and for having reported the issue and running MPTCP selftests!
3 Mar 2023 10:23:06 Greg Kroah-Hartman <[email protected]>:
Quoted 13 lines · Naresh Kamboju
Quoted 12 lines · Paolo Abeni
Quoted 8 lines
Hello,
Quoted 1 line · Naresh Kamboju
…
I read the above as you are running self-tests from 6.2.1 on top of an older (6.1) kernel. Is that correct?
correct.
Quoted 7 lines
Quoted 1 line
Quoted 1 line
If so failures are expected;
Shouldn't the test be able to know that "new features" are not present and properly skip the test for when that happens? Otherwise this feels like a problem going forward as no one will know if this feature can be used or not (assuming it is a new feature and not just a functional change.)
Quoted 7 lines
All MPTCP selftests are designed to run on the same kernel version they are attached to. This allows us to do more checks knowing they are not supposed to fail on newer kernel versions and not being skipped if there is an error when trying to use the new feature. If there are fixes, we make sure the stable team is Cc'ed. If there are API changes, it would be visible because we would need to adapt existing selftests.
Quoted 5 lines
"Features" are not usually limited to specific kernel versions (think about the mess that "enterprise" kernels create by backports). And if they are, running a userspace test should be able to detect if the feature is present or not by the error returned to it, right? If not, then the feature is mis-designed.
Thank you for the explanation. (I didn't know these tests had to support "enterprise" kernels.)
For features where the userspace explicitly asks to use them, that's easy. For events that are only created from a specific kernel version, that will be harder but it is maybe a sign that something else is missing on our side :)
Quoted 4 lines
Quoted 1 line
That's how we thought we should design MPTCP selftests. Maybe we need to change this design?
Yes, please "skip" tests for features that are just not present, do not fail them.
It might take a bit of time but we will look at that. I think we don't even check MPTCP is available before starting the first test, we just assume it is there if someone explicitly starts these tests :-)
Quoted 3 lines
Quoted 1 line
Is it a common practice to run selftests' latest version on older kernels?
Yes.
Thank you, I didn't know (and I don't know if it is well known by kernel devs and maintainers).
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
Greg Kroah-Hartman
maintainerQuoted 40 lines · Matthieu Baerts
Hi Greg,
3 Mar 2023 11:26:46 Greg Kroah-Hartman <[email protected]>:
Quoted 36 lines · Matthieu Baerts
Quoted 34 lines
Hi Greg, Naresh, Paolo,
Thank you for the new version and for having reported the issue and running MPTCP selftests!
3 Mar 2023 10:23:06 Greg Kroah-Hartman <[email protected]>:
Quoted 13 lines · Naresh Kamboju
Quoted 12 lines · Paolo Abeni
Quoted 8 lines
Hello,
Quoted 1 line · Naresh Kamboju
…
I read the above as you are running self-tests from 6.2.1 on top of an older (6.1) kernel. Is that correct?
correct.
Quoted 7 lines
Quoted 1 line
Quoted 1 line
If so failures are expected;
Shouldn't the test be able to know that "new features" are not present and properly skip the test for when that happens? Otherwise this feels like a problem going forward as no one will know if this feature can be used or not (assuming it is a new feature and not just a functional change.)
All MPTCP selftests are designed to run on the same kernel version they are attached to. This allows us to do more checks knowing they are not supposed to fail on newer kernel versions and not being skipped if there is an error when trying to use the new feature. If there are fixes, we make sure the stable team is Cc'ed. If there are API changes, it would be visible because we would need to adapt existing selftests.
Quoted 7 lines
Quoted 5 lines
"Features" are not usually limited to specific kernel versions (think about the mess that "enterprise" kernels create by backports). And if they are, running a userspace test should be able to detect if the feature is present or not by the error returned to it, right? If not, then the feature is mis-designed.
Thank you for the explanation. (I didn't know these tests had to support "enterprise" kernels.)
Tests have to run anywhere.
Quoted 1 line
For features where the userspace explicitly asks to use them, that's easy. For events that are only created from a specific kernel version, that will be harder but it is maybe a sign that something else is missing on our side :)
Think about userspace, how will it even know if a feature is present or not in the kernel it is running on? It needs to know "I tried to use this and it failed because of it not being there or because something else went wrong". Userspace has to be able to distinguish between the two somehow, otherwise no one will be able to use your feature very well.
So just rewrite the test to handle "not present", like we can handle ioctls or syscalls not being present vs. "an error happened".
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
That's how we thought we should design MPTCP selftests. Maybe we need to change this design?
Yes, please "skip" tests for features that are just not present, do not fail them.
It might take a bit of time but we will look at that. I think we don't even check MPTCP is available before starting the first test, we just assume it is there if someone explicitly starts these tests :-)
That too should probably be fixed up :)
thanks,
greg k-h
Quoted 11 lines · Greg Kroah-Hartman
Quoted 7 lines · Naresh Kamboju
Quoted 2 lines · Paolo Abeni
I read the above as you are running self-tests from 6.2.1 on top of an older (6.1) kernel. Is that correct?
correct.
Quoted 1 line
If so failures are expected;
Shouldn't the test be able to know that "new features" are not present and properly skip the test for when that happens?
I was not aware that running self-tests on older kernels is a common practice. I'm surprised that hits mptcp specifically. I think most networking tests have the same problem.
Additionally, some self-tests check for known bugs/regressions. Running them on older kernel will cause real trouble, and checking for bug presence in the running kernel would be problematic at best, I think.
Quoted 4 lines
Otherwise this feels
like a problem going forward as no one will know if this feature can be used or not (assuming it is a new feature and not just a functional change.)
I don't understand this later part, could you please re-phrase?
Users should look at release notes and/or official documentation to know the supported features, not to self-tests output ?!?
Thanks!
Paolo
p.s. for some reasons I did not receive the previous replies, I had to fetch the conversation from the ML archives.
Greg Kroah-Hartman
maintainerQuoted 13 lines · Paolo Abeni
Quoted 11 lines · Greg Kroah-Hartman
Quoted 7 lines · Naresh Kamboju
Quoted 2 lines · Paolo Abeni
I read the above as you are running self-tests from 6.2.1 on top of an older (6.1) kernel. Is that correct?
correct.
Quoted 1 line
If so failures are expected;
Shouldn't the test be able to know that "new features" are not present and properly skip the test for when that happens?
Quoted 7 lines
I was not aware that running self-tests on older kernels is a common practice. I'm surprised that hits mptcp specifically. I think most networking tests have the same problem.
Additionally, some self-tests check for known bugs/regressions. Running them on older kernel will cause real trouble, and checking for bug presence in the running kernel would be problematic at best, I think.
No, not at all, why wouldn't you want to test for know bugs and regressions and fail? That's a great thing to do, and so you will know to backport those bugfixes to those older kernels if you have to use them.
Quoted 9 lines
Quoted 4 lines
Otherwise this feels
like a problem going forward as no one will know if this feature can be used or not (assuming it is a new feature and not just a functional change.)I don't understand this later part, could you please re-phrase?
Users should look at release notes and/or official documentation to know the supported features, not to self-tests output ?!?
How can a program "read a release note"?
Features in the kernel should be able to be detected if they are present or not, in some way, right? Syscalls work this way, as does sysfs entries and other ways of interacting with the kernel.
If there is no way for a program to "know" if a feature is present or not, how can it detect the difference between "this failed because of something I did wrong", vs. "this failed because it is not present in this kernel at all".
thanks,
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
Quoted 3 lines · Paolo Abeni
Additionally, some self-tests check for known bugs/regressions. Running them on older kernel will cause real trouble, and checking for bug presence in the running kernel would be problematic at best, I think.
No, not at all, why wouldn't you want to test for know bugs and regressions and fail? That's a great thing to do, and so you will know to backport those bugfixes to those older kernels if you have to use them.
I'm sorry, I likely was not clear at all. What I mean is that the self- test for a bug may trigger e.g. memory corruption on the bugged kernel (or more specifically to networking, the infamous, recurring "unregister_netdevice: waiting for ...") which in turn could cause random failures later.
If that specific case runs on older (unpatched) kernel will screw the overall tests results. The same could happen in less-detectable way for old bugs non explicitly checked by any test, but still triggered by the test-suite. As a consequence I expect that the results observed running newer self-tests on older kernel are unreliable.
Cheers,
Paolo
Greg Kroah-Hartman
maintainerQuoted 17 lines · Paolo Abeni
Quoted 9 lines · Greg Kroah-Hartman
Quoted 3 lines · Paolo Abeni
Additionally, some self-tests check for known bugs/regressions. Running them on older kernel will cause real trouble, and checking for bug presence in the running kernel would be problematic at best, I think.
No, not at all, why wouldn't you want to test for know bugs and regressions and fail? That's a great thing to do, and so you will know to backport those bugfixes to those older kernels if you have to use them.
I'm sorry, I likely was not clear at all. What I mean is that the self- test for a bug may trigger e.g. memory corruption on the bugged kernel (or more specifically to networking, the infamous, recurring "
unregister_netdevice: waiting for ...") which in turn could cause random failures later.
Quoted 5 lines
If that specific case runs on older (unpatched) kernel will screw the overall tests results. The same could happen in less-detectable way for old bugs non explicitly checked by any test, but still triggered by the test-suite. As a consequence I expect that the results observed running newer self-tests on older kernel are unreliable.
For the stable/LTS kernel trees, they should _never_ be unreliable, otherwise that means we have missed a needed fix and so we need to resolve that.
Which is why I always recommend running the latest selftests on all older kernels, and have for a very long time now.
thanks,
greg k-h