Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6463792pxb; Tue, 15 Feb 2022 03:04:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJymhkVSUV8eraFXex9lP76Ox0O5EW+CS9SujFKvOPSpk07OzW3lYmebGFYsEISeRMtE+t5c X-Received: by 2002:a17:906:c149:: with SMTP id dp9mr2475684ejc.57.1644923040467; Tue, 15 Feb 2022 03:04:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644923040; cv=none; d=google.com; s=arc-20160816; b=MX3UOUUhuYHCX2PY2qV60VSVJ0SZWyMoXhGaJoj7CHjiX74RFHkE0gpj1T8SXv3FX7 MGRlsbQRwJCewOnPjNaOeso03urnuA9qL/a9o3FwgNmFkS5+Vmq1KqqwLAZqP39+FJ+m CvrxWAsjLs+5M0ufbjJ4JjlFvZXOQm76OvNE4A+QboeHIYvz7EZVInGmpxFBzz8fcgur NekZk7U5jHdQ8lW+nFwvyP9C9RKanbucIe/rtQDrgbNN0mvG/kN+ekSpK+nEoj/oAjPz Qh6c9UPHiuoL/lJ2t+mne80jznV5oFHt2zgRVDfz/rceqQA/XSACXkjFVUY1pRexrZyd XqvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=pr7KD75Ym/JrrDMF69wM6klUhInOW0wYG6rxxVWop8U=; b=0/MQUPFzRYf46x7/kyCsfy5IZlDCWQq9PSI4JXbr/HuhO4DMCx/uvLQQ7wv8k6OYOi OsyMuV2n/hmmDVhlR+kNqjGasY9zi3iqUimUsqgpT4IDpxqiZ0drkHXyHM4Akuwt+R6v rT5tPIrNV6fSdxupDWcMTAb4xNqgfnobiBcK4TBeJJX8vuUbEE42NhTH4nuDXGvf+QaR 0lhm6tSf27VE6/gzF78E+zxuqCYsUdcXfOV9Gt0pZ+YW4dyyFlWhRe1wWspd+b/9ENA0 dRzbu0faBVeoqQG6IsvxJA5dRq2Jnw9Jm8Orgx4L+QXsWHf+ypg7v/lMWXaC8gi5Cydu pSTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g10si27676366edz.128.2022.02.15.03.03.37; Tue, 15 Feb 2022 03:04:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235888AbiBOJbH (ORCPT + 99 others); Tue, 15 Feb 2022 04:31:07 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233528AbiBOJbC (ORCPT ); Tue, 15 Feb 2022 04:31:02 -0500 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CE1C39ADA1 for ; Tue, 15 Feb 2022 01:30:50 -0800 (PST) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-156-02Gu5ovtPiqtLOI9bz8ReQ-1; Tue, 15 Feb 2022 09:30:48 +0000 X-MC-Unique: 02Gu5ovtPiqtLOI9bz8ReQ-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.28; Tue, 15 Feb 2022 09:30:41 +0000 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.028; Tue, 15 Feb 2022 09:30:41 +0000 From: David Laight To: 'Ard Biesheuvel' , Arnd Bergmann CC: Mark Rutland , Rich Felker , "linux-ia64@vger.kernel.org" , "linux-sh@vger.kernel.org" , Peter Zijlstra , "open list:MIPS" , "Linux Memory Management List" , Guo Ren , "open list:SPARC + UltraSPARC (sparc/sparc64)" , "linux-hexagon@vger.kernel.org" , linux-riscv , Will Deacon , "Christoph Hellwig" , linux-arch , "open list:S390" , Brian Cain , Helge Deller , X86 ML , Russell King , "linux-csky@vger.kernel.org" , Ingo Molnar , "Geert Uytterhoeven" , "linux-snps-arc@lists.infradead.org" , Robin Murphy , "open list:TENSILICA XTENSA PORT (xtensa)" , Arnd Bergmann , Heiko Carstens , alpha , linux-um , "open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)" , linux-m68k , "openrisc@lists.librecores.org" , Greentime Hu , "Stafford Horne" , Linux ARM , "monstr@monstr.eu" , Thomas Bogendoerfer , "open list:PARISC ARCHITECTURE" , Nick Hu , Max Filippov , "linux-api@vger.kernel.org" , Linux Kernel Mailing List , "dinguyen@kernel.org" , "Eric W. Biederman" , Richard Weinberger , Andrew Morton , Linus Torvalds , "David S. Miller" Subject: RE: [PATCH 08/14] arm64: simplify access_ok() Thread-Topic: [PATCH 08/14] arm64: simplify access_ok() Thread-Index: AQHYIkSmToLbzZrgTk+lOdewxMJ8XqyUT0bw Date: Tue, 15 Feb 2022 09:30:41 +0000 Message-ID: <153bb1887f484ed79ce8224845a4b2ea@AcuMS.aculab.com> References: <20220214163452.1568807-1-arnd@kernel.org> <20220214163452.1568807-9-arnd@kernel.org> In-Reply-To: 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogQXJkIEJpZXNoZXV2ZWwNCj4gU2VudDogMTUgRmVicnVhcnkgMjAyMiAwODoxOA0KPiAN Cj4gT24gTW9uLCAxNCBGZWIgMjAyMiBhdCAxNzozNywgQXJuZCBCZXJnbWFubiA8YXJuZEBrZXJu ZWwub3JnPiB3cm90ZToNCj4gPg0KPiA+IEZyb206IEFybmQgQmVyZ21hbm4gPGFybmRAYXJuZGIu ZGU+DQo+ID4NCj4gPiBhcm02NCBoYXMgYW4gaW5saW5lIGFzbSBpbXBsZW1lbnRhdGlvbiBvZiBh Y2Nlc3Nfb2soKSB0aGF0IGlzIGRlcml2ZWQgZnJvbQ0KPiA+IHRoZSAzMi1iaXQgYXJtIHZlcnNp b24gYW5kIG9wdGltaXplZCBmb3IgdGhlIGNhc2UgdGhhdCBib3RoIHRoZSBsaW1pdCBhbmQNCj4g PiB0aGUgc2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