From: Jingbo Xu <jefflexu@linux.alibaba.com>
To: Christoph Hellwig <hch@lst.de>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, tianjia.zhang@linux.alibaba.com,
xiang@kernel.org, casey@schaufler-ca.com
Subject: Re: [PATCH v2] block: fine-granular CAP_SYS_ADMIN for Persistent Reservation ioctl
Date: Tue, 13 Jun 2023 14:02:18 +0800 [thread overview]
Message-ID: <b89351eb-e450-61b9-53b6-02fe68319174@linux.alibaba.com> (raw)
In-Reply-To: <20230613050259.GA13751@lst.de>
On 6/13/23 1:02 PM, Christoph Hellwig wrote:
>> +static bool blkdev_pr_allowed(struct block_device *bdev, fmode_t mode)
>
> With my resent series the use of fmode_t in the block layer has been
> replaced with a new blk_mode_t, so you'll need to rebase.
Okay I will rebase on that in the next version.
>
>> +{
>> + if (capable(CAP_SYS_ADMIN))
>> + return true;
>> +
>> + /* no sense to make reservations for partitions */
>> + if (bdev_is_partition(bdev))
>> + return false;
>
> I think we should disallow the PR ioctls for partitions entirely.
> Yes, that's a change of behavior (and should be a separate patch),
> but this is the right time to fix it.
Okay I will make it into a separate patch later.
> Otherwise this change log good, thanks a lot!
Thanks for the comment and suggestions!
--
Thanks,
Jingbo
prev parent reply other threads:[~2023-06-13 6:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 7:41 Jingbo Xu
2023-06-13 5:02 ` Christoph Hellwig
2023-06-13 6:02 ` Jingbo Xu [this message]
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=b89351eb-e450-61b9-53b6-02fe68319174@linux.alibaba.com \
--to=jefflexu@linux.alibaba.com \
--cc=axboe@kernel.dk \
--cc=casey@schaufler-ca.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tianjia.zhang@linux.alibaba.com \
--cc=xiang@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®