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: <20200113092815.qwndd7oi5wglxh3c@orion>
Date:   Mon, 13 Jan 2020 10:28:15 +0100
From:   Carlos Maiolino <cmaiolino@...hat.com>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     Al Viro <viro@...iv.linux.org.uk>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the vfs tree

On Sat, Jan 11, 2020 at 09:44:27AM +1100, Stephen Rothwell wrote:
> Hi Carlos,
> 
> On Fri, 10 Jan 2020 12:03:53 +0100 Carlos Maiolino <cmaiolino@...hat.com> wrote:
> >
> > Eitherway, I am not 100% sure this is the right fix for this case, I remember
> > some bmap() users who didn't need CONFIG_BLOCK, so we may still need to export
> > it without CONFIG_BLOCK.
> > Can you please send me your configuration?
> 
> It was a x86_64 allnoconfig build.

Thanks for the info Stephen.

I think the correct way to fix this though, is to wrap the whole bmap(){}
definition in a #ifdef block, not only the EXPORT symbol, as, by my patches, we
redefine bmap() as an inline symbol if CONFIG_BLOCK is not set. So, something
like this:


diff --git a/fs/inode.c b/fs/inode.c
index 9f894b25af2b..21e58542801b 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1612,6 +1612,8 @@ EXPORT_SYMBOL(iput);
  *	Returns -EINVAL in case of error, 0 otherwise. If mapping falls into a
  *	hole, returns 0 and *block is also set to 0.
  */
+
+#ifdef CONFIG_BLOCK
 int bmap(struct inode *inode, sector_t *block)
 {
 	if (!inode->i_mapping->a_ops->bmap)
@@ -1621,6 +1623,7 @@ int bmap(struct inode *inode, sector_t *block)
 	return 0;
 }
 EXPORT_SYMBOL(bmap);
+#endif
 
 /*
  * With relative atime, only update atime if the previous atime is

So, we preserve the original inline definition in include/fs.h (making bmap()
just returning -EINVAL). What do you think?

Viro, mind to share your opinion? I can send a 'Fixes:' patch.

Cheers



-- 
Carlos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ