Vlastimil Babka
19de79aaea
mm/mempool: fix poisoning order>0 pages with HIGHMEM
[ Upstream commit ec33b59542d96830e3c89845ff833cf7b25ef172 ]
The kernel test has reported:
BUG: unable to handle page fault for address: fffba000
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
*pde = 03171067 *pte = 00000000
Oops: Oops: 0002 [#1]
CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Tainted: G T 6.18.0-rc2-00031-gec7f31b2a2d3 #1 NONE a1d066dfe789f54bc7645c7989957d2bdee593ca
Tainted: [T]=RANDSTRUCT
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
EIP: memset (arch/x86/include/asm/string_32.h:168 arch/x86/lib/memcpy_32.c:17)
Code: a5 8b 4d f4 83 e1 03 74 02 f3 a4 83 c4 04 5e 5f 5d 2e e9 73 41 01 00 90 90 90 3e 8d 74 26 00 55 89 e5 57 56 89 c6 89 d0 89 f7 <f3> aa 89 f0 5e 5f 5d 2e e9 53 41 01 00 cc cc cc 55 89 e5 53 57 56
EAX: 0000006b EBX: 00000015 ECX: 001fefff EDX: 0000006b
ESI: fffb9000 EDI: fffba000 EBP: c611fbf0 ESP: c611fbe8
DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010287
CR0: 80050033 CR2: fffba000 CR3: 0316e000 CR4: 00040690
Call Trace:
poison_element (mm/mempool.c:83 mm/mempool.c:102)
mempool_init_node (mm/mempool.c:142 mm/mempool.c:226)
mempool_init_noprof (mm/mempool.c:250 (discriminator 1))
? mempool_alloc_pages (mm/mempool.c:640)
bio_integrity_initfn (block/bio-integrity.c:483 (discriminator 8))
? mempool_alloc_pages (mm/mempool.c:640)
do_one_initcall (init/main.c:1283)
Christoph found out this is due to the poisoning code not dealing
properly with CONFIG_HIGHMEM because only the first page is mapped but
then the whole potentially high-order page is accessed.
We could give up on HIGHMEM here, but it's straightforward to fix this
with a loop that's mapping, poisoning or checking and unmapping
individual pages.
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202511111411.9ebfa1ba-lkp@intel.com
Analyzed-by: Christoph Hellwig <hch@lst.de>
Fixes: bdfedb76f4 ("mm, mempool: poison elements backed by slab allocator")
Cc: stable@vger.kernel.org
Tested-by: kernel test robot <oliver.sang@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20251113-mempool-poison-v1-1-233b3ef984c3@suse.cz
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-12-01 11:41:54 +01:00
..
2025-10-19 16:30:55 +02:00
2025-09-19 16:32:01 +02:00
2025-02-17 09:40:32 +01:00
2025-10-02 13:42:53 +02:00
2024-02-23 09:25:16 +01:00
2023-03-28 16:20:06 -07:00
2024-06-16 13:47:42 +02:00
2025-03-13 12:58:27 +01:00
2023-06-09 16:25:23 -07:00
2025-08-28 16:28:43 +02:00
2023-06-09 16:25:31 -07:00
2023-04-05 19:42:38 -07:00
2023-06-09 16:25:17 -07:00
2023-06-09 16:25:56 -07:00
2023-06-23 16:59:31 -07:00
2023-06-09 16:25:23 -07:00
2022-11-22 18:50:44 -08:00
2025-11-24 10:30:14 +01:00
2023-07-24 18:04:30 -04:00
2023-06-23 16:58:19 -07:00
2022-11-08 17:37:15 -08:00
2025-10-02 13:42:49 +02:00
2023-06-19 16:19:25 -07:00
2025-08-15 12:09:08 +02:00
2025-06-27 11:09:00 +01:00
2023-02-13 15:54:27 -08:00
2023-08-18 10:12:14 -07:00
2025-10-19 16:30:55 +02:00
2022-10-03 14:03:05 -07:00
2023-08-21 13:37:46 -07:00
2024-12-09 10:32:59 +01:00
2023-08-18 10:12:36 -07:00
2025-09-19 16:32:05 +02:00
2023-05-29 16:14:28 +01:00
2025-09-19 16:32:05 +02:00
2025-08-28 16:28:32 +02:00
2024-06-16 13:47:41 +02:00
2023-04-12 17:36:23 -07:00
2025-08-28 16:28:39 +02:00
2023-08-29 14:25:26 -07:00
2023-08-24 16:20:30 -07:00
2025-05-22 14:12:25 +02:00
2025-11-24 10:30:14 +01:00
2025-08-28 16:28:39 +02:00
2025-05-22 14:12:25 +02:00
2025-09-19 16:32:04 +02:00
2025-11-24 10:30:14 +01:00
2025-11-24 10:30:13 +01:00
2024-12-14 20:00:18 +01:00
2025-12-01 11:41:54 +01:00
2023-02-09 16:51:46 -08:00
2024-04-03 15:28:33 +02:00
2025-10-02 13:42:54 +02:00
2025-05-22 14:12:25 +02:00
2023-08-21 13:07:20 -07:00
2025-10-02 13:42:49 +02:00
2025-11-24 10:30:07 +01:00
2024-08-03 08:54:12 +02:00
2025-08-28 16:28:39 +02:00
2023-08-24 16:20:30 -07:00
2023-08-18 10:12:41 -07:00
2024-11-22 15:38:37 +01:00
2025-04-25 10:45:31 +02:00
2025-03-22 12:50:44 -07:00
2025-02-27 04:10:45 -08:00
2025-10-19 16:30:55 +02:00
2023-08-18 10:12:31 -07:00
2023-01-18 17:12:52 -08:00
2025-11-24 10:30:12 +01:00
2023-08-18 10:12:39 -07:00
2023-08-21 13:37:27 -07:00
2023-08-21 13:37:30 -07:00
2024-05-02 16:32:41 +02:00
2024-08-19 06:04:29 +02:00
2025-04-25 10:45:31 +02:00
2025-06-27 11:08:49 +01:00
2023-09-02 08:39:21 -07:00
2023-06-19 16:19:29 -07:00
2025-11-24 10:30:10 +01:00
2024-06-16 13:47:40 +02:00
2023-06-09 16:25:25 -07:00
2025-08-28 16:28:42 +02:00
2025-01-09 13:32:08 +01:00
2025-04-25 10:45:31 +02:00
2022-10-03 14:03:05 -07:00
2025-11-24 10:30:13 +01:00
2024-04-03 15:28:54 +02:00
2025-12-01 11:41:39 +01:00
2024-05-02 16:32:41 +02:00
2023-06-19 13:19:34 -07:00
2022-10-03 14:03:07 -07:00
2023-04-05 19:42:46 -07:00
2024-11-17 15:08:58 +01:00
2023-07-18 10:07:47 +02:00
2024-12-09 10:33:06 +01:00
2025-09-09 18:56:34 +02:00
2025-09-19 16:32:01 +02:00
2024-09-12 11:11:25 +02:00
2022-10-03 14:03:36 -07:00
2022-10-03 14:02:46 -07:00
2023-08-24 16:20:28 -07:00
2025-10-02 13:42:49 +02:00
2024-03-01 13:35:00 +01:00
2024-10-22 15:46:21 +02:00
2025-11-24 10:30:13 +01:00
2023-04-12 17:36:23 -07:00
2024-09-12 11:11:27 +02:00
2024-10-04 16:30:02 +02:00
2025-07-17 18:35:15 +02:00
2023-08-16 12:21:32 +01:00
2025-11-24 10:30:13 +01:00
2025-11-24 10:30:12 +01:00
2025-11-24 10:30:14 +01:00
2023-08-21 13:37:51 -07:00
2023-06-19 16:19:27 -07:00
2023-06-19 16:19:27 -07:00
2025-10-02 13:42:55 +02:00
2025-11-24 10:30:12 +01:00