lkml.org 
[lkml]   [2020]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: sparc32: Init process fails to load with generic kmap atomic
Date
On Tue, Dec 22 2020 at 18:58, Andreas Larsson wrote:
> From as far as I have gotten into hunting down the problem, I get a
> failure from load_elf_binary here:
>
> /* First of all, some simple consistency checks */
> if (memcmp(elf_ex->e_ident, ELFMAG, SELFMAG) != 0)
> goto out;
>
> at least seemingly due to the kaddr from copy_page_to_iter in
> lib/iov_iter.c
>
> if (i->type & (ITER_BVEC|ITER_KVEC)) {
> void *kaddr = kmap_atomic(page);
> size_t wanted = copy_to_iter(kaddr + offset, bytes, i);
>
> where kaddr points to memory with all zeroes (from an earlier bzero) in
> this context:

The kaddr might be misleading you here. If the code flow is:

kaddr1 = kmap_atomic(page1);
...
kunmap_atomic(kaddr1);

kaddr2 = kmap_atomic(page2);

Then kaddr1 == kaddr2, but first it maps page1 and then page2, but that
was the same in the original code.

> I will have to continue to dig deeper into this in January. If anyone
> has any ideas how this could stem from this kmap patch, I am all ears.

I can't spot it either. I'll send you a debug patch after the holidays.

Thanks,

tglx

\
 
 \ /
  Last update: 2020-12-23 00:53    [W:0.055 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site