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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 23 Oct 2021 10:50:06 +0200 From: Greg KH <gregkh@...uxfoundation.org> To: Philipp Hortmann <philipp.g.hortmann@...il.com> Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org, corbet@....net, linux-doc@...r.kernel.org Subject: Re: [PATCH] usb: usb-skeleton: Add hint to find __init and __exit On Sat, Oct 23, 2021 at 09:11:37AM +0200, Philipp Hortmann wrote: > On 10/23/21 8:47 AM, Greg KH wrote: > > On Sat, Oct 23, 2021 at 07:25:38AM +0200, Philipp Hortmann wrote: > > > Comment to find __init and __exit. > > > > > > Signed-off-by: Philipp Hortmann <philipp.g.hortmann@...il.com> > > > --- > > > drivers/usb/usb-skeleton.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c > > > index 2dc58766273a..80338a50dcde 100644 > > > --- a/drivers/usb/usb-skeleton.c > > > +++ b/drivers/usb/usb-skeleton.c > > > @@ -641,6 +641,7 @@ static struct usb_driver skel_driver = { > > > .supports_autosuspend = 1, > > > }; > > > +/* __init and __exit */ > > > module_usb_driver(skel_driver); > > > > This comment makes no sense, sorry. __init and __exit are things that > > the linker uses, why would you need to "find" them? > > > > thanks, > > > > greg k-h > > > > When I want to add something to the __init function (debug comment for > example), how to do this without knowing that it is in module_usb_driver? The whole point of the module_usb_driver() macro is to keep a developer from having to write that init_module() and exit_module() functions entirely. I think you are getting confused with the __init and __exit linker hints with the module init/exit functions. They are totally different things. thanks, greg k-h
Powered by blists - more mailing lists