<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include, branch v6.10.6</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.10.6</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.10.6'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2024-08-14T13:34:36Z</updated>
<entry>
<title>block: use the right type for stub rq_integrity_vec()</title>
<updated>2024-08-14T13:34:36Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2024-06-27T01:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3118c43a563d5200cf398b6f81bc939e83b881f2'/>
<id>urn:sha1:3118c43a563d5200cf398b6f81bc939e83b881f2</id>
<content type='text'>
commit 69b6517687a4b1fb250bd8c9c193a0a304c8ba17 upstream.

For !CONFIG_BLK_DEV_INTEGRITY, rq_integrity_vec() wasn't updated
properly. Fix it up.

Fixes: cf546dd289e0 ("block: change rq_integrity_vec to respect the iterator")
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Matthieu Baerts &lt;matttbe@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tracefs: Use generic inode RCU for synchronizing freeing</title>
<updated>2024-08-14T13:34:30Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2024-08-07T22:54:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=061da60716ce0cde99f62f31937b81e1c03acef6'/>
<id>urn:sha1:061da60716ce0cde99f62f31937b81e1c03acef6</id>
<content type='text'>
commit 0b6743bd60a56a701070b89fb80c327a44b7b3e2 upstream.

With structure layout randomization enabled for 'struct inode' we need to
avoid overlapping any of the RCU-used / initialized-only-once members,
e.g. i_lru or i_sb_list to not corrupt related list traversals when making
use of the rcu_head.

For an unlucky structure layout of 'struct inode' we may end up with the
following splat when running the ftrace selftests:

[&lt;...&gt;] list_del corruption, ffff888103ee2cb0-&gt;next (tracefs_inode_cache+0x0/0x4e0 [slab object]) is NULL (prev is tracefs_inode_cache+0x78/0x4e0 [slab object])
[&lt;...&gt;] ------------[ cut here ]------------
[&lt;...&gt;] kernel BUG at lib/list_debug.c:54!
[&lt;...&gt;] invalid opcode: 0000 [#1] PREEMPT SMP KASAN
[&lt;...&gt;] CPU: 3 PID: 2550 Comm: mount Tainted: G                 N  6.8.12-grsec+ #122 ed2f536ca62f28b087b90e3cc906a8d25b3ddc65
[&lt;...&gt;] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
[&lt;...&gt;] RIP: 0010:[&lt;ffffffff84656018&gt;] __list_del_entry_valid_or_report+0x138/0x3e0
[&lt;...&gt;] Code: 48 b8 99 fb 65 f2 ff ff ff ff e9 03 5c d9 fc cc 48 b8 99 fb 65 f2 ff ff ff ff e9 33 5a d9 fc cc 48 b8 99 fb 65 f2 ff ff ff ff &lt;0f&gt; 0b 4c 89 e9 48 89 ea 48 89 ee 48 c7 c7 60 8f dd 89 31 c0 e8 2f
[&lt;...&gt;] RSP: 0018:fffffe80416afaf0 EFLAGS: 00010283
[&lt;...&gt;] RAX: 0000000000000098 RBX: ffff888103ee2cb0 RCX: 0000000000000000
[&lt;...&gt;] RDX: ffffffff84655fe8 RSI: ffffffff89dd8b60 RDI: 0000000000000001
[&lt;...&gt;] RBP: ffff888103ee2cb0 R08: 0000000000000001 R09: fffffbd0082d5f25
[&lt;...&gt;] R10: fffffe80416af92f R11: 0000000000000001 R12: fdf99c16731d9b6d
[&lt;...&gt;] R13: 0000000000000000 R14: ffff88819ad4b8b8 R15: 0000000000000000
[&lt;...&gt;] RBX: tracefs_inode_cache+0x0/0x4e0 [slab object]
[&lt;...&gt;] RDX: __list_del_entry_valid_or_report+0x108/0x3e0
[&lt;...&gt;] RSI: __func__.47+0x4340/0x4400
[&lt;...&gt;] RBP: tracefs_inode_cache+0x0/0x4e0 [slab object]
[&lt;...&gt;] RSP: process kstack fffffe80416afaf0+0x7af0/0x8000 [mount 2550 2550]
[&lt;...&gt;] R09: kasan shadow of process kstack fffffe80416af928+0x7928/0x8000 [mount 2550 2550]
[&lt;...&gt;] R10: process kstack fffffe80416af92f+0x792f/0x8000 [mount 2550 2550]
[&lt;...&gt;] R14: tracefs_inode_cache+0x78/0x4e0 [slab object]
[&lt;...&gt;] FS:  00006dcb380c1840(0000) GS:ffff8881e0600000(0000) knlGS:0000000000000000
[&lt;...&gt;] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[&lt;...&gt;] CR2: 000076ab72b30e84 CR3: 000000000b088004 CR4: 0000000000360ef0 shadow CR4: 0000000000360ef0
[&lt;...&gt;] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[&lt;...&gt;] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[&lt;...&gt;] ASID: 0003
[&lt;...&gt;] Stack:
[&lt;...&gt;]  ffffffff818a2315 00000000f5c856ee ffffffff896f1840 ffff888103ee2cb0
[&lt;...&gt;]  ffff88812b6b9750 0000000079d714b6 fffffbfff1e9280b ffffffff8f49405f
[&lt;...&gt;]  0000000000000001 0000000000000000 ffff888104457280 ffffffff8248b392
[&lt;...&gt;] Call Trace:
[&lt;...&gt;]  &lt;TASK&gt;
[&lt;...&gt;]  [&lt;ffffffff818a2315&gt;] ? lock_release+0x175/0x380 fffffe80416afaf0
[&lt;...&gt;]  [&lt;ffffffff8248b392&gt;] list_lru_del+0x152/0x740 fffffe80416afb48
[&lt;...&gt;]  [&lt;ffffffff8248ba93&gt;] list_lru_del_obj+0x113/0x280 fffffe80416afb88
[&lt;...&gt;]  [&lt;ffffffff8940fd19&gt;] ? _atomic_dec_and_lock+0x119/0x200 fffffe80416afb90
[&lt;...&gt;]  [&lt;ffffffff8295b244&gt;] iput_final+0x1c4/0x9a0 fffffe80416afbb8
[&lt;...&gt;]  [&lt;ffffffff8293a52b&gt;] dentry_unlink_inode+0x44b/0xaa0 fffffe80416afbf8
[&lt;...&gt;]  [&lt;ffffffff8293fefc&gt;] __dentry_kill+0x23c/0xf00 fffffe80416afc40
[&lt;...&gt;]  [&lt;ffffffff8953a85f&gt;] ? __this_cpu_preempt_check+0x1f/0xa0 fffffe80416afc48
[&lt;...&gt;]  [&lt;ffffffff82949ce5&gt;] ? shrink_dentry_list+0x1c5/0x760 fffffe80416afc70
[&lt;...&gt;]  [&lt;ffffffff82949b71&gt;] ? shrink_dentry_list+0x51/0x760 fffffe80416afc78
[&lt;...&gt;]  [&lt;ffffffff82949da8&gt;] shrink_dentry_list+0x288/0x760 fffffe80416afc80
[&lt;...&gt;]  [&lt;ffffffff8294ae75&gt;] shrink_dcache_sb+0x155/0x420 fffffe80416afcc8
[&lt;...&gt;]  [&lt;ffffffff8953a7c3&gt;] ? debug_smp_processor_id+0x23/0xa0 fffffe80416afce0
[&lt;...&gt;]  [&lt;ffffffff8294ad20&gt;] ? do_one_tree+0x140/0x140 fffffe80416afcf8
[&lt;...&gt;]  [&lt;ffffffff82997349&gt;] ? do_remount+0x329/0xa00 fffffe80416afd18
[&lt;...&gt;]  [&lt;ffffffff83ebf7a1&gt;] ? security_sb_remount+0x81/0x1c0 fffffe80416afd38
[&lt;...&gt;]  [&lt;ffffffff82892096&gt;] reconfigure_super+0x856/0x14e0 fffffe80416afd70
[&lt;...&gt;]  [&lt;ffffffff815d1327&gt;] ? ns_capable_common+0xe7/0x2a0 fffffe80416afd90
[&lt;...&gt;]  [&lt;ffffffff82997436&gt;] do_remount+0x416/0xa00 fffffe80416afdd0
[&lt;...&gt;]  [&lt;ffffffff829b2ba4&gt;] path_mount+0x5c4/0x900 fffffe80416afe28
[&lt;...&gt;]  [&lt;ffffffff829b25e0&gt;] ? finish_automount+0x13a0/0x13a0 fffffe80416afe60
[&lt;...&gt;]  [&lt;ffffffff82903812&gt;] ? user_path_at_empty+0xb2/0x140 fffffe80416afe88
[&lt;...&gt;]  [&lt;ffffffff829b2ff5&gt;] do_mount+0x115/0x1c0 fffffe80416afeb8
[&lt;...&gt;]  [&lt;ffffffff829b2ee0&gt;] ? path_mount+0x900/0x900 fffffe80416afed8
[&lt;...&gt;]  [&lt;ffffffff8272461c&gt;] ? __kasan_check_write+0x1c/0xa0 fffffe80416afee0
[&lt;...&gt;]  [&lt;ffffffff829b31cf&gt;] __do_sys_mount+0x12f/0x280 fffffe80416aff30
[&lt;...&gt;]  [&lt;ffffffff829b36cd&gt;] __x64_sys_mount+0xcd/0x2e0 fffffe80416aff70
[&lt;...&gt;]  [&lt;ffffffff819f8818&gt;] ? syscall_trace_enter+0x218/0x380 fffffe80416aff88
[&lt;...&gt;]  [&lt;ffffffff8111655e&gt;] x64_sys_call+0x5d5e/0x6720 fffffe80416affa8
[&lt;...&gt;]  [&lt;ffffffff8952756d&gt;] do_syscall_64+0xcd/0x3c0 fffffe80416affb8
[&lt;...&gt;]  [&lt;ffffffff8100119b&gt;] entry_SYSCALL_64_safe_stack+0x4c/0x87 fffffe80416affe8
[&lt;...&gt;]  &lt;/TASK&gt;
[&lt;...&gt;]  &lt;PTREGS&gt;
[&lt;...&gt;] RIP: 0033:[&lt;00006dcb382ff66a&gt;] vm_area_struct[mount 2550 2550 file 6dcb38225000-6dcb3837e000 22 55(read|exec|mayread|mayexec)]+0x0/0xb8 [userland map]
[&lt;...&gt;] Code: 48 8b 0d 29 18 0d 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 &lt;48&gt; 3d 01 f0 ff ff 73 01 c3 48 8b 0d f6 17 0d 00 f7 d8 64 89 01 48
[&lt;...&gt;] RSP: 002b:0000763d68192558 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
[&lt;...&gt;] RAX: ffffffffffffffda RBX: 00006dcb38433264 RCX: 00006dcb382ff66a
[&lt;...&gt;] RDX: 000017c3e0d11210 RSI: 000017c3e0d1a5a0 RDI: 000017c3e0d1ae70
[&lt;...&gt;] RBP: 000017c3e0d10fb0 R08: 000017c3e0d11260 R09: 00006dcb383d1be0
[&lt;...&gt;] R10: 000000000020002e R11: 0000000000000246 R12: 0000000000000000
[&lt;...&gt;] R13: 000017c3e0d1ae70 R14: 000017c3e0d11210 R15: 000017c3e0d10fb0
[&lt;...&gt;] RBX: vm_area_struct[mount 2550 2550 file 6dcb38433000-6dcb38434000 5b 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map]
[&lt;...&gt;] RCX: vm_area_struct[mount 2550 2550 file 6dcb38225000-6dcb3837e000 22 55(read|exec|mayread|mayexec)]+0x0/0xb8 [userland map]
[&lt;...&gt;] RDX: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map]
[&lt;...&gt;] RSI: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map]
[&lt;...&gt;] RDI: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map]
[&lt;...&gt;] RBP: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map]
[&lt;...&gt;] RSP: vm_area_struct[mount 2550 2550 anon 763d68173000-763d68195000 7ffffffdd 100133(read|write|mayread|maywrite|growsdown|account)]+0x0/0xb8 [userland map]
[&lt;...&gt;] R08: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map]
[&lt;...&gt;] R09: vm_area_struct[mount 2550 2550 file 6dcb383d1000-6dcb383d3000 1cd 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map]
[&lt;...&gt;] R13: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map]
[&lt;...&gt;] R14: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map]
[&lt;...&gt;] R15: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map]
[&lt;...&gt;]  &lt;/PTREGS&gt;
[&lt;...&gt;] Modules linked in:
[&lt;...&gt;] ---[ end trace 0000000000000000 ]---

The list debug message as well as RBX's symbolic value point out that the
object in question was allocated from 'tracefs_inode_cache' and that the
list's '-&gt;next' member is at offset 0. Dumping the layout of the relevant
parts of 'struct tracefs_inode' gives the following:

  struct tracefs_inode {
    union {
      struct inode {
        struct list_head {
          struct list_head * next;                    /*     0     8 */
          struct list_head * prev;                    /*     8     8 */
        } i_lru;
        [...]
      } vfs_inode;
      struct callback_head {
        void (*func)(struct callback_head *);         /*     0     8 */
        struct callback_head * next;                  /*     8     8 */
      } rcu;
    };
    [...]
  };

Above shows that 'vfs_inode.i_lru' overlaps with 'rcu' which will
destroy the 'i_lru' list as soon as the 'rcu' member gets used, e.g. in
call_rcu() or later when calling the RCU callback. This will disturb
concurrent list traversals as well as object reuse which assumes these
list heads will keep their integrity.

For reproduction, the following diff manually overlays 'i_lru' with
'rcu' as, otherwise, one would require some good portion of luck for
gambling an unlucky RANDSTRUCT seed:

  --- a/include/linux/fs.h
  +++ b/include/linux/fs.h
  @@ -629,6 +629,7 @@ struct inode {
   	umode_t			i_mode;
   	unsigned short		i_opflags;
   	kuid_t			i_uid;
  +	struct list_head	i_lru;		/* inode LRU list */
   	kgid_t			i_gid;
   	unsigned int		i_flags;

  @@ -690,7 +691,6 @@ struct inode {
   	u16			i_wb_frn_avg_time;
   	u16			i_wb_frn_history;
   #endif
  -	struct list_head	i_lru;		/* inode LRU list */
   	struct list_head	i_sb_list;
   	struct list_head	i_wb_list;	/* backing dev writeback list */
   	union {

The tracefs inode does not need to supply its own RCU delayed destruction
of its inode. The inode code itself offers both a "destroy_inode()"
callback that gets called when the last reference of the inode is
released, and the "free_inode()" which is called after a RCU
synchronization period from the "destroy_inode()".

The tracefs code can unlink the inode from its list in the destroy_inode()
callback, and the simply free it from the free_inode() callback. This
should provide the same protection.

Link: https://lore.kernel.org/all/20240807115143.45927-3-minipli@grsecurity.net/

Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Cc: Ajay Kaher &lt;ajay.kaher@broadcom.com&gt;
Cc: Ilkka =?utf-8?b?TmF1bGFww6TDpA==?= &lt;digirigawa@gmail.com&gt;
Link: https://lore.kernel.org/20240807185402.61410544@gandalf.local.home
Fixes: baa23a8d4360 ("tracefs: Reset permissions on remount if permissions are options")
Reported-by: Mathias Krause &lt;minipli@grsecurity.net&gt;
Reported-by: Brad Spengler &lt;spender@grsecurity.net&gt;
Suggested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ASoC: cs35l56: Handle OTP read latency over SoundWire</title>
<updated>2024-08-14T13:34:22Z</updated>
<author>
<name>Richard Fitzgerald</name>
<email>rf@opensource.cirrus.com</email>
</author>
<published>2024-08-05T14:08:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8237f7e436045ffd3c6e8172ba4e0ec43dbf81f4'/>
<id>urn:sha1:8237f7e436045ffd3c6e8172ba4e0ec43dbf81f4</id>
<content type='text'>
[ Upstream commit e42066df07c0fcedebb32ed56f8bc39b4bf86337 ]

Use the late-read buffer in the CS35L56 SoundWire interface to
read OTP memory.

The OTP memory has a longer access latency than chip registers
and cannot guarantee to return the data value in the SoundWire
control response if the bus clock is &gt;4.8 MHz. The Cirrus
SoundWire peripheral IP exposes the bridge-to-bus read buffer
and status bits. For a read from OTP the bridge status bits are
polled to wait for the OTP data to be loaded into the read buffer
and the data is then read from there.

Signed-off-by: Richard Fitzgerald &lt;rf@opensource.cirrus.com&gt;
Fixes: e1830f66f6c6 ("ASoC: cs35l56: Add helper functions for amp calibration")
Link: https://patch.msgid.link/20240805140839.26042-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: cs35l56: Revert support for dual-ownership of ASP registers</title>
<updated>2024-08-14T13:34:22Z</updated>
<author>
<name>Richard Fitzgerald</name>
<email>rf@opensource.cirrus.com</email>
</author>
<published>2024-07-01T10:44:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e5421a8b407b6e1ccb98acd715c50819ede66c02'/>
<id>urn:sha1:e5421a8b407b6e1ccb98acd715c50819ede66c02</id>
<content type='text'>
[ Upstream commit 5d7e328e20b3d2bd3e1e8bea7a868ab8892aeed1 ]

This patch reverts a series of commits that allowed for the ASP
registers to be owned by either the driver or the firmware. Nothing
currently depends on the functionality that is being reverted, so
it is safe to remove.

The commits being reverted are (last 3 are bugfixes to the first 2):
commit 72a77d7631c6
("ASoC: cs35l56: Fix to ensure ASP1 registers match cache")
commit 07f7d6e7a124
("ASoC: cs35l56: Fix for initializing ASP1 mixer registers")
commit 4703b014f28b
("ASoC: cs35l56: fix reversed if statement in cs35l56_dspwait_asp1tx_put()")
commit c14f09f010cc
("ASoC: cs35l56: Fix deadlock in ASP1 mixer register initialization")
commit dfd2ffb37399
("ASoC: cs35l56: Prevent overwriting firmware ASP config")

These reverts have been squashed into a single commit because there
would be no reason to revert only some of them (which would just
reintroduce bugs).

The changes introduced by the commits were well-intentioned but
somewhat misguided. ACPI does not provide any information about how
audio hardware is linked together, so that information has to be
hardcoded into drivers. On Windows the firmware is customized to
statically setup appropriate configuration of the audio links,
and the intent of the commits was to re-use this information if the
Linux host drivers aren't taking control of the ASP. This would
avoid having to hardcode the ASP config into the machine driver on
some systems.

However, this added complexity and race conditions into the driver.
It also complicates implementation of new code.

The only case where the ASP is used but the host is not taking
ownership is when CS35L56 is used in SoundWire mode with the ASP
as a reference audio interconnect. But even in that case it's not
necessarily required even if the firmware initialized it. Typically
it is used to avoid the host SDCA drivers having to be capable of
aggregating capture paths from multiple SoundWire peripherals. But
the SOF SoundWire support is capable of doing that aggregation.

Reverting all these commits significantly simplifies the driver.
Let's just use the normal Linux mechanisms of the machine driver and
ALSA controls to set things up instead of trying to use the firmware
to do use-case setup.

Signed-off-by: Richard Fitzgerald &lt;rf@opensource.cirrus.com&gt;
Link: https://patch.msgid.link/20240701104444.172556-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Stable-dep-of: e42066df07c0 ("ASoC: cs35l56: Handle OTP read latency over SoundWire")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: kprobe: remove unused declaring of bpf_kprobe_override</title>
<updated>2024-08-14T13:34:21Z</updated>
<author>
<name>Menglong Dong</name>
<email>menglong8.dong@gmail.com</email>
</author>
<published>2024-08-05T05:01:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8c7eab0e8abc7b589feafd6bc403311f9fde4d7f'/>
<id>urn:sha1:8c7eab0e8abc7b589feafd6bc403311f9fde4d7f</id>
<content type='text'>
[ Upstream commit 0e8b53979ac86eddb3fd76264025a70071a25574 ]

After the commit 66665ad2f102 ("tracing/kprobe: bpf: Compare instruction
pointer with original one"), "bpf_kprobe_override" is not used anywhere
anymore, and we can remove it now.

Link: https://lore.kernel.org/all/20240710085939.11520-1-dongml2@chinatelecom.cn/

Fixes: 66665ad2f102 ("tracing/kprobe: bpf: Compare instruction pointer with original one")
Signed-off-by: Menglong Dong &lt;dongml2@chinatelecom.cn&gt;
Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Signed-off-by: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: drop bad gso csum_start and offset in virtio_net_hdr</title>
<updated>2024-08-14T13:34:18Z</updated>
<author>
<name>Willem de Bruijn</name>
<email>willemb@google.com</email>
</author>
<published>2024-07-29T20:10:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2edbb3e8838c672cd7e247e47989df9d03fc6668'/>
<id>urn:sha1:2edbb3e8838c672cd7e247e47989df9d03fc6668</id>
<content type='text'>
commit 89add40066f9ed9abe5f7f886fe5789ff7e0c50e upstream.

Tighten csum_start and csum_offset checks in virtio_net_hdr_to_skb
for GSO packets.

The function already checks that a checksum requested with
VIRTIO_NET_HDR_F_NEEDS_CSUM is in skb linear. But for GSO packets
this might not hold for segs after segmentation.

Syzkaller demonstrated to reach this warning in skb_checksum_help

	offset = skb_checksum_start_offset(skb);
	ret = -EINVAL;
	if (WARN_ON_ONCE(offset &gt;= skb_headlen(skb)))

By injecting a TSO packet:

WARNING: CPU: 1 PID: 3539 at net/core/dev.c:3284 skb_checksum_help+0x3d0/0x5b0
 ip_do_fragment+0x209/0x1b20 net/ipv4/ip_output.c:774
 ip_finish_output_gso net/ipv4/ip_output.c:279 [inline]
 __ip_finish_output+0x2bd/0x4b0 net/ipv4/ip_output.c:301
 iptunnel_xmit+0x50c/0x930 net/ipv4/ip_tunnel_core.c:82
 ip_tunnel_xmit+0x2296/0x2c70 net/ipv4/ip_tunnel.c:813
 __gre_xmit net/ipv4/ip_gre.c:469 [inline]
 ipgre_xmit+0x759/0xa60 net/ipv4/ip_gre.c:661
 __netdev_start_xmit include/linux/netdevice.h:4850 [inline]
 netdev_start_xmit include/linux/netdevice.h:4864 [inline]
 xmit_one net/core/dev.c:3595 [inline]
 dev_hard_start_xmit+0x261/0x8c0 net/core/dev.c:3611
 __dev_queue_xmit+0x1b97/0x3c90 net/core/dev.c:4261
 packet_snd net/packet/af_packet.c:3073 [inline]

The geometry of the bad input packet at tcp_gso_segment:

[   52.003050][ T8403] skb len=12202 headroom=244 headlen=12093 tailroom=0
[   52.003050][ T8403] mac=(168,24) mac_len=24 net=(192,52) trans=244
[   52.003050][ T8403] shinfo(txflags=0 nr_frags=1 gso(size=1552 type=3 segs=0))
[   52.003050][ T8403] csum(0x60000c7 start=199 offset=1536
ip_summed=3 complete_sw=0 valid=0 level=0)

Mitigate with stricter input validation.

csum_offset: for GSO packets, deduce the correct value from gso_type.
This is already done for USO. Extend it to TSO. Let UFO be:
udp[46]_ufo_fragment ignores these fields and always computes the
checksum in software.

csum_start: finding the real offset requires parsing to the transport
header. Do not add a parser, use existing segmentation parsing. Thanks
to SKB_GSO_DODGY, that also catches bad packets that are hw offloaded.
Again test both TSO and USO. Do not test UFO for the above reason, and
do not test UDP tunnel offload.

GSO packet are almost always CHECKSUM_PARTIAL. USO packets may be
CHECKSUM_NONE since commit 10154dbded6d6 ("udp: Allow GSO transmit
from devices with no checksum offload"), but then still these fields
are initialized correctly in udp4_hwcsum/udp6_hwcsum_outgoing. So no
need to test for ip_summed == CHECKSUM_PARTIAL first.

This revises an existing fix mentioned in the Fixes tag, which broke
small packets with GSO offload, as detected by kselftests.

Link: https://syzkaller.appspot.com/bug?extid=e1db31216c789f552871
Link: https://lore.kernel.org/netdev/20240723223109.2196886-1-kuba@kernel.org
Fixes: e269d79c7d35 ("net: missing check virtio")
Cc: stable@vger.kernel.org
Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Link: https://patch.msgid.link/20240729201108.1615114-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>profiling: remove profile=sleep support</title>
<updated>2024-08-14T13:34:17Z</updated>
<author>
<name>Tetsuo Handa</name>
<email>penguin-kernel@I-love.SAKURA.ne.jp</email>
</author>
<published>2024-08-04T09:48:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=69b801f303df1b59b0d2819a0e9d1ad829190e7c'/>
<id>urn:sha1:69b801f303df1b59b0d2819a0e9d1ad829190e7c</id>
<content type='text'>
commit b88f55389ad27f05ed84af9e1026aa64dbfabc9a upstream.

The kernel sleep profile is no longer working due to a recursive locking
bug introduced by commit 42a20f86dc19 ("sched: Add wrapper for get_wchan()
to keep task blocked")

Booting with the 'profile=sleep' kernel command line option added or
executing

  # echo -n sleep &gt; /sys/kernel/profiling

after boot causes the system to lock up.

Lockdep reports

  kthreadd/3 is trying to acquire lock:
  ffff93ac82e08d58 (&amp;p-&gt;pi_lock){....}-{2:2}, at: get_wchan+0x32/0x70

  but task is already holding lock:
  ffff93ac82e08d58 (&amp;p-&gt;pi_lock){....}-{2:2}, at: try_to_wake_up+0x53/0x370

with the call trace being

   lock_acquire+0xc8/0x2f0
   get_wchan+0x32/0x70
   __update_stats_enqueue_sleeper+0x151/0x430
   enqueue_entity+0x4b0/0x520
   enqueue_task_fair+0x92/0x6b0
   ttwu_do_activate+0x73/0x140
   try_to_wake_up+0x213/0x370
   swake_up_locked+0x20/0x50
   complete+0x2f/0x40
   kthread+0xfb/0x180

However, since nobody noticed this regression for more than two years,
let's remove 'profile=sleep' support based on the assumption that nobody
needs this functionality.

Fixes: 42a20f86dc19 ("sched: Add wrapper for get_wchan() to keep task blocked")
Cc: stable@vger.kernel.org # v5.16+
Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>PCI: Add Edimax Vendor ID to pci_ids.h</title>
<updated>2024-08-14T13:34:10Z</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@gmail.com</email>
</author>
<published>2024-06-23T23:55:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=91191059d927391df72def6081b3bff71fa94633'/>
<id>urn:sha1:91191059d927391df72def6081b3bff71fa94633</id>
<content type='text'>
[ Upstream commit eee5528890d54b22b46f833002355a5ee94c3bb4 ]

Add the Edimax Vendor ID (0x1432) for an ethernet driver for Tehuti
Networks TN40xx chips. This ID can be used for Realtek 8180 and Ralink
rt28xx wireless drivers.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@gmail.com&gt;
Acked-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Link: https://patch.msgid.link/20240623235507.108147-2-fujita.tomonori@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>block: change rq_integrity_vec to respect the iterator</title>
<updated>2024-08-14T13:34:07Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2024-05-27T15:40:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c31a8f14eadf23db302a317c216d2ed9b0079f1e'/>
<id>urn:sha1:c31a8f14eadf23db302a317c216d2ed9b0079f1e</id>
<content type='text'>
[ Upstream commit cf546dd289e0f6d2594c25e2fb4e19ee67c6d988 ]

If we allocate a bio that is larger than NVMe maximum request size,
attach integrity metadata to it and send it to the NVMe subsystem, the
integrity metadata will be corrupted.

Splitting the bio works correctly. The function bio_split will clone the
bio, trim the iterator of the first bio and advance the iterator of the
second bio.

However, the function rq_integrity_vec has a bug - it returns the first
vector of the bio's metadata and completely disregards the metadata
iterator that was advanced when the bio was split. Thus, the second bio
uses the same metadata as the first bio and this leads to metadata
corruption.

This commit changes rq_integrity_vec, so that it calls mp_bvec_iter_bvec
instead of returning the first vector. mp_bvec_iter_bvec reads the
iterator and uses it to build a bvec for the current position in the
iterator.

The "queue_max_integrity_segments(rq-&gt;q) &gt; 1" check was removed, because
the updated rq_integrity_vec function works correctly with multiple
segments.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Reviewed-by: Anuj Gupta &lt;anuj20.g@samsung.com&gt;
Reviewed-by: Kanchan Joshi &lt;joshi.k@samsung.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/49d1afaa-f934-6ed2-a678-e0d428c63a65@redhat.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Revert "rcu-tasks: Fix synchronize_rcu_tasks() VS zap_pid_ns_processes()"</title>
<updated>2024-08-14T13:34:05Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>frederic@kernel.org</email>
</author>
<published>2024-04-25T14:24:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=866c820aee2bf1a2959b892a07c2e66d2eb273f2'/>
<id>urn:sha1:866c820aee2bf1a2959b892a07c2e66d2eb273f2</id>
<content type='text'>
[ Upstream commit 9855c37edf0009cc276cecfee09f7e76e2380212 ]

This reverts commit 28319d6dc5e2ffefa452c2377dd0f71621b5bff0. The race
it fixed was subject to conditions that don't exist anymore since:

	1612160b9127 ("rcu-tasks: Eliminate deadlocks involving do_exit() and RCU tasks")

This latter commit removes the use of SRCU that used to cover the
RCU-tasks blind spot on exit between the tasklist's removal and the
final preemption disabling. The task is now placed instead into a
temporary list inside which voluntary sleeps are accounted as RCU-tasks
quiescent states. This would disarm the deadlock initially reported
against PID namespace exit.

Signed-off-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Reviewed-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
