crash in virt_to_pages

revolver revolver at nm.ru
Thu Mar 8 05:05:20 EST 2012


Hi,

I am trying to solve crash on old patched 2.6.18 kernel
where virt_to_page() used on stack variable address.

function() {

   struct {
      u32 ...
      u32 ...
      ...
   } bla;

   ... = virt_to_page(&bla);
}

 i386 it works fine but x86_64 kernl panics.
When kernel panics, &bla is something like ffffffff80574d40,
which is not valid for virt_to_pages, AFAIK.

Any ideas?
Why it is not save to use virt_to_pages on stack addresses?

Thank you






More information about the Kernelnewbies mailing list