Re: stable-rc test results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Thu, 29 Nov 2012 13:36:36 -0800,
Greg KH wrote:
> 
> On Thu, Nov 22, 2012 at 11:09:56PM +0900, satoru takeuchi wrote:
> > Hi Greg and all,
> > 
> > I succeeded to build, boot, and run kernel build with the following
> > three stable-rc kernels
> > provided at today.
> > 
> >  - 3.6.8-rc1
> >  - 3.4.20-rc1
> >  - 3.0.53-rc1
> > 
> > There is the following message many times in the dmesg with 3.0.53-rc1.
> > 
> > ====================================================
> > grub-probe: sending ioctl 1261 to a partition!
> > ====================================================
> > 
> > This message can be suppressed by commit 6d9359280. I found 3.0.53-rc1
> > and 3.4.20-rc1 does not contain this commit and this commit is suitable for
> > stable kernels since displaying such message pollutes dmesg, hides many
> > other important kernel message, and incurs user's complain as Jan Kara,
> > the author of this patch, says.
> 
> This patch doesn't apply to 3.0, if you think it's needed there, please
> provide a backported version.

OK, here it is. The following patch can be applied to 3.0.54-rc1.
I confirmed that the kernel with this patch can boot and passed the
upstream kernel build test without any problem. Of course there is no
warnings about ioctl() to partitions.

>From 624e38e47d70456bea252bb2d84bb0185ca38bdd Mon Sep 17 00:00:00 2001
From: Satoru Takeuchi <satoru.takeuchi@xxxxxxxxx>
Date: Sun, 2 Dec 2012 21:20:13 +0900
Subject: [PATCH] scsi: Silence unnecessary warnings about ioctl to partition

commit 6d9359280753d2955f86d6411047516a9431eb51 upstream.

[ I modified the upstream patch since the return value of
  scsi_verify_blk_ioctl() is different between 3.0-stable and upstream
  if capable(CAP_SYS_RAWIO) is false.

    - 3.0-stable: -ENOTTY
    - upstream:   -ENOIOCTLCMD

  It comes from that commit 8bd8442 modified this value with respect to
  commit 07d106d.

  The following description is from the upstream patch. ]

Sometimes, warnings about ioctls to partition happen often enough that they
form majority of the warnings in the kernel log and users complain. In some
cases warnings are about ioctls such as SG_IO so it's not good to get rid of
the warnings completely as they can ease debugging of userspace problems
when ioctl is refused.

Since I have seen warnings from lots of commands, including some proprietary
userspace applications, I don't think disallowing the ioctls for processes
with CAP_SYS_RAWIO will happen in the near future if ever. So lets just
stop warning for processes with CAP_SYS_RAWIO for which ioctl is allowed.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@xxxxxxxxx>
CC: Paolo Bonzini <pbonzini@xxxxxxxxxx>
CC: James Bottomley <JBottomley@xxxxxxxxxxxxx>
CC: linux-scsi@xxxxxxxxxxxxxxx
CC: Paolo Bonzini <pbonzini@xxxxxxxxxx>
CC: Jan Kara <jack@xxxxxxx>
CC: Jens Axboe <axboe@xxxxxxxxx>
CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 block/scsi_ioctl.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index 5ef1f4c..055952e 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -722,11 +722,14 @@ int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd)
 		break;
 	}
 
+	if (capable(CAP_SYS_RAWIO))
+		return 0;
+
 	/* In particular, rule out all resets and host-specific ioctls.  */
 	printk_ratelimited(KERN_WARNING
 			   "%s: sending ioctl %x to a partition!\n", current->comm, cmd);
 
-	return capable(CAP_SYS_RAWIO) ? 0 : -ENOTTY;
+	return -ENOTTY;
 }
 EXPORT_SYMBOL(scsi_verify_blk_ioctl);
 
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux