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]
Date:	Fri, 18 Sep 2015 11:24:05 +0100
From:	Jon Hunter <jonathanh@...dia.com>
To:	Ulf Hansson <ulf.hansson@...aro.org>
CC:	linux-mmc <linux-mmc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Seshagiri Holi <sholi@...dia.com>,
	Arnd Bergmann <arnd@...db.de>,
	Grant Grundler <grundler@...gle.com>,
	Olof Johansson <olofj@...omium.org>
Subject: Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands


On 17/09/15 07:59, Ulf Hansson wrote:
> [...]
> 
>>>> +       /*
>>>> +        * The caller must have CAP_SYS_RAWIO, and must be calling this on the
>>>> +        * whole block device, not on a partition.  This prevents overspray
>>>> +        * between sibling partitions.
>>>> +        */
>>>> +       if ((!capable(CAP_SYS_RAWIO)) || (bdev != bdev->bd_contains))
>>>> +               return -EPERM;
>>>
>>> This check is common for multi and non-multi. Please move it to the
>>> mmc_blk_ioctl() to avoid some code duplication.
>>
>> Yes that's true. I can move but it means also passing bdev to
>> __mmc_blk_ioctl_cmd() as another argument. It is not a big deal, but it
>> was more convenient to test here. If your preference is to consolidate
>> the tests to one place then I will move this test.
> 
> I was suggesting to move it to mmc_blk_ioctl() and not to
> __mmc_blk_ioctl_cmd(). That shouldn't cause any changes to any
> function-definitions, right!?

Sorry, completely mis-read. Yes that makes sense, will update.

Cheers
Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ