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:	Wed, 23 Apr 2008 09:02:33 +0200
From:	"Francis Moreau" <francis.moro@...il.com>
To:	"Mark Lord" <lkml@....ca>
Cc:	"Seewer Philippe" <philippe.seewer@....ch>,
	linux-kernel@...r.kernel.org
Subject: Re: Disk geometry from /sys

On Wed, Apr 23, 2008 at 12:44 AM, Mark Lord <lkml@....ca> wrote:
> > On Fri, Apr 18, 2008 at 3:22 PM, Mark Lord <lkml@....ca> wrote:
> >
> > >  That can sound a bit misleading.  The complete story, for ATA/SATA
> drives,
> > >  is that the disk has two geometries:  an internal physical one, with a
> > > fixed number of heads and cylinders, but variable sectors/track
> > >  (which normally varies by cylinder zone).
> > >
> > >  Software *never* sees or knows about that geometry, so ignore it.
> > >
> > >  The second geometry, is the one that the drive reports to software
> > >  as its "native" geometry.  This is what you see from "hdparm -I"
> > >  and friends, and this geometry is what has to be used by software
> > >  when using cylinder/head/sector (CHS) addressing for I/O operations.
> > >  The hardware interface has a limit of 4-bits for the head value,
> > >  so the maximum number of heads can never be more than 16.
> > >
> > >  Nobody uses CHS addressing for I/O operations, at least not on
> > >  any hardware newer than at least ten years old, so this geometry
> > >  is also unimportant for most uses.
> > >
> > >
> >
> > Is it because IDE drives support several IO operation modes ?
> >
>  ..
>
>  The earliest IDE drives for Compaq used only CHS sector addressing mode.
>
>  Within four years, though, all new drives had support for the more sensible
> linear block addressing (LBA) mode, as well.
>

My last question I promise ;)

If I'd like to take a look in the kernel code to see where the kernel
translates an offset
provided by sys_read into a LBA or CHS address, where should I go ?
drivers/block ?

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