[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220420032123.6c344rjr4poockjr@treble>
Date: Tue, 19 Apr 2022 20:21:23 -0700
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, brgerst@...il.com, jiangshanlai@...il.com,
Andrew.Cooper3@...rix.com, linux-kernel@...r.kernel.org,
Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH 2/2] x86,entry: Use PUSH_AND_CLEAR_REGS for compat
On Tue, Apr 19, 2022 at 10:41:11PM +0200, Peter Zijlstra wrote:
> Since the upper regs don't exist for ia32 code, preserving them
> doesn't hurt and it simplifies the code.
But an attacker can still control those registers, so clearing them on
the stack is better, as it reduces user control over the kernel stack.
64-bit syscalls *do* have to save those registers to the stack, so
whether it truly matters if compat mode is made equally insecure, I
can't say. But without evidence to the contrary, my feeling is that we
should err on the side of caution.
--
Josh
Powered by blists - more mailing lists