Re: Buffer corruption (2.1.81)

John Alvord (jalvo@cloud9.net)
Mon, 26 Jan 1998 11:53:53 -0500 (EST)


On Mon, 26 Jan 1998, Chris Evans wrote:

>
> On Mon, 26 Jan 1998, Bill Hawes wrote:
>
> > I wish there were a way to track down this sort of problem in a
> > systematic way, other than just hoping that continued code review and
> > improvement will catch the error.
>
> Hmmm, locate the dentry list in a read-only segment, remarking it as r/w
> whenever we need to manipulate its contents? Slow but thorough. Same for
> buffers?

I was thinking about this problem, and about how Linux now has a read-only
and a read-write address to access the IDT. You could have a set of page
tables which provided read-only access to kernel memory, alongside the
normal read-write access. Then, for example, the dentry structure could
contain the address of the "other" access address.

You could hand out read-only pointers to the dentry. In dentry update
code, the embedded read-write pointer could be used instead.

john alvord