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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 18 Mar 2014 13:17:25 +0100
From:	"Ulrich Windl" <Ulrich.Windl@...uni-regensburg.de>
To:	<linux-kernel@...r.kernel.org>
Subject: Q on ioctl BLKGETSIZE

Hi!

I'm wondering (on a x86_64 SLES11 system):

"man 4 sd" says:
---
       BLKGETSIZE
              Returns the device size  in  sectors.   The  ioctl(2)  parameter
              should be a pointer to a long.
---

/usr/src/linux/block/ioctl.c (3.0.101-0.15) reads:
---
        case BLKGETSIZE:
                size = i_size_read(bdev->bd_inode);
                if ((size >> 9) > ~0UL)
                        return -EFBIG;
                return put_ulong(arg, size >> 9);
---

Three questions:
1) Shouldn't the manual page says that the sector size of always 512 Bytes, even on new disks with larger sectors?
2) Should the real sector size be used for new disks?
3) When using 512-bytes sector size, isn't the capacity limited to 2TB (2^31 kB)?

I'm not subscribed to LKML, so please keep me CC'd when answering.

Regards,
Ulrich


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