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: <CAMHSBOUWsKq8ePziyaf=-8v_Zc8A9myMDxswSr4yC7DtKYUb1A@mail.gmail.com>
Date:	Tue, 3 Mar 2015 23:26:20 -0800
From:	Gwendal Grignou <gwendal@...gle.com>
To:	Al Viro <viro@...iv.linux.org.uk>
Cc:	Daniel Ehrenberg <dehrenberg@...gle.com>,
	linux-fsdevel@...r.kernel.org,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Gwendal Grignou <gwendal@...omium.org>,
	Ezequiel Garcia <ezequiel@...guardiasur.com.ar>
Subject: Re: [RFC PATCH] vfs: Use 12:20 bit major:minor in stat everywhere

On Tue, Mar 3, 2015 at 5:47 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
> On Tue, Mar 03, 2015 at 05:37:31PM -0800, Gwendal Grignou wrote:
>> At least, to base the device format on whether we are running on a 32
>> bit or 64 bit architecture does not make sense.
>
> Yes, it does.  Note that on 32bit ones stat64(2) *will* return an arbitrary
> value.  On 64bit ones stat(2) will.
I see, we - just - have to replace stat() calls with stat64(). It will
work because on 64bit architecture, both stat and stat64 map to
sys_newstat  and on 32 bits, stat64 maps to sys_stat64 which does the
right thing.
It is a little like we are now using BLKGETSIZE64 instead of
BLKGETSIZE because disks can be larger than 2TB.
>
>> If a tool calling stat(2) can not handle 12 bit major/20 bits minor,
>> it would already break or about to break when running on a 64 bit
>> machine.
>>
>> Regarding SCSI, the 17th disk will use SCSI_DISK1_MAJOR (65). Only the
>> 257th disk will use the first scsi major (8) again and need a  minor
>> greater than 256. (see sd_major() in drivers/scsi/sd.c for details).
>
> *nod*
>
> It's been years since I last looked at sd.c, TBH...
>
> Said that, with NFS it's definitely a minor per superblock, and it's not the
> only set_anon_super() user.  Having a bunch of filesystems mounted over NFS
> will suffice...
or a bunch of ISCSI targets.
Thanks for your insight,

Gwendal.
--
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