Skip to contentSkip to conversation

Q: does force_iret() make any sense today?

DISCUSSION Oleg Nesterov 2 participants 3 messages Dec 18, 2019

lore
Share & tools
lore
#0 lore raw

I do not pretend I understand the arch/x86/entry/ code, but it seems that asm does all the necessary checks and the "extra" TIF_NOTIFY_RESUME simply has no effect except tracehook_notify_resume() will be called for no reason?

Oleg.

#1 lore raw
Quoted 4 lines · Oleg Nesterov

I do not pretend I understand the arch/x86/entry/ code, but it seems that asm does all the necessary checks and the "extra" TIF_NOTIFY_RESUME simply has no effect except tracehook_notify_resume() will be called for no reason?

It's a relic of a time before the more robust checks for SYSRET/SYSEXIT were added. The idea was to divert the syscall return flow off the fast path. Even if no exit work was done, the slow path always returned with IRET. But with all the entry rework that has been done it is no longer needed and can be removed.

--
Brian Gerst

#2 lore raw
Quoted 7 lines · Brian Gerst
Quoted 4 lines · Oleg Nesterov

I do not pretend I understand the arch/x86/entry/ code, but it seems that asm does all the necessary checks and the "extra" TIF_NOTIFY_RESUME simply has no effect except tracehook_notify_resume() will be called for no reason?

Quoted 5 lines

It's a relic of a time before the more robust checks for SYSRET/SYSEXIT were added. The idea was to divert the syscall return flow off the fast path. Even if no exit work was done, the slow path always returned with IRET. But with all the entry rework that has been done it is no longer needed and can be removed.

Thanks, this was my understanding. Will you make a patch?

Oleg.