Vlastimil Babka
6a13b56537
mm/mempool: fix poisoning order>0 pages with HIGHMEM
commit ec33b59542 upstream.
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-12-01 11:43:23 +01:00
..
2025-10-19 16:33:58 +02:00
2025-09-19 16:35:42 +02:00
2025-02-17 10:05:31 +01:00
2025-10-02 13:44:14 +02:00
2024-05-05 17:53:51 -07:00
2024-07-03 19:30:00 -07:00
2023-10-25 16:47:13 -07:00
2022-09-11 20:25:50 -07:00
2024-02-22 10:24:57 -08:00
2024-09-03 21:15:36 -07:00
2024-02-22 10:24:57 -08:00
2025-04-25 10:47:53 +02:00
2024-04-25 20:56:04 -07:00
2025-08-28 16:31:05 +02:00
2024-12-14 20:03:33 +01:00
2024-07-03 19:29:58 -07:00
2023-12-05 11:17:58 +01:00
2023-06-09 16:25:56 -07:00
2024-05-14 00:31:43 -07:00
2024-08-12 22:00:43 -04:00
2024-09-01 20:43:33 -07:00
2024-09-01 20:43:33 -07:00
2025-11-24 10:36:07 +01:00
2024-09-09 16:38:59 -07:00
2023-06-23 16:58:19 -07:00
2022-11-08 17:37:15 -08:00
2025-10-02 13:44:11 +02:00
2024-07-03 19:30:06 -07:00
2025-08-15 12:14:13 +02:00
2025-11-24 10:36:07 +01:00
2024-09-01 20:25:50 -07:00
2024-09-01 20:25:45 -07:00
2023-10-25 16:47:14 -07:00
2025-10-19 16:33:58 +02:00
2024-07-03 19:29:58 -07:00
2023-12-12 10:11:32 +01:00
2025-05-18 08:24:51 +02:00
2023-08-18 10:12:36 -07:00
2025-09-19 16:35:48 +02:00
2024-08-27 14:12:51 +02:00
2025-09-19 16:35:46 +02:00
2025-09-09 18:58:16 +02:00
2025-11-24 10:35:59 +01:00
2024-08-07 18:33:56 -07:00
2023-04-12 17:36:23 -07:00
2025-06-27 11:11:38 +01:00
2024-09-03 21:15:31 -07:00
2023-08-24 16:20:30 -07:00
2025-05-18 08:24:54 +02:00
2024-11-05 16:49:54 -08:00
2024-12-14 20:03:33 +01:00
2025-05-29 11:03:22 +02:00
2025-01-09 13:33:54 +01:00
2025-04-20 10:15:50 +02:00
2025-09-19 16:35:46 +02:00
2024-09-26 14:01:44 -07:00
2025-11-24 10:36:07 +01:00
2024-12-14 20:03:32 +01:00
2025-12-01 11:43:23 +01:00
2024-05-05 17:53:49 -07:00
2024-03-13 12:12:21 -07:00
2025-02-27 04:30:22 -08:00
2025-10-29 14:08:57 +01:00
2024-07-12 15:52:15 -07:00
2025-10-02 13:44:11 +02:00
2025-11-24 10:36:00 +01:00
2022-10-03 14:02:43 -07:00
2024-07-03 19:30:26 -07:00
2025-01-09 13:33:54 +01:00
2024-02-22 15:27:17 -08:00
2024-09-01 20:25:54 -07:00
2024-09-01 20:25:55 -07:00
2024-11-05 16:49:55 -08:00
2025-04-20 10:15:49 +02:00
2024-09-21 07:29:05 -07:00
2022-09-26 19:46:25 -07:00
2024-11-11 17:20:23 -08:00
2024-09-03 21:15:31 -07:00
2024-10-28 21:40:40 -07:00
2024-09-03 21:15:32 -07:00
2025-02-08 09:58:19 +01:00
2025-10-19 16:33:58 +02:00
2024-09-01 20:25:53 -07:00
2024-08-15 22:16:14 -07:00
2023-01-18 17:12:52 -08:00
2024-11-11 00:00:37 -08:00
2025-03-22 12:54:28 -07:00
2024-05-19 14:40:44 -07:00
2023-12-10 16:51:50 -08:00
2024-01-08 15:27:15 -08:00
2024-06-15 10:43:04 -07:00
2025-04-20 10:15:49 +02:00
2025-06-27 11:11:22 +01:00
2024-10-28 21:40:38 -07:00
2024-07-10 12:14:54 -07:00
2024-04-25 20:55:49 -07:00
2025-11-24 10:36:05 +01:00
2024-05-07 10:37:00 -07:00
2023-12-10 16:51:39 -08:00
2025-08-20 18:30:55 +02:00
2025-01-09 13:33:54 +01:00
2025-04-20 10:15:49 +02:00
2022-10-03 14:03:05 -07:00
2025-11-24 10:36:07 +01:00
2024-09-01 20:25:45 -07:00
2025-12-01 11:43:21 +01:00
2024-09-17 01:07:00 -07:00
2024-09-03 21:15:40 -07:00
2024-10-31 20:27:04 -07:00
2022-10-03 14:03:07 -07:00
2024-01-08 15:27:15 -08:00
2024-12-09 10:41:07 +01:00
2025-10-19 16:33:57 +02:00
2025-11-24 10:36:01 +01:00
2025-09-19 16:35:42 +02:00
2025-09-09 18:58:22 +02:00
2024-09-03 21:15:33 -07:00
2024-04-25 20:56:37 -07:00
2024-09-17 01:07:01 -07:00
2025-10-02 13:44:11 +02:00
2024-09-17 01:07:01 -07:00
2025-10-06 11:17:52 +02:00
2025-11-24 10:36:07 +01:00
2023-04-12 17:36:23 -07:00
2025-09-09 18:58:15 +02:00
2024-09-01 20:26:02 -07:00
2025-06-27 11:11:40 +01:00
2025-07-06 11:01:48 +02:00
2025-04-25 10:48:06 +02:00
2025-07-17 18:37:14 +02:00
2023-11-28 14:08:38 +01:00
2025-09-25 11:13:45 +02:00
2024-12-09 10:41:01 +01:00
2024-07-03 22:40:37 -07:00
2024-09-01 20:25:56 -07:00
2024-04-25 20:55:48 -07:00
2024-04-25 20:55:48 -07:00
2025-08-01 09:48:44 +01:00
2025-04-10 14:39:40 +02:00