Re: [PATCH] Re: bad pmd ffff810000207238(9090909090909090).

From: Hugh Dickins
Date: Wed May 28 2008 - 18:23:17 EST


On Wed, 28 May 2008, Willy Tarreau wrote:
> On Wed, May 28, 2008 at 10:14:31PM +0200, Jan Engelhardt wrote:
> > On Wednesday 2008-05-28 21:56, Willy Tarreau wrote:
> > >On Wed, May 28, 2008 at 07:36:07PM +0100, Hugh Dickins wrote:
> > >>
> > >> page on my x86_64 boxes, and they have lots of 0x90s there too.
> > >> It's just some page alignment filler that x86_64 kernel startup
> > >> has missed cleaning up - patch below fixes that. There's no
> > >
> > >Is there a particular reason we use 0x90 as an alignment filler ?
> >
> > Alignment within functions. You could use a JMP to jump over
> > the alignment, but that would be costly. So in order to
> > "run through the wall", you need an opcode that does not
> > do anything, something like 0x90.
>
> OK, I did not understand from Hugh's explanation that it was
> all about alignment within functions. Of course, 0x90 is fine
> there (though there are multi-byte NOPs available).

I'm hardly the right person to answer on this, but I believe that
because the 0x90 NOP is particularly appropriate in .text (and
prevents stalls even where it cannot be reached?), it gets used
as the default alignment filler all over. (It's even specified
for the arch-independent default _ALIGN in linux/linkage.h.)

Hugh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/