On Wed, Apr 2, 2014 at 4:23 PM, Jiri Kosina <jkos...@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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/