Andrea Righi
a419beac4a
module/decompress: use vmalloc() for zstd decompression workspace
...
Using kmalloc() to allocate the decompression workspace for zstd may
trigger the following warning when large modules are loaded (i.e., xfs):
[ 2.961884] WARNING: CPU: 1 PID: 254 at mm/page_alloc.c:4453 __alloc_pages+0x2c3/0x350
...
[ 2.989033] Call Trace:
[ 2.989841] <TASK>
[ 2.990614] ? show_regs+0x6d/0x80
[ 2.991573] ? __warn+0x89/0x160
[ 2.992485] ? __alloc_pages+0x2c3/0x350
[ 2.993520] ? report_bug+0x17e/0x1b0
[ 2.994506] ? handle_bug+0x51/0xa0
[ 2.995474] ? exc_invalid_op+0x18/0x80
[ 2.996469] ? asm_exc_invalid_op+0x1b/0x20
[ 2.997530] ? module_zstd_decompress+0xdc/0x2a0
[ 2.998665] ? __alloc_pages+0x2c3/0x350
[ 2.999695] ? module_zstd_decompress+0xdc/0x2a0
[ 3.000821] __kmalloc_large_node+0x7a/0x150
[ 3.001920] __kmalloc+0xdb/0x170
[ 3.002824] module_zstd_decompress+0xdc/0x2a0
[ 3.003857] module_decompress+0x37/0xc0
[ 3.004688] init_module_from_file+0xd0/0x100
[ 3.005668] idempotent_init_module+0x11c/0x2b0
[ 3.006632] __x64_sys_finit_module+0x64/0xd0
[ 3.007568] do_syscall_64+0x59/0x90
[ 3.008373] ? ksys_read+0x73/0x100
[ 3.009395] ? exit_to_user_mode_prepare+0x30/0xb0
[ 3.010531] ? syscall_exit_to_user_mode+0x37/0x60
[ 3.011662] ? do_syscall_64+0x68/0x90
[ 3.012511] ? do_syscall_64+0x68/0x90
[ 3.013364] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
However, continuous physical memory does not seem to be required in
module_zstd_decompress(), so use vmalloc() instead, to prevent the
warning and avoid potential failures at loading compressed modules.
Fixes: 169a58ad824d ("module/decompress: Support zstd in-kernel decompression")
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
2023-08-29 09:39:08 -07:00
..
2023-07-03 18:48:09 +02:00
2023-06-28 10:28:11 -07:00
2023-05-26 19:01:47 +02:00
2023-07-03 09:27:12 +01:00
2023-07-09 10:24:22 -07:00
2023-04-16 14:23:07 +02:00
2023-07-01 08:58:41 -07:00
2023-01-01 11:15:05 -08:00
2022-12-21 14:31:52 -08:00
2023-06-30 11:13:44 +02:00
2023-06-09 23:29:50 +10:00
2023-06-05 13:56:52 +02:00
2023-06-28 10:59:38 -07:00
2023-08-29 09:39:08 -07:00
2023-06-28 10:28:11 -07:00
2023-06-05 21:11:03 +02:00
2023-06-07 13:44:06 -07:00
2023-06-27 16:54:21 -07:00
2023-06-27 21:24:18 -07:00
2023-07-06 19:07:15 -07:00
2022-11-30 16:13:18 -08:00
2022-08-22 18:50:06 -04:00
2022-09-01 17:39:30 -04:00
2022-08-29 19:47:03 -04:00
2023-05-17 11:34:55 -04:00
2023-03-01 10:01:22 -08:00
2022-09-26 19:46:09 -07:00
2023-05-22 14:30:52 -04:00
2022-09-26 10:13:13 -07:00
2023-03-14 19:32:38 -07:00
2023-06-05 09:57:20 +02:00
2023-01-13 11:48:15 +01:00
2023-05-23 18:06:40 +02:00
2023-04-05 19:42:46 -07:00
2022-11-01 10:04:52 -07:00
2023-04-18 16:39:34 -07:00
2023-06-01 17:15:33 -04:00
2022-07-05 13:32:59 -07:00
2023-02-08 13:36:22 +01:00
2023-07-08 14:08:02 -07:00
2022-09-07 21:53:50 +02:00
2023-05-28 16:20:21 +09:00
2022-07-15 18:21:49 +00:00
2023-04-08 13:45:37 -07:00
2023-03-24 11:01:29 +01:00
2022-12-01 15:53:05 -08:00
2022-11-12 18:47:36 -08:00
2023-08-24 14:30:50 -07:00
2022-11-15 00:42:02 -08:00
2023-06-28 15:51:08 -07:00
2023-06-09 17:44:17 -07:00
2023-06-09 17:44:24 -07:00
2023-06-28 10:59:38 -07:00
2022-09-11 21:55:06 -07:00
2023-02-02 22:50:05 -08:00
2023-03-24 20:10:59 -07:00
2023-06-06 21:39:55 +09:00
2023-06-08 12:27:20 -07:00
2023-03-24 17:09:14 +01:00
2023-06-28 10:59:38 -07:00
2022-09-11 21:55:12 -07:00
2023-06-28 15:51:08 -07:00
2023-04-08 13:45:38 -07:00
2023-04-20 22:55:35 -04:00
2023-03-14 17:06:44 +08:00
2023-06-09 17:44:15 -07:00
2023-07-10 12:47:01 -07:00
2023-07-01 08:26:23 -07:00
2023-06-19 16:19:28 -07:00
2023-07-01 08:26:23 -07:00
2022-09-11 21:55:12 -07:00
2023-04-16 14:23:07 +02:00
2022-10-04 15:59:36 +02:00
2023-05-02 17:23:27 -07:00
2023-02-17 14:58:01 -08:00
2022-12-27 12:52:12 +01:00
2022-11-09 18:06:35 +00:00
2023-04-13 11:49:20 -07:00
2023-06-28 16:05:21 -07:00
2023-06-16 22:08:09 +02:00
2023-05-15 13:45:00 +02:00
2023-05-09 21:50:27 +02:00
2023-04-20 11:36:35 +02:00
2022-10-17 16:41:16 +02:00
2022-05-24 11:11:13 -07:00
2023-07-06 10:06:04 -07:00
2023-06-08 07:16:53 -07:00
2022-09-08 16:56:45 -07:00
2023-06-28 16:05:21 -07:00
2022-09-11 21:55:10 -07:00
2022-08-29 12:47:15 +01:00
2023-01-05 12:10:35 -08:00
2023-02-18 14:34:36 -05:00
2022-05-18 18:24:57 -05:00
2023-06-29 15:19:43 -07:00
2023-02-02 22:50:04 -08:00
2022-11-30 20:16:49 -04:00
2022-05-19 23:25:47 -04:00
2023-04-13 11:49:35 -07:00
2023-06-08 15:43:09 -04:00
2023-06-06 10:47:04 +02:00
2023-06-19 16:25:28 -07:00
2023-06-09 17:44:21 -07:00
2023-06-19 16:25:29 -07:00
2023-05-17 17:02:08 -10:00
2023-06-27 16:32:52 -07:00