From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CAFFC43331 for ; Tue, 24 Mar 2020 19:33:00 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 846B820714 for ; Tue, 24 Mar 2020 19:32:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 846B820714 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48n1cS5CgjzDqsl for ; Wed, 25 Mar 2020 06:32:56 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=suse.de (client-ip=195.135.220.15; helo=mx2.suse.de; envelope-from=msuchanek@suse.de; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48n1ZL5qZ0zDql2 for ; Wed, 25 Mar 2020 06:31:06 +1100 (AEDT) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CAA31AAB8; Tue, 24 Mar 2020 19:31:00 +0000 (UTC) Date: Tue, 24 Mar 2020 20:30:55 +0100 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: Nicholas Piggin Subject: Re: [PATCH v11 5/8] powerpc/64: make buildable without CONFIG_COMPAT Message-ID: <20200324193055.GG25468@kitsune.suse.cz> References: <20200225173541.1549955-1-npiggin@gmail.com> <4b7058eb0f5558fb7e2cee1b8f7cf99ebd03084e.1584620202.git.msuchanek@suse.de> <1585039733.dm1rivvych.astroid@bobo.none> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1585039733.dm1rivvych.astroid@bobo.none> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Gustavo Luiz Duarte , Alexander Shishkin , Jordan Niethe , Sebastian Andrzej Siewior , Claudio Carvalho , Paul Mackerras , Jiri Olsa , Rob Herring , Michael Neuling , Eric Richter , Masahiro Yamada , Nayna Jain , Peter Zijlstra , Ingo Molnar , Allison Randal , Valentin Schneider , Arnd Bergmann , Arnaldo Carvalho de Melo , Alexander Viro , Jonathan Cameron , Namhyung Kim , Thomas Gleixner , Andy Shevchenko , Hari Bathini , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , "Eric W. Biederman" , linux-fsdevel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, "David S. Miller" , Thiago Jung Bauermann Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, Mar 24, 2020 at 06:54:20PM +1000, Nicholas Piggin wrote: > Michal Suchanek's on March 19, 2020 10:19 pm: > > diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c > > index 4b0152108f61..a264989626fd 100644 > > --- a/arch/powerpc/kernel/signal.c > > +++ b/arch/powerpc/kernel/signal.c > > @@ -247,7 +247,6 @@ static void do_signal(struct task_struct *tsk) > > sigset_t *oldset = sigmask_to_save(); > > struct ksignal ksig = { .sig = 0 }; > > int ret; > > - int is32 = is_32bit_task(); > > > > BUG_ON(tsk != current); > > > > @@ -277,7 +276,7 @@ static void do_signal(struct task_struct *tsk) > > > > rseq_signal_deliver(&ksig, tsk->thread.regs); > > > > - if (is32) { > > + if (is_32bit_task()) { > > if (ksig.ka.sa.sa_flags & SA_SIGINFO) > > ret = handle_rt_signal32(&ksig, oldset, tsk); > > else > > Unnecessary? > > > diff --git a/arch/powerpc/kernel/syscall_64.c b/arch/powerpc/kernel/syscall_64.c > > index 87d95b455b83..2dcbfe38f5ac 100644 > > --- a/arch/powerpc/kernel/syscall_64.c > > +++ b/arch/powerpc/kernel/syscall_64.c > > @@ -24,7 +24,6 @@ notrace long system_call_exception(long r3, long r4, long r5, > > long r6, long r7, long r8, > > unsigned long r0, struct pt_regs *regs) > > { > > - unsigned long ti_flags; > > syscall_fn f; > > > > if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG)) > > @@ -68,8 +67,7 @@ notrace long system_call_exception(long r3, long r4, long r5, > > > > local_irq_enable(); > > > > - ti_flags = current_thread_info()->flags; > > - if (unlikely(ti_flags & _TIF_SYSCALL_DOTRACE)) { > > + if (unlikely(current_thread_info()->flags & _TIF_SYSCALL_DOTRACE)) { > > /* > > * We use the return value of do_syscall_trace_enter() as the > > * syscall number. If the syscall was rejected for any reason > > @@ -94,7 +92,7 @@ notrace long system_call_exception(long r3, long r4, long r5, > > /* May be faster to do array_index_nospec? */ > > barrier_nospec(); > > > > - if (unlikely(ti_flags & _TIF_32BIT)) { > > + if (unlikely(is_32bit_task())) { > > Problem is, does this allow the load of ti_flags to be used for both > tests, or does test_bit make it re-load? > > This could maybe be fixed by testing if(IS_ENABLED(CONFIG_COMPAT) && Both points already discussed here: https://lore.kernel.org/linuxppc-dev/13fa324dc879a7f325290bf2e131b87eb491cd7b.1573576649.git.msuchanek@suse.de/ Thanks Michal