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:	Tue, 15 Apr 2008 09:40:15 +0200
From:	"Francis Moreau" <francis.moro@...il.com>
To:	"Seewer Philippe" <philippe.seewer@....ch>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Disk geometry from /sys

Hi Seewer,

On Mon, Apr 14, 2008 at 2:57 PM, Seewer Philippe <philippe.seewer@....ch> wrote:
>
>  As you've problably seen from the other answers, disk geometry is (except
> for a few older devices) unneeded inside the Linux kernel.

Yes but I'm doing userspace stuff and that's the reason I was asking for the
sysfs thing.

> I'd say thats the
> reason why there's no sysfs export and I'd further guess disk geometry is an
> artifact most would like to get rid of (or pushed into userspace).
>

Well, I looked at sfdisk(8) and parted(8) source code and they all need the
geometry description. If I understood correctly the reason why is that it
'prefers' to align partition sizes/starts on a cylinder boundary because some
bootloaders probably use CHS addressing, but I'm really not sure.

>  Anyway, if you really need it, try the patch below. Should apply cleanly to
> version 2.6.23.1 and gives you a geometry/ directory for each block device
> providing the getgeo function. It adds a setgeo counterpart for some
> subsystems as well, allowing 'echo something > ...' so please be careful.
>

Thanks but I probably won't use it. Using sfdisk, for example, is a
more portable
way to get the geometry from a script.

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