On Tue, Jun 02, 2015 at 09:04:02PM +0200, Denys Vlasenko wrote:
> This macro is small, has only three callsites, and one of them is
> slightly different using a conditional parameter.
>
> A few saved lines aren't worth the resulting obfuscation.
>
> Generated machine code is identical.
>
> Signed-off-by: Denys Vlasenko <[email protected]>
> CC: Linus Torvalds <[email protected]>
> CC: Steven Rostedt <[email protected]>
> CC: Ingo Molnar <[email protected]>
> CC: Borislav Petkov <[email protected]>
> CC: "H. Peter Anvin" <[email protected]>
> CC: Andy Lutomirski <[email protected]>
> CC: Oleg Nesterov <[email protected]>
> CC: Frederic Weisbecker <[email protected]>
> CC: Alexei Starovoitov <[email protected]>
> CC: Will Drewry <[email protected]>
> CC: Kees Cook <[email protected]>
> CC: [email protected]
> CC: [email protected]
> ---
> arch/x86/ia32/ia32entry.S | 62
> ++++++++++++++++++++++++++++-------------------
> 1 file changed, 37 insertions(+), 25 deletions(-)
>
> diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
> index 86cbfe6..0ff676a 100644
> --- a/arch/x86/ia32/ia32entry.S
> +++ b/arch/x86/ia32/ia32entry.S
> @@ -29,28 +29,6 @@
>
> .section .entry.text, "ax"
>
> - /*
> - * Reload arg registers from stack in case ptrace changed them.
> - * We don't reload %eax because syscall_trace_enter() returned
> - * the %rax value we should see. Instead, we just truncate that
> - * value to 32 bits again as we did on entry from user mode.
> - * If it's a new value set by user_regset during entry tracing,
> - * this matches the normal truncation of the user-mode value.
> - * If it's -1 to make us punt the syscall, then (u32)-1 is still
> - * an appropriately invalid value.
Can't say that I'm crazy about the replication of (a shorter version of)
that comment three times though.
The macro is in the same file so looking it up is trivial. So what's the
point?
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/