[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxd817J_CVox2ZLpgwP6K7uMuoVmNLVBUrB=Fnj4che2A@mail.gmail.com>
Date: Fri, 27 Mar 2015 13:00:59 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Denys Vlasenko <dvlasenk@...hat.com>
Cc: Ingo Molnar <mingo@...nel.org>,
Andy Lutomirski <luto@...capital.net>,
Borislav Petkov <bp@...en8.de>, X86 ML <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: ia32_sysenter_target does not preserve EFLAGS
On Fri, Mar 27, 2015 at 7:25 AM, Denys Vlasenko <dvlasenk@...hat.com> wrote:
>
> Apparently, users *don't* depend on arithmetic flags
> to survive over syscall. They also okay with DF flag
> being cleared.
Generally, users probably dont' care about many registers at all being
saved, but it's worth noting that the reason system calls save/restore
even caller-saved registers is at least partly in order to avoid any
kernel information leaks.
I don't believe that user mode will ever reasonably care about the
arithmetic flags being changed, but at the same time I also don't it
is something we should ever consider a "feature" we should try to take
advantage of. Generally we should try to not mess with the flag state,
and I'd *much* rather make the rule be that all the system call return
paths restore flags as much as possible.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists