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:	Wed, 10 Mar 2010 16:18:42 -0600
From:	Jason Wessel <jason.wessel@...driver.com>
To:	Alan Stern <stern@...land.harvard.edu>
CC:	gregkh@...e.de, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, Alan Cox <alan@...ux.intel.com>,
	Oliver Neukum <oliver@...kum.org>
Subject: Re: [PATCH 4/6] usb-serial: optimize sysrq function calls

Alan Stern wrote:
> On Tue, 9 Mar 2010, Jason Wessel wrote:
>
>   
>> There is no need to have external function calls for the sysrq
>> functions.  The compiler can inline the sysrq calls such that they are
>> entirely a NOP if CONFIG_MAGIC_SYSRQ is not set.
>>     
>
> This is not the best way to do what you want.  Keep 
> usb_serial_handle_sysrq_char() and usb_serial_handle_break() as 
> out-of-line routines in generic.c, but make them conditional on 
> CONFIG_MAGIC_SYSRQ.  Then in the header file, depending on whether or 
> not CONFIG_MAGIC_SYSRQ is defined, either put the usual extern function 
> declarations or else put do-nothing inline definitions.
>
> The advantage of keeping the functions out-of-line is the reduced
> amount of code space (since the bodies aren't replicated every place
> they get used).  This way you keep that advantage while still getting
> the NOP implementation if CONFIG_MAGIC_SYSRQ isn't set.
>   

It is probably fine to just drop this patch entirely then.

I had originally made the change to keep it similar to the uart based
serial drivers where the definitions are inlined.

Jason.
--
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