From: Paolo Bonzini <pbonzini@redhat.com>
To: Matthew Wilcox <willy@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, Doug Nelson <doug.nelson@intel.com>
Subject: Re: scsi_id: sending ioctl 2285 to a partition
Date: Fri, 10 Feb 2012 09:17:22 +0100 [thread overview]
Message-ID: <4F34D292.4080404@redhat.com> (raw)
In-Reply-To: <20120209210039.GB14342@linux.intel.com>
On 02/09/2012 10:00 PM, Matthew Wilcox wrote:
> On Thu, Feb 09, 2012 at 12:42:00PM -0800, Linus Torvalds wrote:
>> On Thu, Feb 9, 2012 at 12:29 PM, Matthew Wilcox<willy@linux.intel.com> wrote:
>>>
>>> Commit 0bfc96cb77 adds this printk that triggers tens of thousands of
>>> times during a run of "a well-known database benchmark". 0x2285 is SG_IO.
>>> I'm not sure why scsi_id feels that it needs to repeatedly send a SCSI
>>> INQUIRY to a partition, but there we are.
>>
>> So is it doing this as root (in which case we end up allowing it) or
>> as a normal user (in which case we end up disallowing it)?
>
> I'm pretty sure it's doing it as root ... it'll be run by udev, after all.
What does the rule look like? Here it is like this:
# scsi devices
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*",
IMPORT{program}="scsi_id --export --whitelisted -d $tempnode",
ENV{ID_BUS}="scsi"
which should exclude partitions, and indeed I don't see any such
message. I also have this rule:
# for partitions import parent information
ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*"
which makes it clear that udev does not need to send INQUIRY to the
partition.
>> And does it all work well apart from the printk? Because the printk
>> itself is scheduled to be removed, it's only there to hear about users
>> that may be doing crazy things that got disallowed by the patches in
>> question?
>
> If it is being run as root, then the printk is pointless, right?
At the time the printk is removed, access also will be disallowed to root.
Paolo
next prev parent reply other threads:[~2012-02-10 8:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 20:29 scsi_id: sending ioctl 2285 to a partition Matthew Wilcox
2012-02-09 20:42 ` Linus Torvalds
2012-02-09 21:00 ` Matthew Wilcox
2012-02-09 21:11 ` Linus Torvalds
2012-02-10 8:17 ` Paolo Bonzini [this message]
2012-02-10 16:10 ` Linus Torvalds
2012-02-10 16:25 ` Paolo Bonzini
2012-02-10 17:23 ` Nelson, Doug
2012-02-10 19:40 ` Paolo Bonzini
2012-02-10 19:41 ` Paolo Bonzini
2012-02-10 19:47 ` Nelson, Doug
2012-02-10 20:57 ` Paolo Bonzini
2012-02-10 23:47 ` Nelson, Doug
2012-02-11 8:39 ` Paolo Bonzini
2012-02-11 11:07 ` Kay Sievers
-- strict thread matches above, loose matches on Subject: below --
2012-02-10 20:43 Alan Stern
2012-02-10 20:52 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F34D292.4080404@redhat.com \
--to=pbonzini@redhat.com \
--cc=doug.nelson@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=willy@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.