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]
Date: Thu, 30 May 2024 15:45:26 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: "Arnd Bergmann" <arnd@...db.de>
Cc: "Arnd Bergmann" <arnd@...nel.org>, "Richard Weinberger"
 <richard@....at>, "Vignesh Raghavendra" <vigneshr@...com>, "David
 Woodhouse" <David.Woodhouse@...el.com>, "Akinobu Mita"
 <akinobu.mita@...il.com>, "Artem Bityutskiy"
 <artem.bityutskiy@...ux.intel.com>, linux-mtd@...ts.infradead.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: make mtd_test.c a separate module

Hi Arnd,

arnd@...db.de wrote on Wed, 29 May 2024 14:36:46 +0200:

> On Wed, May 29, 2024, at 14:13, Miquel Raynal wrote:
> > Hi Arnd,
> >
> > arnd@...nel.org wrote on Wed, 29 May 2024 11:50:39 +0200:
> >  
> >> From: Arnd Bergmann <arnd@...db.de>
> >> 
> >> This file gets linked into nine different modules, which causes a warning:
> >> 
> >> scripts/Makefile.build:236: drivers/mtd/tests/Makefile: mtd_test.o is added to multiple modules: mtd_nandbiterrs mtd_oobtest mtd_pagetest mtd_readtest mtd_speedtest mtd_stresstest mtd_subpagetest mtd_torturetest  
> >
> > I've never experienced this warning myself, how did you produce it?  
> 
> This warning is currently enabled when building with 'make W=1',

Ok. I didn't pay attention.

> but there are only a handful of drivers that run into it, so
> I have sent patches for each one, with the plan to enable it
> by default in the future.
> 
> >> Make it a separate module instead.  
> >
> > I'm not a total fan of this just because it now requires an additional
> > step to insert these test modules (they are likely used for
> > debugging/development purposes, so not properly installed in the
> > rootfs). Is there any chance we can find another way?  
> 
> This should only be a problem when using plain 'insmod' instead
> of 'modprobe' for loading the modules. Do you think this is
> commonly used here?

These test modules have been slowly deprecated in favor of the user
space tools but when I had to use them, I was often using an initramfs
with the modules just copy/pasted and inserted with insmod. There is no
real point I guess in embedding these modules in a final rootfs.

> Another option would be to turn all the helper functions into
> static inline versions and just include the header, but
> that does not avoid the duplication then.

Indeed. 

Is there any chance to just silence the warning by flagging these
modules as "test" or "development" modules? Because TBH it feels like
the warning is just useless in this case. These modules should not be
enabled in a production environment anyway.

If not, then let's just keep your current patch. As I said, these
modules are kind of deprecated anyway.

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ