[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190319173233.GB11525@redhat.com>
Date: Tue, 19 Mar 2019 18:32:33 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Sudeep Holla <sudeep.holla@....com>
Cc: x86@...nel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Richard Weinberger <richard@....at>, jdike@...toit.com,
Steve Capper <Steve.Capper@....com>,
Haibo Xu <haibo.xu@....com>, Bin Lu <bin.lu@....com>,
Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH v2 4/6] powerpc: use common ptrace_syscall_enter hook to
handle _TIF_SYSCALL_EMU
On 03/19, Oleg Nesterov wrote:
>
> Well, personally I see no point... Again, after the trivial simplification
> x86 does
>
> if (work & (_TIF_SYSCALL_EMU | _TIF_SYSCALL_TRACE)) {
> ret = tracehook_report_syscall_entry(regs);
> if (ret || (work & _TIF_SYSCALL_EMU))
> return -1L;
> }
>
> this looks simple enough for copy-and-paste.
>
> > If there's a better way to achieve the same
>
> I can only say that if we add a common helper, I think it should absorb
> tracehook_report_syscall_entry() and handle both TIF's just like the code
> above does. Not sure this makes any sense.
this won't work, looking at 6/6 I see that arm64 needs to distinguish
_TRACE and _EMU ... I don't understand this code, but it looks suspicious.
If tracehook_report_syscall_entry() returns nonzero the tracee was killed,
syscall_trace_enter() should just return.
To me this is another indication that consolidation makes no sense ;)
Oleg.
Powered by blists - more mailing lists