Re: [PATCH] s390/mm: Fix in_atomic() handling in do_secure_storage_access()

Alexander Gordeev
2025-06-04T16:27:59Z

On Tue, Jun 03, 2025 at 03:49:36PM +0200, Heiko Carstens wrote:
> diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
> index 3829521450dd..e1ad05bfd28a 100644
> --- a/arch/s390/mm/fault.c
> +++ b/arch/s390/mm/fault.c
> @@ -441,6 +441,8 @@ void do_secure_storage_access(struct pt_regs *regs)
> if (rc)
> BUG();
> } else {
> + if (faulthandler_disabled())
> + return handle_fault_error_nolock(regs, 0);

This could trigger WARN_ON_ONCE() in handle_fault_error_nolock():

if (WARN_ON_ONCE(!si_code))
si_code = SEGV_MAPERR;

Would this warning be justified in this case (aka user_mode(regs) == true)?

> mm = current->mm;
> mmap_read_lock(mm);
> vma = find_vma(mm, addr);