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:   Thu, 24 Jan 2019 16:54:28 +0000
From:   Colin Ian King <colin.king@...onical.com>
To:     Jiri Kosina <jikos@...nel.org>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        linux-input@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: elan: Make array buf static, shrinks object size

ping?

On 26/09/2018 09:41, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> Don't populate the array buf on the stack but instead make it
> static. Makes the object code smaller by 43 bytes:
> 
> Before:
>    text	   data	    bss	    dec	    hex	filename
>    7769	   1520	      0	   9289	   2449	drivers/hid/hid-elan.o
> 
> After:
>    text	   data	    bss	    dec	    hex	filename
>    7662	   1584	      0	   9246	   241e	drivers/hid/hid-elan.o
> 
> (gcc version 8.2.0 x86_64)
> 
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/hid/hid-elan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/hid-elan.c b/drivers/hid/hid-elan.c
> index 07e26c3567eb..05377eec2cb2 100644
> --- a/drivers/hid/hid-elan.c
> +++ b/drivers/hid/hid-elan.c
> @@ -393,7 +393,7 @@ static int elan_start_multitouch(struct hid_device *hdev)
>  	 * This byte sequence will enable multitouch mode and disable
>  	 * mouse emulation
>  	 */
> -	const unsigned char buf[] = { 0x0D, 0x00, 0x03, 0x21, 0x00 };
> +	static const unsigned char buf[] = { 0x0D, 0x00, 0x03, 0x21, 0x00 };
>  	unsigned char *dmabuf = kmemdup(buf, sizeof(buf), GFP_KERNEL);
>  
>  	if (!dmabuf)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ