Linus Torvalds writes: (Summary)
kmalloc using this pattern..
But yes, I may be naive on the sizes.
But yes, I may be naive on the sizes.
That would definitely solve at least one worry.
That would definitely solve at least one worry.
We do potentially have users which use kmalloc optimistically and do not want to fall back to vmalloc (they'll fall back to smaller allocations entirely), but I guess if fwe make sure to not convert any __GFP_NOWARN/NORETRY users, that should all be ok.
__GFP_NOWARN/NORETRY users, that should all be ok.
But honestly, I'd rather see just kmalloc users stay as kmalloc users.
[...]
I find your faith in the size of structs in the kernel touching ;-) I *really* hope some of those examples of yours aren't allocated with kmalloc using this pattern..kmalloc using this pattern..
But yes, I may be naive on the sizes.
But yes, I may be naive on the sizes.
[...]
that limit check.That would definitely solve at least one worry.
That would definitely solve at least one worry.
We do potentially have users which use kmalloc optimistically and do not want to fall back to vmalloc (they'll fall back to smaller allocations entirely), but I guess if fwe make sure to not convert any __GFP_NOWARN/NORETRY users, that should all be ok.
__GFP_NOWARN/NORETRY users, that should all be ok.
But honestly, I'd rather see just kmalloc users stay as kmalloc users.