[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxZrv9koOGKNzpBjcpzwaKQBg9ybqcvQ9u=5d94y1F+mQ@mail.gmail.com>
Date: Thu, 28 Jun 2018 14:22:27 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andrew Lutomirski <luto@...nel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Thomas Gleixner <tglx@...utronix.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux API <linux-api@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>,
Boqun Feng <boqun.feng@...il.com>,
Dave Watson <davejwatson@...com>, Paul Turner <pjt@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Russell King - ARM Linux <linux@....linux.org.uk>,
Ingo Molnar <mingo@...hat.com>, Peter Anvin <hpa@...or.com>,
Andi Kleen <andi@...stfloor.org>,
Christoph Lameter <cl@...ux.com>, Ben Maurer <bmaurer@...com>,
Steven Rostedt <rostedt@...dmis.org>,
Josh Triplett <josh@...htriplett.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Michael Kerrisk <mtk.manpages@...il.com>, joelaf@...gle.com
Subject: Re: [RFC PATCH for 4.18 1/2] rseq: validate rseq_cs fields are < TASK_SIZE
On Thu, Jun 28, 2018 at 1:23 PM Andy Lutomirski <luto@...nel.org> wrote:
>
> This is okay with me for a fix outside the merge window. Can you do a
> followup for the next merge window that fixes it better, though? In
> particular, TASK_SIZE is generally garbage. I think a better fix
> would be something like adding a new arch-overridable helper like:
>
> static inline unsigned long current_max_user_addr(void) { return TASK_SIZE; }
We already have that. It's called "user_addr_max()".
It's the limit we use for user accesses.
That said, I don't see why we should even check the IP. It's not like
that's done by signal handling either.
Linus
Powered by blists - more mailing lists