[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKMK7uGDGd11SrnB5ErGTSpDka9H3HkZzG+kHp3CfNtoWADMWQ@mail.gmail.com>
Date: Fri, 7 Mar 2014 09:05:46 +0100
From: Daniel Vetter <daniel@...ll.ch>
To: Rusty Russell <rusty@...tcorp.com.au>
Cc: Intel Graphics Development <intel-gfx@...ts.freedesktop.org>,
Jean Delvare <khali@...ux-fr.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Li Zhong <zhong@...ux.vnet.ibm.com>,
Jon Mason <jon.mason@...el.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [RFC] Taint the kernel for unsafe module options
On Fri, Mar 7, 2014 at 4:28 AM, Rusty Russell <rusty@...tcorp.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists