On Mon, 16 Mar 2015 15:19:39 +0100
Peter Zijlstra <pet...@infradead.org> wrote:

> 
> I suppose this is an unprivileged syscall; so what do we do about:
> 
>       for (;;)
>               sys_membar(EXPEDITED);
> 
> Which would spray the entire system with IPIs at break neck speed.

Perhaps it should be rate limited. Have parameters (controlled via
sysctl) that will only allow so many of these per ms. If it exceeds it,
then the call will end up being a schedule_timeout() till it is allowed
to continue. Thus, the above will spit out a few hundred IPIs, then
sleep for a millisecond, and then spit out another hundred IPIs and
sleep again.

That would prevent any DoS attacks.

-- Steve
--
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/

Reply via email to