Re: [RFC 09/10] kmod: add helpers for getting kmod count and limit

From: Petr Mladek
Date: Thu Dec 15 2016 - 11:57:00 EST


On Thu 2016-12-08 11:49:20, Luis R. Rodriguez wrote:
> This adds helpers for getting access to the kmod count and limit from
> userspace. While at it, this also lets userspace fine tune the kmod
> limit after boot, it uses the shiny new proc_douintvec_minmax().
>
> These knobs should help userspace more gracefully and deterministically
> handle module loading.
>
> Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
> ---
> include/linux/kmod.h | 8 +++++
> kernel/kmod.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++--
> kernel/sysctl.c | 14 +++++++++
> 3 files changed, 103 insertions(+), 2 deletions(-)

I am not sure if it is worth it. As you say in the 3rd patch,
there was rather low limit for 16 years and nobody probably had
problems with it.

Anyway, it seems that such know should also get documented in
Documentation/sysctl/kernel.txt

Best Regards,
Petr