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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y290o304.ffs@tglx>
Date:   Tue, 17 Aug 2021 11:05:15 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Huacai Chen <chenhuacai@...il.com>
Cc:     Davidlohr Bueso <dave@...olabs.net>,
        Huacai Chen <chenhuacai@...ngson.cn>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Darren Hart <dvhart@...radead.org>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        "open list:MIPS" <linux-mips@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Xuefeng Li <lixuefeng@...ngson.cn>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        Hongchen Zhang <zhanghongchen@...ngson.cn>
Subject: Re: [PATCH] futex: Fix fault_in_user_writeable()

Huacai,

On Tue, Aug 17 2021 at 15:38, Huacai Chen wrote:
> On Tue, Aug 17, 2021 at 3:07 PM Thomas Gleixner <tglx@...utronix.de> wrote:
> On X86, it returns 0; on MIPS64 without patch, it hangs in kernel; on
> MIPS64 with this patch, it returns -1.

As expected.

> Then, I want to know, on "W implies R" archs (such as X86), should it
> return 0? Maybe return -1 is more reasonable? (because the VMA is
> marked as write-only). If this program should return -1, then I don't
> think this is a MIPS-specific problem.

No. mmap(.., PROT_WRITE...) is simply impossible on x86 and implies
PROT_READ as documented in mmap(2).

So why should this fail and only fail in the fault case, but succeed
when the PTE is already established?

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ