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>] [day] [month] [year] [list]
Message-ID: <20230120100702.3d50dbb8@canb.auug.org.au>
Date:   Fri, 20 Jan 2023 10:07:02 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Jens Axboe <axboe@...nel.dk>,
        Christian Brauner <christian@...uner.io>,
        Seth Forshee <sforshee@...nel.org>
Cc:     Christian Brauner <brauner@...nel.org>,
        Ming Lei <ming.lei@...hat.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: linux-next: build failure after merge of the block tree

Hi all,

After merging the block tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/block/ublk_drv.c: In function 'ublk_char_dev_permission':
drivers/block/ublk_drv.c:2032:32: error: passing argument 1 of 'inode_permission' from incompatible pointer type [-Werror=incompatible-pointer-types]
 2032 |         err = inode_permission(&init_user_ns,
      |                                ^~~~~~~~~~~~~
      |                                |
      |                                struct user_namespace *
In file included from drivers/block/ublk_drv.c:15:
include/linux/fs.h:2474:22: note: expected 'struct mnt_idmap *' but argument is of type 'struct user_namespace *'
 2474 | int inode_permission(struct mnt_idmap *, struct inode *, int);
      |                      ^~~~~~~~~~~~~~~~~~

Caused by commit

  56f5160bc1b8 ("ublk_drv: add mechanism for supporting unprivileged ublk device")

interacting with commit

  4609e1f18e19 ("fs: port ->permission() to pass mnt_idmap")

from the vfs-idmapping tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <sfr@...b.auug.org.au>
Date: Fri, 20 Jan 2023 09:58:46 +1100
Subject: [PATCH] fixup for "ublk_drv: add mechanism for supporting unprivileged ublk device"

interacting with "fs: port ->permission() to pass mnt_idmap"

Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
---
 drivers/block/ublk_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index 9f32553cb938..d47d87be098f 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -2029,7 +2029,7 @@ static int ublk_char_dev_permission(struct ublk_device *ub,
 	if (stat.rdev != ub->cdev_dev.devt || !S_ISCHR(stat.mode))
 		goto exit;
 
-	err = inode_permission(&init_user_ns,
+	err = inode_permission(&nop_mnt_idmap,
 			d_backing_inode(path.dentry), mask);
 exit:
 	path_put(&path);
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ