Re: [discuss] Re: [PATCH][Fix][Resend] Fix Bug #4959: Page tables corrupted during resume on x86-64 (take 3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wednesday, 28 of September 2005 22:33, Andi Kleen wrote:
> On Wednesday 28 September 2005 22:24, Rafael J. Wysocki wrote:
> > Hi,
> >
> > On Wednesday, 28 of September 2005 21:18, Andi Kleen wrote:
> > > On Wednesday 28 September 2005 16:24, Rafael J. Wysocki wrote:
> > > > Hi,
> > > >
> > > > The following patch fixes Bug #4959.  For this purpose it creates
> > > > temporary page translation tables including the kernel mapping (reused)
> > > > and the direct mapping (created from scratch) and makes swsusp switch
> > > > to these tables right before the image is restored.
> > > >
> > > > The code that generates the direct mapping is based on the code in
> > > > arch/x86_64/mm/init.c.
> > >
> > > Looks much better than before, but is there any reason you cannot
> > > share the code with the mm/init.c code?
> >
> > I think so.  I have to make the temporary page tables nosavedata or set
> > PG_nosave on them, so that swsusp doesn't overwrite them.  I'm not
> > sure if I could do this cleanly if I used the code from mm/init.c directly.
> 
> Just pass a flag for that.

Well, the code in mm/init.c is only executed really early, before zones
are initialized, and it uses alloc_low_page() to map memory.  Thus it seems
I only could make my code be executed next to init_memory_mapping(),
in which case I wouldn't be able to use page flags.  Apparently I'm missing
something but now I'm too tired to think efficiently.

> > > Also Suresh S. has a patch out to turn the initial page tables
> > > into initdata. It'll probably conflict with that. Needs to be coordinated
> > > with him.
> >
> > Do you mean the patch at:
> > http://www.x86-64.org/lists/discuss/msg07297.html ?
> > Unfortunately it interferes with the current swsusp code, which uses
> > init_level4_pgt anyway.
> >
> > Could we please treat my patch as a (very much needed) urgent bugfix
> > and make the whole swsusp code in line with the Suresh's patch later on?
> >
> > Suresh, could you please say what you think of it?
> 
> Suresh's patch is a urgent bug fix too. I suggest you two figure out how
> to merge them.

Fine with me.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux