Re: [PATCH v5 00/17] x86: Rewrite exit-to-userspace code

From: Andy Lutomirski
Date: Tue Jul 07 2015 - 12:04:06 EST


On Tue, Jul 7, 2015 at 4:12 AM, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>
> So this looks mostly problem free on my boxen, except this warning triggers:
>
> Adding 3911820k swap on /dev/sda2. Priority:-1 extents:1 across:3911820k
> capability: warning: `dbus-daemon' uses 32-bit capabilities (legacy support in use)
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 2445 at arch/x86/entry/common.c:311 syscall_return_slowpath+0x4c/0x270()
> syscall 6 left IRQs disabled
> Modules linked in:
> CPU: 1 PID: 2445 Comm: distccd Not tainted 4.2.0-rc1-01597-gaecd781-dirty #18
> 0000000000000000 00000000776afac2 ffff880035413e58 ffffffff81c8915f
> 0000000000000000 ffff880035413eb0 ffff880035413e98 ffffffff810a8d82
> ffff880035413e78 ffff880035413f58 0000000020020002 ffff880035410000
> Call Trace:
> [<ffffffff81c8915f>] dump_stack+0x4f/0x7b
> [<ffffffff810a8d82>] warn_slowpath_common+0xa2/0xc0
> [<ffffffff810a8df5>] warn_slowpath_fmt+0x55/0x70
> [<ffffffff81001ddc>] syscall_return_slowpath+0x4c/0x270
> [<ffffffff81c96471>] int_ret_from_sys_call+0x25/0x9f
> ---[ end trace 083efc734e089d37 ]---
> device: 'vcs2': device_add
> PM: Adding info for No Bus:vcs2
> device: 'vcsa2': device_add
>
> with ancient user-space, running the attached .config.
>
> The system booted up fine otherwise. The warning corresponds to:
>
> if (WARN(irqs_disabled(), "syscall %ld left IRQs disabled",
> regs->orig_ax))
> local_irq_enable();
>
> and this was just the regular startup of the distccd daemon during bootup, nothing
> particularly fancy.
>
> Note that 'distccd' is a 32-bit ELF binary - and this is a 64-bit kernel.
>
> Syscall 6 would be:
>
> arch/x86/entry/syscalls/syscall_32.tbl:6 i386 close sys_close
>
> Thanks,
>
> Ingo

It's irq state confusion in these lovely macros:

#ifndef CONFIG_AUDITSYSCALL
# define sysexit_audit ia32_ret_from_sys_call
# define sysretl_audit ia32_ret_from_sys_call
#endif

Frankly, I'm amazed that the old code seems to have worked. I should
have a patch for you later today.

--Andy

--
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/