Re: [PATCH] x86: Construct 32 bit boot time page tables in native format.

From: Rafael J. Wysocki
Date: Mon Jan 28 2008 - 15:29:06 EST


On Monday, 28 of January 2008, Pavel Machek wrote:
> Hi!
>
> > > > /*
> > > > * Swap suspend & friends need this for resume because things like the intel-agp
> > > > * driver might have split up a kernel 4MB mapping.
> > > > */
> > > > -char __nosavedata swsusp_pg_dir[PAGE_SIZE]
> > > > +char swsusp_pg_dir[PAGE_SIZE]
> > >
> > > thanks, applied.
>
> Sorry, this is subtle and I've overlooked it before.
>
> (I thought you were only changing ifdef).
>
> Now you memcpy() over pg_dir when that pgdir is in use during swsusp
> resume.

It is not. swsusp hasn't been using swsusp_pg_dir for several months.
Hence, the patch. :-)

> Granted, you memcpy() with same data that already are there,
> but it may still do some funny effects.
>
> Hmm, but same argument applies to lower levels of paging in 64-bit and
> PAE cases, and we still do that memcpy-over-active-pagetables there...
> :-(.

Actually, no. We only do that with the kernel code mapping which should be
safe as long as TLBs are not flushed (and they aren't).

Thanks,
Rafael
--
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/