[Intel-gfx] [PATCH] [RFC] Taint the kernel for unsafe module options

Daniel Vetter daniel at ffwll.ch
Fri Mar 7 09:05:46 CET 2014


On Fri, Mar 7, 2014 at 4:28 AM, Rusty Russell <rusty at rustcorp.com.au> wrote:
>>> If this is a good idea, you can write a macro module_param_unsafe_named
>>> which is a general wrapper.
>>
>> For this to work I need to somehow store the safe default value somewhere.
>> since with bools or strings there really isn't such a thing, even less
>> than with integers where my fairly abitrary -1 choice is already
>> restricting. But I don't have a good idea how to do that, since creating a
>> local static struct in the macro to store the default + the pointer to the
>> storage location feels a bit ugly.
>
> I was thinking that if use the parameter, they get marked unsafe.  If
> they use it to set it to the default, Don't Do That.

Makes sense. I'll try to come up with something more polished which
addresses your's and Andrew's comments somewhen next week. Presuming
the (here one week later than everywhere else) carnival doesn't
interfere too badly ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list