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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 88701C433B4 for ; Thu, 22 Apr 2021 08:40:40 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 182DB6144A for ; Thu, 22 Apr 2021 08:40:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 182DB6144A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ACULAB.COM Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TgWE4TVLsiY6CcMv/980HBPVPjRdjTdATbe5HkHtmWU=; b=SEo9mUAOo8kneJOqRMo6/2L28 2I+kGozb7y3tWWEt/Zcg3W57zTc9X/2oZYU+n4CqVE4LvGmTkclryMPbEOVn14BbO3DrlOtcXs6Lk yUoBDdkpQXc2AO/TgJMm4c4/AOlMI+bfZroFguX9snesGx1OaZsUMh5W0xq+bOFwuDTyFA35u6tIe Fckzu0FcgerEF6RVZJj9oLntR3s1bm9Va33wHEpchdzeO1X1QkE+untqrTknt9EqZI8Db6La2J7JA CObGzfSFYBmbnKldTqmxqXTr08Dh9OF98Lj1ajV31ctsBTIAzLWTNhWHHc+YL5bOLTDFqQmeKwP1X x6ZPxtWBg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lZUr4-00GIMM-M9; Thu, 22 Apr 2021 08:38:34 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZUr0-00GILx-PM for linux-arm-kernel@desiato.infradead.org; Thu, 22 Apr 2021 08:38:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:In-Reply-To:References:Message-ID:Date:Subject:CC:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=idZi1z9c2txBBGd69caPFKl60S6XTpiqkUKdJkiZc6Q=; b=P98tnvHeSY5Wn+9UMYDMDet1J8 8xxEuvo864+ExEICRA5Bh+PxuIobEdgJE2EeYFindC0seIwjaJpTBASI/lNUvPwF6TObbnuiOVywe +abuGJPP2vKyK017nWqGuFjZFOp9vzw17yQPZQW+Mp/SV9kZWzW26girCJV3IbiLhZMn1QTYzoKnB X09Inaok7DXYiGIEEauCdcKSQGO8YnnOcHjmv1fz8UmvCt0EEMbS2n7LkFXzciI9traEMP40x71pL LR7fGYxJ/WOkSduhB5xTR8CV+enro+mexNDJI/iNTklZtB9X3g8Z8GusON5pFn5O9z2KkqrZHhRxm zRIzUDIA==; Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZUqV-0003v6-IA for linux-arm-kernel@lists.infradead.org; Thu, 22 Apr 2021 08:38:21 +0000 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-157-y4qfBOiXO9u1CkG8ec7MAQ-1; Thu, 22 Apr 2021 09:37:42 +0100 X-MC-Unique: y4qfBOiXO9u1CkG8ec7MAQ-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 22 Apr 2021 09:37:41 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.015; Thu, 22 Apr 2021 09:37:41 +0100 From: David Laight To: 'Amanieu d'Antras' , "linux-arm-kernel@lists.infradead.org" CC: Ryan Houdek , Catalin Marinas , Will Deacon , Mark Rutland , Steven Price , Arnd Bergmann , Mark Brown Subject: RE: [RFC PATCH v3 6/8] arm64: Add a compat syscall flag to thread_info Thread-Topic: [RFC PATCH v3 6/8] arm64: Add a compat syscall flag to thread_info Thread-Index: AQHXNuDkpbwPGfrRDkSUKrDtXoiSn6rANoNQ Date: Thu, 22 Apr 2021 08:37:41 +0000 Message-ID: <859ad8a943484270b95bab5073a5c031@AcuMS.aculab.com> References: <20210421190207.1803139-1-amanieu@gmail.com> <20210421190207.1803139-7-amanieu@gmail.com> In-Reply-To: <20210421190207.1803139-7-amanieu@gmail.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210422_093820_188372_601D41DB X-CRM114-Status: GOOD ( 13.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Amanieu d'Antras > Sent: 21 April 2021 20:02 > > This flag is used by in_compat_syscall to handle compat syscalls coming > from 64-bit tasks. > > Signed-off-by: Amanieu d'Antras > Co-developed-by: Ryan Houdek > Signed-off-by: Ryan Houdek > --- > arch/arm64/include/asm/compat.h | 5 +++-- > arch/arm64/include/asm/elf.h | 13 ++++++++++++- > arch/arm64/include/asm/thread_info.h | 3 +++ > 3 files changed, 18 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h > index a2f5001f7793..71de0ba8b160 100644 > --- a/arch/arm64/include/asm/compat.h > +++ b/arch/arm64/include/asm/compat.h > @@ -190,13 +190,14 @@ static inline bool is_compat_thread(struct thread_info *thread) > > static inline bool in_compat_syscall(void) > { > - return is_compat_task(); > + return is_compat_task() || > + current_thread_info()->aarch64_compat_syscall; > } ... Wouldn't it be better to ensure that a 'compat_task' always has aarch64_compat_syscall set. If you can't do that, just replacing the '||' with '|' will generate better code for the usual case of both flags being clear. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel