Commit 13035540 authored by Jan Kiszka's avatar Jan Kiszka

x86/ipipe: Define and use ipipe_root_nr_syscalls

If we support compat mode, we need to account for IA32_NR_syscalls being
different than NR_syscalls.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 28dca891
......@@ -371,7 +371,8 @@ __visible inline void syscall_return_slowpath(struct pt_regs *regs)
* want to run them exactly once per syscall exit with IRQs on.
*/
if (unlikely((!IS_ENABLED(CONFIG_IPIPE) ||
syscall_get_nr(current, regs) < NR_syscalls) &&
syscall_get_nr(current, regs) <
ipipe_root_nr_syscalls(ti)) &&
(cached_flags & SYSCALL_EXIT_WORK_FLAGS)))
syscall_slow_exit_work(regs, cached_flags);
......
......@@ -57,4 +57,9 @@ static inline unsigned long __ipipe_ffnz(unsigned long ul)
#define __ipipe_check_root_resched() 0
#endif
#ifdef CONFIG_IA32_EMULATION
#define ipipe_root_nr_syscalls(ti) \
((ti->status & TS_COMPAT) ? IA32_NR_syscalls : NR_syscalls)
#endif /* CONFIG_IA32_EMULATION */
#endif /* !__X86_IPIPE_64_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment