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

From: Heiko Carstens

Date: Mon Oct 12 2026 - 11:40:30 EST


On Mon, Oct 12, 2026 at 04:31:17PM +0200, Ilya Leoshkevich wrote:
> 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.

Sure. I'm not going to send a new version. For only this. If I'm not
mistaken there is only the other minor nit pr_cont() vs printk() which
can be easily solved. No reason to spam everybody again :)