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: <20250630171938.1d2a0e44@kernel.org>
Date: Mon, 30 Jun 2025 17:19:38 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Uwe Kleine-König <u.kleine-koenig@...libre.com>
Cc: Igor Russkikh <irusskikh@...vell.com>, Andrew Lunn
 <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
 Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Alexander
 Loktionov <Alexander.Loktionov@...antia.com>, David VomLehn
 <vomlehn@...as.net>, Dmitry Bezrukov <Dmitry.Bezrukov@...antia.com>, Pavel
 Belous <Pavel.Belous@...antia.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] net: atlantic: Rename PCI driver struct to end in
 _driver

On Sun, 29 Jun 2025 12:09:34 +0200 Uwe Kleine-König wrote:
> If you do 
> 
> diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
> index ed5231dece3f..2ee5900337bb 100644
> --- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
> +++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
> @@ -208,7 +208,7 @@ static void aq_pci_free_irq_vectors(struct aq_nic_s *self)
>  	pci_free_irq_vectors(self->pdev);
>  }
>  
> -static int aq_pci_probe(struct pci_dev *pdev,
> +static int __init aq_pci_probe(struct pci_dev *pdev,
>  			const struct pci_device_id *pci_id)
>  {
>  	struct net_device *ndev;
> 
> this is buggy; so it's justified that you get:
> 
> 	WARNING: modpost: vmlinux: section mismatch in reference: aq_pci_driver+0x8 (section: .data) -> aq_pci_probe (section: .init.text)
> 	ERROR: modpost: Section mismatches detected.
> 
> . However if the driver struct is named "aq_pci_ops", the warning is
> suppressed due to
> 
>         /* symbols in data sections that may refer to any init/exit sections */
>         if (match(fromsec, PATTERNS(DATA_SECTIONS)) &&
>             match(tosec, PATTERNS(ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS)) &&
>             match(fromsym, PATTERNS("*_ops", "*_probe", "*_console")))
>                 return 0;
> 
> in scripts/mod/modpost.c.

Now it makes perfect sense :) I see you already reposted with a better
message. IIF you have more such patches I'd use the word "suppressed" -
something along the lines "the section mismatch warnings are suppressed
if the function is assigned to a struct with a name ending in _ops".

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ