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] [day] [month] [year] [list]
Message-ID: <CADyTPExY4TOuy1pboWLiTRpjmKiLZkkGUqcnL1dGdSwviMapZA@mail.gmail.com>
Date:   Wed, 20 Jul 2022 23:56:39 -0400
From:   Nick Bowler <nbowler@...conx.ca>
To:     Guixin Liu <kanie@...ux.alibaba.com>
Cc:     linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] nvme: Define compat_ioctl again to unbreak 32-bit userspace.

On 2022-07-19, Guixin Liu <kanie@...ux.alibaba.com> wrote:
> 在 2022/7/20 09:55, Nick Bowler 写道:
[...]
>> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
>> index a2862a56fadc..30e105dbc178 100644
>> --- a/drivers/nvme/host/core.c
>> +++ b/drivers/nvme/host/core.c
>> @@ -2093,6 +2093,7 @@ static int nvme_report_zones(struct gendisk *disk,
>> sector_t sector,
>>   static const struct block_device_operations nvme_bdev_ops = {
>>   	.owner		= THIS_MODULE,
>>   	.ioctl		= nvme_ioctl,
>> +	.compat_ioctl	= nvme_ioctl,
>>   	.open		= nvme_open,
>>   	.release	= nvme_release,
>>   	.getgeo		= nvme_getgeo,
[...]
> Should this in the brace of "#ifdef CONFIG_COMPAT" and "#endif"?

I think it doesn't make any significant difference either way -- the
.compat_ioctl member is always present in the block_device_operations
structure.  Unconditional assignment thus seems more sensible to me.

v2 uses blkdev_compat_ptr_ioctl which expands to NULL for !CONFIG_COMPAT.

Thanks,
  Nick

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ