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] [day] [month] [year] [list]
Message-ID: <cd97d2eb-25d9-423b-9037-c4cc3816a760@gmail.com>
Date: Mon, 2 Sep 2024 19:37:56 +0200
From: Philipp Hortmann <philipp.g.hortmann@...il.com>
To: Riyan Dhiman <riyandhiman14@...il.com>, gregkh@...uxfoundation.org
Cc: linux-kernel@...r.kernel.org, linux-staging@...ts.linux.dev
Subject: Re: [PATCH] staging: rtl8192e: Constify struct pci_device_id

On 8/31/24 18:08, Riyan Dhiman wrote:
> static variable struct pci_device_id rtl8192_pci_id_tbl is not modified
> in file rtl_core.c.
> 
> Constifying this structure moves some data to a read-only section, so
> increase overall security.
> 
> Before
> ======
>     text	   data	    bss	    dec	    hex	filename
>    17838	    893	      1	  18732	   492c	drivers/staging/rtl8192e/rtl8192e/rtl_core.o
> 
> After
> =====
>    text	   data	    bss	    dec	    hex	filename
>    18006	    725	      1	  18732	   492c	drivers/staging/rtl8192e/rtl8192e/rtl_core.o
> 
> Signed-off-by: Riyan Dhiman <riyandhiman14@...il.com>
> ---
> Compile tested only
> --
>   drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> index ad21263e725f..22a203d01b8a 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> @@ -25,7 +25,7 @@
>   int hwwep = 1;
>   static char *ifname = "wlan%d";
>   
> -static struct pci_device_id rtl8192_pci_id_tbl[] = {
> +static const struct pci_device_id rtl8192_pci_id_tbl[] = {
>   	{PCI_DEVICE(0x10ec, 0x8192)},
>   	{PCI_DEVICE(0x07aa, 0x0044)},
>   	{PCI_DEVICE(0x07aa, 0x0047)},


Tested-by: Philipp Hortmann <philipp.g.hortmann@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ