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]
Message-ID: <fff872d022550536f05c181ad58577889af0b5ef.camel@iokpp.de>
Date: Wed, 03 Dec 2025 17:23:22 +0100
From: Bean Huo <beanhuo@...pp.de>
To: Arnd Bergmann <arnd@...db.de>, kernel test robot <lkp@...el.com>, 
 avri.altman@...disk.com, Bart Van Assche <bvanassche@....org>, Alim Akhtar
 <alim.akhtar@...sung.com>, "James E.J. Bottomley" <jejb@...ux.ibm.com>, 
 "Martin K. Petersen" <martin.petersen@...cle.com>,
 can.guo@....qualcomm.com, Bean Huo <beanhuo@...ron.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev, 
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: ufs: core: Fix link error when CONFIG_RPMB=m

On Wed, 2025-12-03 at 15:39 +0100, Arnd Bergmann wrote:
> On Wed, Dec 3, 2025, at 07:15, kernel test robot wrote:
> > 
> > All errors (new ones prefixed by >>):
> > 
> > > > drivers/ufs/core/ufs-rpmb.c:135:5: error: redefinition of
> > > > 'ufs_rpmb_probe'
> >       135 | int ufs_rpmb_probe(struct ufs_hba *hba)
> >           |     ^
> >     drivers/ufs/core/ufshcd-priv.h:445:19: note: previous definition is here
> >       445 | static inline int ufs_rpmb_probe(struct ufs_hba *hba)
> >           |                   ^
> > > > drivers/ufs/core/ufs-rpmb.c:234:6: error: redefinition of
> > > > 'ufs_rpmb_remove'
> 
> The declaration and definitio are inconsistent: the former is inside of
> an #ifdef block, the latter is not. I think either way works, but it
> needs to be the same for both.
> 
>      Arnd


Hi Arnd,

I was reviewing the kernel test robot output regarding the ufs_rpmb_probe and
ufs_rpmb_remove redefinition errors, and I wanted to clarify my understanding

>From what I see in the source:

   
   #if IS_ENABLED(CONFIG_RPMB)
   int ufs_rpmb_probe(struct ufs_hba *hba);
   void ufs_rpmb_remove(struct ufs_hba *hba);
   #else
   static inline int ufs_rpmb_probe(struct ufs_hba *hba) { return 0; }
   static inline void ufs_rpmb_remove(struct ufs_hba *hba) { }
   #endif

my understanding is that if CONFIG_RPMB=n, compilation goes into the #else
branch, which emits static inline stubs, so ufs-rpmb.c should not be compiled at
all because of ufshcd-core-$(CONFIG_RPMB) += ufs-rpmb.o in the Makefile.

However, the robot reported redefinition errors, which suggests that the
header’s #else branch is being included while ufs-rpmb.c is also being compiled.

I’m wondering if I’m missing something about the robot’s build logic.


Thanks,
Bean



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ