[lkml]   [2001]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Enhancement of /proc/partitions output (2.5.1-pre5)
On Sat, 1 Dec 2001 wrote:

> The present /proc/partitions has minimal content.
> Its only function is to report to user space which block devices
> are known to the kernel. User space is unable to figure that out
> on its own without an unreasonable amount of probing.
> But once you know what devices exist, it is very easy for user space
> to report all desired properties of these devices.
> Do you want starting sector and size of /dev/hde4?
> # hdparm -g /dev/hde4
> /dev/hde4:
> geometry = 70780/16/63, sectors = 1670760, start = 69673905

Really? Do you run hdparm setuid root or allow read access of hde? In any
case, allowing easy access from user space via hdparm trickes me as a
major security issue. The geometry is in /proc/ide/hd?/geometry, but the
other info is not readily available to other than root user in most
systems. I think his intention was to make it more generally available. I
don't see any reason to require root to see this information, and I think
reducing the need for root is a good thing for security.

It would be highly desirable to define new proc data as subject to
addition of more information per line at any time, and as long as the
fields are added at the end of the line a parser can easily be written not
to break. As you note, changing existing information presents other
problems and will break things, since /proc/partitions was not defines as

I personally would have no problem adding this to 2.5, lots of things will
change, but I agree that a change to 2.4 is not practical as a retrofit.

bill davidsen <>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:13    [W:0.066 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site