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]
Date:   Wed, 22 Sep 2021 21:28:36 +0800
From:   Xiongwei Song <sxwjean@...com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     x86@...nel.org, linux-mm@...ck.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        Andy Lutomirski <luto@...nel.org>,
        Gabriel Krisman Bertazi <krisman@...labora.com>,
        "Chang S. Bae" <chang.seok.bae@...el.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        Arvind Sankar <nivedita@...m.mit.edu>, adobriyan@...il.com,
        oleg@...hat.com, sblbir@...zon.com, axboe@...nel.dk,
        laijs@...ux.alibaba.com, dave.hansen@...ux.intel.com,
        akpm@...ux-foundation.org, arnd@...db.de, davem@...emloft.net,
        keescook@...omium.org, kim.phillips@....com, yazen.ghannam@....com,
        dave@...olabs.net, metze@...ba.org, elver@...gle.com,
        ebiederm@...ssion.com, christophe.leroy@...roup.eu,
        linux-kernel@...r.kernel.org, Xiongwei Song <sxwjean@...il.com>
Subject: Re: [PATCH RESEND 2/2] x86/mm: Randomize va with generic
 arch_pick_mmap_layout()


> On Sep 21, 2021, at 10:41 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> 
> On Tue, Sep 21, 2021 at 10:34:14PM +0800, sxwjean@...com wrote:
>> diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h
>> index 7516e4199b3c..c697e377644d 100644
>> --- a/arch/x86/include/asm/compat.h
>> +++ b/arch/x86/include/asm/compat.h
>> @@ -151,6 +151,11 @@ struct compat_shmid64_ds {
>> 	compat_ulong_t __unused5;
>> };
>> 
>> +static inline int is_compat_task(void)
>> +{
>> +	return IS_ENABLED(CONFIG_COMPAT) && test_thread_flag(TIF_32BIT);
>> +}
>> +
> 
> This is still fundamentally broken for x86. x86 doesn't have compat
> tasks, the granularity is at syscall at best.

Hi Peter,

Thank you for pointing this out. I understand now a 64bit task can call a 32bit syscall. 
Here we should use in_compat_syscall() to check if the kernel is in compat mode, right?

Regards,
Xiongwei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ