lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87v9ctcsar.fsf@nanos.tec.linutronix.de>
Date:   Wed, 23 Dec 2020 00:52:28 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Andreas Larsson <andreas@...sler.com>,
        sparclinux <sparclinux@...r.kernel.org>, linux-mm@...ck.org
Cc:     "David S. Miller" <davem@...emloft.net>,
        Arnd Bergmann <arnd@...db.de>,
        "linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
        Sam Ravnborg <sam@...nborg.org>
Subject: Re: sparc32: Init process fails to load with generic kmap atomic

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ