lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 09 Mar 2013 10:14:14 +0100
From:	Jiri Slaby <jslaby@...e.cz>
To:	Josh Boyer <jwboyer@...hat.com>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: 8250.nr_uarts broken in 3.7

On 03/09/2013 12:44 AM, Josh Boyer wrote:
> On Fri, Mar 08, 2013 at 06:28:09PM -0500, Josh Boyer wrote:
>> On Sat, Mar 09, 2013 at 12:14:23AM +0100, Jiri Slaby wrote:
>>> On 03/09/2013 12:10 AM, Jiri Slaby wrote:
>>>> On 03/08/2013 11:58 PM, Jiri Slaby wrote:
>>>>> On 03/08/2013 11:49 PM, Josh Boyer wrote:
>>>>>> On Fri, Mar 08, 2013 at 11:47:01PM +0100, Jiri Slaby wrote:
>>>>>>> Yeah, I agree this is ugly. Just re-definining MODULE_PARAM_PREFIX at
>>>>>>> the end of the file should do the trick (followed by
>>>>>>> "module_param(nr_uarts, uint, 0644)").
>>>>>>
>>>>>> For some reason, I thought I had tried that.  Maybe I didn't.  I'll look
>>>>>> into it again.
>>>>>
>>>>> I see. Because we would re-define some global variables. What if we put
>>>>> module_param into a function?
>>>>
>>>> Something like this?
>>>> #ifdef MODULE
>>
>> I don't think you want this surrounded in #ifdef MODULE, do you?  That
>> won't let people building the driver into the kernel continue to use
>> 8250.<whatever> on the kernel command line.

Yes, you're right. I sort of thought the prefix is not used for
non-modules. But it is.

>>>> static void __unused splat(void) {
>>>
>>> I meant __used. It should make no difference though.
>>>
>>>> #       undef MODULE_PARAM_PREFIX
>>>> #       define MODULE_PARAM_PREFIX "8250."
>>>>         module_param_cb(nr_uarts, &param_ops_uint, &nr_uarts, 0644);
>>>>         ...
>>>> }
>>>> #endif
>>>>
>>>> Not nice, but should work. The other way is to have those in a separate
>>>> file linked to 8250 (to avoid re-definition errors).
>>
>> Ew.  I'll try the function first.
> 
> OK, the function (without the surrounding ifdef) seems to be working OK.
> I'll do a bit more testing and send out a v2 in a bit.
> 
> Thanks for the tip.  It's still not pretty, but at least I don't feel
> ashamed about it.

I'm thinking about deprecating the 8250_core.* in some way. Better
sooner than later. The view of having both of them with that hack in the
kernel forever drives me bananas.

-- 
js
suse labs
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ