[syslinux] com32 fswrite to filesystem

Gene Cumm gene.cumm at gmail.com
Thu Mar 11 10:53:10 PST 2010


On Thu, Mar 11, 2010 at 1:02 PM, Don Hiatt <donhiatt at gmail.com> wrote:
> On Thu, Mar 11, 2010 at 9:25 AM, Gene Cumm <gene.cumm at gmail.com> wrote:
>> I'm pretty sure this was discussed previously on the list.
>>
>> This is my understanding of H. Peter Anvin's opinion/view.  Due to the
>> unpredictable nature of the quality of different BIOSs, this has been
>> explicitly not implemented.  If you happen to have a bad BIOS, you
>> might (at worst) nuke your entire hard drive by overwriting it with
>> corrupt data when you only wanted to write to one small text file.
>>
>
> Thanks for your reply Gene. I have looked at your rosh but I'd like to
> make it rwosh. ;-)

Maybe as another COM32 that re-uses the code from ROSH.

> One thing I'd like to do is, say, from syslinux download a new kernel image
> over TFTP and then write it to the filesystem. Or do some other sort
> similar FS writes. I certainly don't expect this to be needed by too
> many people,
> but I'd certainly release any changes I make which allow FS write support.
> Basically, what I'm looking for is any words of advice on just where to begin
> to add support. It may be a futile effort, but I'd like to give it a go. ;-)
>
> Cheers and thanks again!
>
> don

You are correct.  You would want to start in the core.  I haven't read
through the code to see how v4 works yet.

For safety, I can think of an idea to protect users: Create a variable
in the core that determines if a write is allowed.  Default value is
false.  Create a system call that would prompt the user to acknowledge
that writing is dangerous and must exactly enter an enabler word or
phrase which then turns on writing functionality.  If a system call
attempts to write while the value is false, the write is blocked and
an appropriate error is returned (EROFS looks like the perfect
candidate).

-- 
-Gene

"No one ever says, 'I can't read that ASCII E-mail you sent me.'"




More information about the Syslinux mailing list