Re: [PATCH 07/32] s390/traps: Handle nullifying program checks in get_trap_ip()

From: Ilya Leoshkevich

Date: Mon Oct 12 2026 - 10:38:35 EST




On 10/12/26 15:42, Heiko Carstens wrote:
On Mon, Oct 12, 2026 at 03:01:56PM +0200, Ilya Leoshkevich wrote:

[...]

Should location be moved inside the "if"? Now it reads weirdly: we cast
the pointer to __user before checking for user mode.

if (user_mode(regs)) {
if (get_user(opcode, location))

You are suggesting to move the assignment like this:

if (user_mode(regs)) {
location = (void __user *)get_trap_ip(regs);
if (get_user(opcode, location))

? Or something else? Sure, why not. Just let me know what you prefer.

Yes, and maybe also move the declaration there too.