1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 01:20:14 +00:00
Uday Shankar 80bdfbb354 ublk: enforce ublks_max only for unprivileged devices
Commit 403ebc877832 ("ublk_drv: add module parameter of ublks_max for
limiting max allowed ublk dev"), claimed ublks_max was added to prevent
a DoS situation with an untrusted user creating too many ublk devices.
If that's the case, ublks_max should only restrict the number of
unprivileged ublk devices in the system. Enforce the limit only for
unprivileged ublk devices, and rename variables accordingly. Leave the
external-facing parameter name unchanged, since changing it may break
systems which use it (but still update its documentation to reflect its
new meaning).

As a result of this change, in a system where there are only normal
(non-unprivileged) devices, the maximum number of such devices is
increased to 1 << MINORBITS, or 1048576. That ought to be enough for
anyone, right?

Signed-off-by: Uday Shankar <ushankar@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250228-ublks_max-v1-1-04b7379190c0@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-03-04 08:51:37 -07:00
..
2025-01-31 11:07:56 -08:00
2025-01-24 08:03:52 -08:00
2025-02-06 20:39:43 +01:00
2025-01-28 12:25:12 -08:00
2025-01-29 11:23:22 -08:00
2025-01-29 14:29:57 -08:00
2025-01-28 12:25:12 -08:00
2025-02-07 11:05:50 -08:00
2025-01-25 16:03:40 -08:00
2025-01-28 12:25:12 -08:00
2025-01-28 09:01:36 -08:00
2025-01-24 15:48:01 -08:00
2025-01-24 07:18:39 -08:00
2025-01-25 09:22:55 -08:00
2025-01-28 12:25:12 -08:00
2025-02-01 09:15:01 -08:00
2025-01-15 19:07:39 +01:00
2025-01-31 11:49:30 -08:00
2025-01-18 17:10:05 -08:00
2025-01-18 14:38:49 -06:00
2025-02-03 09:19:03 -07:00
2025-01-28 12:25:12 -08:00
2025-01-28 12:25:12 -08:00
2025-01-29 14:32:38 -08:00
2025-02-07 12:43:58 +01:00
2025-01-28 12:25:12 -08:00
2025-01-29 11:56:55 -08:00
2025-01-24 14:56:59 -08:00
2025-01-30 17:50:02 -08:00
2025-01-28 12:25:12 -08:00
2025-01-29 14:38:19 -08:00
2025-01-24 16:12:12 -08:00
2025-01-28 12:25:12 -08:00
2025-01-20 13:10:15 +01:00
2025-01-28 12:25:12 -08:00
2025-01-27 15:26:06 -08:00
2025-01-28 14:16:46 -08:00
2025-01-27 15:26:06 -08:00
2025-01-25 16:19:10 -08:00
2025-01-29 11:39:20 -08:00