From: Peter Zijlstra <peterz@infradead.org>
To: sxwjean@me.com
Cc: x86@kernel.org, linux-mm@kvack.org, tglx@linutronix.de,
mingo@redhat.com, bp@alien8.de, hpa@zytor.com, luto@kernel.org,
krisman@collabora.com, chang.seok.bae@intel.com,
viro@zeniv.linux.org.uk, nivedita@alum.mit.edu,
adobriyan@gmail.com, oleg@redhat.com, sblbir@amazon.com,
axboe@kernel.dk, laijs@linux.alibaba.com,
dave.hansen@linux.intel.com, akpm@linux-foundation.org,
arnd@arndb.de, davem@davemloft.net, keescook@chromium.org,
kim.phillips@amd.com, yazen.ghannam@amd.com, dave@stgolabs.net,
metze@samba.org, elver@google.com, ebiederm@xmission.com,
christophe.leroy@csgroup.eu, linux-kernel@vger.kernel.org,
Xiongwei Song <sxwjean@gmail.com>
Subject: Re: [PATCH RESEND 2/2] x86/mm: Randomize va with generic arch_pick_mmap_layout()
Date: Tue, 21 Sep 2021 16:41:45 +0200 [thread overview]
Message-ID: <YUnvKV0Qf6zhiasz@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210921143414.70723-3-sxwjean@me.com>
On Tue, Sep 21, 2021 at 10:34:14PM +0800, sxwjean@me.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.
next prev parent reply other threads:[~2021-09-21 14:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 14:34 [PATCH RESEND 0/2] Use generic code for randomization of virtual address of x86 sxwjean
2021-09-21 14:34 ` [PATCH RESEND 1/2] x86: Rename TIF_ADDR32 to TIF_32BIT sxwjean
2021-09-21 14:34 ` [PATCH RESEND 2/2] x86/mm: Randomize va with generic arch_pick_mmap_layout() sxwjean
2021-09-21 14:41 ` Peter Zijlstra [this message]
2021-09-22 13:28 ` Xiongwei Song
2021-09-27 7:37 ` Xiongwei Song
2021-09-27 16:27 ` Kees Cook
2021-09-28 2:14 ` Xiongwei Song
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YUnvKV0Qf6zhiasz@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=axboe@kernel.dk \
--cc=bp@alien8.de \
--cc=chang.seok.bae@intel.com \
--cc=christophe.leroy@csgroup.eu \
--cc=dave.hansen@linux.intel.com \
--cc=dave@stgolabs.net \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=elver@google.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=kim.phillips@amd.com \
--cc=krisman@collabora.com \
--cc=laijs@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=metze@samba.org \
--cc=mingo@redhat.com \
--cc=nivedita@alum.mit.edu \
--cc=oleg@redhat.com \
--cc=sblbir@amazon.com \
--cc=sxwjean@gmail.com \
--cc=sxwjean@me.com \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
--cc=x86@kernel.org \
--cc=yazen.ghannam@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox