Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline

Linus Torvalds
2014-04-02T23:31:41Z

On Wed, Apr 2, 2014 at 4:23 PM, Jiri Kosina <jkosina@suse.cz> wrote:
>
> I think that it's in principle a good idea, however ... the in-kernel
> ratelimiting always happens per sourcecode location, but this will be
> rather hard to achieve with interface such as /dev/kmsg.
>
> If /dev/kmsg is going to be ratelimited as a whole, it might potentially
> create a severely unfair situation between individual userspace programs
> trying to do logging (although there is apparently only one userspace
> service doing any logging through this interface whatsoever, right?).

So I think we could/should make the rate limiting of kmsg be tied to
perhaps 'struct cred' and then just use current_cred()->rs. Or perhaps
even make it per-task.

It wouldn't be hard to just embed one "struct ratelimit_state" into
the appropriate struct. They're not *that* huge.

Linus