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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 05.06.25 um 11:04 schrieb Alexander Gordeev:
On Wed, Jun 04, 2025 at 07:40:43PM +0200, Claudio Imbrenda wrote:
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)?

I think so, because if we are in usermode, we should never trigger
faulthandler_disabled()

I think I do not get you. We are in a system call and also in_atomic(),
so faulthandler_disabled() is true and handle_fault_error_nolock(regs, 0)
is called (above).

what is the psw in regs?
is it not the one that was being used when the exception was triggered?

Hmm, right. I assume is_kernel_fault() returns false not because
user_mode(regs) is true, but because we access the secondary AS.

Still, to me it feels wrong to trigger that warning due to a user
process activity. But anyway:

Acked-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>

Can we trigger a WARN from userspace?




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux