Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp989929iob; Thu, 12 May 2022 08:49:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHBgiffbEwgh3m36R5yXLyek7DawqhV1HQ+oblZ4doHBvHMn2j8JiRafYF/7PVyToVdpB+ X-Received: by 2002:a17:907:50a3:b0:6f3:a302:96aa with SMTP id fv35-20020a17090750a300b006f3a30296aamr504874ejc.2.1652370541619; Thu, 12 May 2022 08:49:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652370541; cv=none; d=google.com; s=arc-20160816; b=BCGHmUGA18iDAoRba9v6uT7g/Mekzegnzf5c61S0BgXUgiXYjphN4ppzEO3sdSJ4Ys rp9xXt3cfEtiJIAGDWCtkTyJvnwgJslTmOp9DGspJYjRpSkLjHJwjiJlVrmLYrRUh6OE oKS7xlhmsXLQOL6Ir/8vxD8uMUZViPpW1j7ZUrsKzYvjBoIcXt2y3CaBvY5hQNLn/U+u yUl6azSBKc3wMIVnOFU2ziHRWcH5djK1YmPPfrzOjq3UrfJIamrVel9kQvZRc3BtuJEY QCMQ+haTw6QZXAF2WqnBb+1yCHKzw8bZjZ8nGZ20XBREQgcer/3wMErC89vjuMHnGy6v yvBA== 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=/bFx31Nk+YvNptwjVPtPitqlfAkYdh9BFGgbuy7sl9s=; b=Hwr5jFHj1vfU8MNThH06Im3yz8NmV+7LPVmV77b215XGWyQ1jYHpXdhwBUuoLEqVzR GeCGGAGXYS3tGLeQfksvu2/T8AWVsYOjSoD3+SA0rURETumQBC28JwmP5S61RueUqSC9 1XJvKfzvWqe8bSbtC1xdUx1kwHP3M0CW8nI5uYVGEuXwBvKApzyjw9ESBqO4mpv26vvw imF/8dOPiHKskBSZZOVvIVld15EC3L1HBGEu2Yhkn1D8swBSQGZqxWa02FbF4KmXn90w 2T5/VG2Edr9NdWU/x46RzS+GNEsA6nyrQmD1w5f9r2AJEA/zSUcfvziIuaR//M72w2PC 098Q== 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 hp25-20020a1709073e1900b006f3a0b39bcdsi8054551ejc.721.2022.05.12.08.48.36; Thu, 12 May 2022 08:49:01 -0700 (PDT) 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 S1354081AbiELNDE convert rfc822-to-8bit (ORCPT + 99 others); Thu, 12 May 2022 09:03:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354077AbiELNDB (ORCPT ); Thu, 12 May 2022 09:03:01 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3534162201 for ; Thu, 12 May 2022 06:02:59 -0700 (PDT) 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-273-FQdGDavxPjSQABZUDFCotQ-1; Thu, 12 May 2022 14:02:56 +0100 X-MC-Unique: FQdGDavxPjSQABZUDFCotQ-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.32; Thu, 12 May 2022 14:02:55 +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.033; Thu, 12 May 2022 14:02:55 +0100 From: David Laight To: "'Kirill A. Shutemov'" , Dave Hansen , Andy Lutomirski , "Peter Zijlstra" CC: "x86@kernel.org" , Andrey Ryabinin , Alexander Potapenko , "Dmitry Vyukov" , "H . J . Lu" , Andi Kleen , Rick Edgecombe , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: RE: [RFCv2 06/10] x86/uaccess: Remove tags from the address before checking Thread-Topic: [RFCv2 06/10] x86/uaccess: Remove tags from the address before checking Thread-Index: AQHYZN8hTSKv+xBtAEiDWI98RCjTSK0bNyYw Date: Thu, 12 May 2022 13:02:55 +0000 Message-ID: References: <20220511022751.65540-1-kirill.shutemov@linux.intel.com> <20220511022751.65540-8-kirill.shutemov@linux.intel.com> In-Reply-To: <20220511022751.65540-8-kirill.shutemov@linux.intel.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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Kirill A. Shutemov > Sent: 11 May 2022 03:28 > > The tags must not be included into check whether it's okay to access the > userspace address. > > Strip tags in access_ok(). Why? Just change the test to check the buffer doesn't cross 1u << 63. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)