On Thu, May 07, 2026 at 09:40:44AM -0400, Sasha Levin wrote: > On Thu, May 07, 2026 at 12:47:43PM +0200, Greg KH wrote: > > > + atomic_long_t retval; > > > > Why is this an atomic value? Shouldn't it be whatever the userspace > > return type is? > > The return register is `long` on every arch. > > While testing this, I added the ability to modify the return value after we > create a killswitch, and figured that it could be a useful thing to keep in > the > code. > > But then I got worried about a race between a user changing the return value > of > the killswitch and some program trying to execute the code, and getting some > combination of the old and the new return value. > > Is that a real concern? I'm not sure - but making this atomic was cheap > enough.
I don't think that a combination should matter all that much here, but at least it makes sense now. You might want to document that somewhere here. thanks, greg k-h

