2005-04-01 17:18:57

by Uwe Zybell

[permalink] [raw]
Subject: fs/partitions/msdos.c, scripts/packages/Makefile

First things first: Pls CC me, I'm not subscribed.

There is a line in fs/partitions/msdos.c that lets extended partitions
be max 1k (..."==1 ? 1 : 2"...). The comment explains it to protect
sysadmins from themselves. But /dev/hda isn't similarly protected. That
is because it would prohibit other uses. But now I have found a
legitimate use for extended partitions in their full length. Emulation.
Please remove this, or make it a config option.

Next problem: make O=... ...-pkg doesn't work. Reason: In
scripts/packages/Makefile
all -pkg target call $(MAKE) but from $(obj). This line(s) must be
augmented
with "-f $(srcdir)/Makefile". I don't know if $(srcdir) must be
conditional on O.




___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de


2005-04-02 22:20:42

by Andries Brouwer

[permalink] [raw]
Subject: Re: fs/partitions/msdos.c, scripts/packages/Makefile

On Fri, Apr 01, 2005 at 07:18:52PM +0200, Uwe Zybell wrote:

> There is a line in fs/partitions/msdos.c that lets extended partitions
> be max 1k (..."==1 ? 1 : 2"...). The comment explains it to protect
> sysadmins from themselves. But now I have found a legitimate use
> for extended partitions in their full length. Emulation.
> Please remove this, or make it a config option.

Config options are evil. Adding them is a bad form of bloat.

Whatever you want to do, there are many ways to do it without
changing this part of the kernel code. After all, any partition
is just part of the entire disk.

Note that there are aliasing problems - it is bad to access data
both via a file system and via raw disk or partition.

Andries

2005-04-05 15:23:49

by Uwe Zybell

[permalink] [raw]
Subject: Re: fs/partitions/msdos.c, scripts/packages/Makefile


--- Andries Brouwer <[email protected]> wrote:
> On Fri, Apr 01, 2005 at 07:18:52PM +0200, Uwe Zybell wrote:
>
> > There is a line in fs/partitions/msdos.c that lets extended
> partitions
> > be max 1k (..."==1 ? 1 : 2"...). The comment explains it to protect
>
> > sysadmins from themselves. But now I have found a legitimate use
> > for extended partitions in their full length. Emulation.
> > Please remove this, or make it a config option.
>
> Config options are evil. Adding them is a bad form of bloat.
Then remove.
>
> Whatever you want to do, there are many ways to do it without
> changing this part of the kernel code. After all, any partition
> is just part of the entire disk.
>
But I don't want to rewrite the disk access code of the emulator
either,
because I would have to duplicate that kernelcode into the application.
Besides it would have the same alias access to the *mounted* root
partition. Not that it would *intend* to go there, but a stray fseek
could
do some damage. Something that would be easier than a stray open:-).
Open _does_ check access rights.
> Note that there are aliasing problems - it is bad to access data
> both via a file system and via raw disk or partition.
>
If that partition isn't mounted there is no problem. The emulator does
the mount. If the emulator isn't running and I want to change some
Files,
then I *can* mount without problems.
There is another way. Make "partitions" a full
(pseudo)(read-only?)filesystem. So that "mount -t partitions /dev/hda
/dev/hd/a" and
"mount -t ext2 /dev/hd/a/1 /usr" works. Note that the blockdevice for
the partition is in logically in the full device. If this "partitions"
filesystem permits the writing of inodes, it could be a standard
interface for fdisk et al.





___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de