Re: [PATCH 2/2] s390x: Add 3f program exception handler

Heiko Carstens
2020-09-04T12:14:30Z

On Fri, Sep 04, 2020 at 01:33:28PM +0200, Janosch Frank wrote:
> >> + printk_ratelimited(KERN_WARNING
> >> + "Secure storage violation in task: %s, pid %d\n",
> >> + get_task_comm(buf, current), task_pid_nr(current));
> >
> > Why get_task_comm() and task_pid_nr() instead of simply current->comm
> > and current->pid?
>
> Normally if there are functions to get data I assume those should be used.

Could be used, however I don't see why you need that extra complexity
here for both of them.

> > Also: is the dmesg message of any value?
> Yes, it's import for administrators to know that an exception caused
> this segfault and not some memory shenanigans.
>
> As the exception only occurs if a guest runs in unsupported modes like
> sharing the memory between two secure guests it's a good first
> indication what went wrong.

Yes, fine with me. Just not sure of how help this is when pid
namespaces come into play...