Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4612345ybb; Tue, 24 Mar 2020 01:55:59 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvANiVHohJmzRILhgTTmKqLIMizsG/IITZT5s9A3ew0gAEhPO3xvO4NLv0OTW+sUlzWzE9h X-Received: by 2002:aca:ecd7:: with SMTP id k206mr2594576oih.113.1585040159613; Tue, 24 Mar 2020 01:55:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585040159; cv=none; d=google.com; s=arc-20160816; b=0Zyrf/Of743EXQwbnXyGqovElW9zriU27MdJT+rhGPkgQXUlPUBx6F6fhQHxIoC8kr yg0dzF9eNSNW9Yx9cOQuQrXY4gp2artOTTjKUb6SemYQvGhh/VDaj2FgUmv+DoNVF2zr Trb1jbjSjBorC/Z2aktFONE2Nf89BCEG1FDwrQUF7Py9o0GvW6gwl1qRR/gCcSR8BIXM 7W7ELakWUIPUf20RvlwN/y/oSKDwBxf3xbk78wcl/FHt2IRUMNWANwgw2v7Kj5wjHtV9 QUcpIlIPt+R7a6AyfKcy04h3XMAEHVDuCFvT/W7ZsFBNuioO5ufJ41WaxCahHfqnIrwS y4Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:message-id :user-agent:mime-version:in-reply-to:references:cc:to:subject:from :date:dkim-signature; bh=AX6pvyW36VYxdhbcJ7NY2GZcvFUSsP1GTN2RViF8G7Y=; b=BMBGZVqRCIytYL1mRmrI3e0cnwR0u8Dj1VpQBVy+zY0EA9gM8K2RFFcWaiwn3ug1ha ieuPwyRg44mv14Xq1dCm5wVMKIuiwq4yt2C1an5YYAnE8LTjbXHpYSnxq2vsOpfCxSYA f9Egk/Tr6aqIV/NzKzKc39MKo4VDY6y4/jyL9RVj4N5gA4OKH3JjRSZIatk16UEK/N97 YHQo1S0uTgxmYt8YaZodOpglO612Q/RrsU297eCD590slPMbOTVQTvvS+2Ks2Kmmk6i6 n/MlalZF10tZMlnZNuREUW1KrDKpvYMpH26KYEONFLcJ1jZx63hyjuAiogr13OElzAvJ +5zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jjtxgFPj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91si1824939ots.139.2020.03.24.01.55.47; Tue, 24 Mar 2020 01:55:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jjtxgFPj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727133AbgCXIy1 (ORCPT + 99 others); Tue, 24 Mar 2020 04:54:27 -0400 Received: from mail-pj1-f66.google.com ([209.85.216.66]:38165 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726524AbgCXIy1 (ORCPT ); Tue, 24 Mar 2020 04:54:27 -0400 Received: by mail-pj1-f66.google.com with SMTP id m15so1142226pje.3; Tue, 24 Mar 2020 01:54:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :user-agent:message-id:content-transfer-encoding; bh=AX6pvyW36VYxdhbcJ7NY2GZcvFUSsP1GTN2RViF8G7Y=; b=jjtxgFPjP0XI7X603OuXDyscIH0QbP4zjp0du6D/cgb/jHVPILKH3KGOL7nhVYDAdr BeDDacT5TQtN0HqK815WDe/FB9o5vbE340CtKRKkMT8jpjQ5ZSSlValk6hiQPTU20Inw cuxk9zVZbC+jila0X5uWNhaF3ar/mZ2/mfvu5YIdMIaYD1+fkpZcwfDyetbLMmqxddT4 WWa5uyYzCGDmU095ttk4ni+mvDiPvSDRnpGVdhckh+gLRFq7S8Hjj89OJGOBx7Kzqjom Sth9EoTAAyEjW1LLz9OQdPHUPde5yQmiqA+e2u5JVd/89s4YnnkK5dhWYYrLj9viO+wM HBNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:user-agent:message-id:content-transfer-encoding; bh=AX6pvyW36VYxdhbcJ7NY2GZcvFUSsP1GTN2RViF8G7Y=; b=ZLew4HMLBb9AxPZqJNvorTZOYwrLD+Kfjh0HcDsxK7965liKKR5KaXNQcwxWA8z+Es ZMsrOGJpbkySdkpGG+nupD9SOzBglpDq87CSBl9uBQd0ljVPuQV57KwAz8Dz8JBE1JM/ X/8AJrSQ5+ULLbxVhakik5GgJQyiqBmZDTJxnC5i3MkG68v9JJtHMzEqQn4sEVXnzH3M 24/f1RJqYP3uYnzDiQxHILRIPLhthWB38H6Xv+yF9jtxGWcneQcuXHkggTeU9VVfhwmj TXNP6JSMyW/ESpeFjvFAqdEpUPqgs5oxCZ2szbKQmr+QBbeGlXBX3jwIvZNccrjkEQ+K 6xxw== X-Gm-Message-State: ANhLgQ3PNZNBdBjKxO94vqQ8VWulCnQ6xrs/kc9VL14GVPG0p3wRXbwn O4oQjmGy1Gl3kUTyCC+cl/1eaE9H X-Received: by 2002:a17:902:8f8e:: with SMTP id z14mr26000685plo.195.1585040066562; Tue, 24 Mar 2020 01:54:26 -0700 (PDT) Received: from localhost (14-202-190-183.tpgi.com.au. [14.202.190.183]) by smtp.gmail.com with ESMTPSA id bx1sm1758873pjb.5.2020.03.24.01.54.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2020 01:54:26 -0700 (PDT) Date: Tue, 24 Mar 2020 18:54:20 +1000 From: Nicholas Piggin Subject: Re: [PATCH v11 5/8] powerpc/64: make buildable without CONFIG_COMPAT To: linuxppc-dev@lists.ozlabs.org, Michal Suchanek Cc: Arnaldo Carvalho de Melo , Alexander Shishkin , Allison Randal , Andy Shevchenko , Arnd Bergmann , Thiago Jung Bauermann , Benjamin Herrenschmidt , Sebastian Andrzej Siewior , Claudio Carvalho , Christophe Leroy , "David S. Miller" , "Eric W. Biederman" , Eric Richter , Greg Kroah-Hartman , Gustavo Luiz Duarte , Hari Bathini , Jordan Niethe , Jiri Olsa , Jonathan Cameron , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Masahiro Yamada , Mauro Carvalho Chehab , Michael Neuling , Ingo Molnar , Michael Ellerman , Namhyung Kim , Nayna Jain , Paul Mackerras , Peter Zijlstra , Rob Herring , Thomas Gleixner , Valentin Schneider , Alexander Viro References: <20200225173541.1549955-1-npiggin@gmail.com> <4b7058eb0f5558fb7e2cee1b8f7cf99ebd03084e.1584620202.git.msuchanek@suse.de> In-Reply-To: <4b7058eb0f5558fb7e2cee1b8f7cf99ebd03084e.1584620202.git.msuchanek@suse.de> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1585039733.dm1rivvych.astroid@bobo.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 =3D sigmask_to_save(); > struct ksignal ksig =3D { .sig =3D 0 }; > int ret; > - int is32 =3D is_32bit_task(); > =20 > BUG_ON(tsk !=3D current); > =20 > @@ -277,7 +276,7 @@ static void do_signal(struct task_struct *tsk) > =20 > rseq_signal_deliver(&ksig, tsk->thread.regs); > =20 > - if (is32) { > + if (is_32bit_task()) { > if (ksig.ka.sa.sa_flags & SA_SIGINFO) > ret =3D handle_rt_signal32(&ksig, oldset, tsk); > else Unnecessary? > diff --git a/arch/powerpc/kernel/syscall_64.c b/arch/powerpc/kernel/sysca= ll_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, lo= ng r5, > long r6, long r7, long r8, > unsigned long r0, struct pt_regs *regs) > { > - unsigned long ti_flags; > syscall_fn f; > =20 > if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG)) > @@ -68,8 +67,7 @@ notrace long system_call_exception(long r3, long r4, lo= ng r5, > =20 > local_irq_enable(); > =20 > - ti_flags =3D 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, lo= ng r5, > /* May be faster to do array_index_nospec? */ > barrier_nospec(); > =20 > - 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) && Other than these, the patches all look pretty good to me. Thanks, Nick =