Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp809078rwl; Wed, 29 Mar 2023 08:44:50 -0700 (PDT) X-Google-Smtp-Source: AKy350Ycdnr/sdYS9kq0voKafB46jeZJTwbbsP1iTG4vahQ9ES6WNertM9v6kVc9kGUpdU98jrQn X-Received: by 2002:aa7:cb94:0:b0:4fa:bb8d:1d8e with SMTP id r20-20020aa7cb94000000b004fabb8d1d8emr18507270edt.19.1680104690644; Wed, 29 Mar 2023 08:44:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680104690; cv=none; d=google.com; s=arc-20160816; b=csILUpKgd69H8ZnoQMvszL/2wd4Rs7+NfGf418Q3aUqlcJ+FGZiHB1mLQ3npmSfLIp viu63s0C1eQXv1cpEADBGd/sJQ/bT38qH2fDCM1tSu5Xe5YVuHFTJH16bSXQtnGLLwgU csaklZR2noo/veIgVCZtoqJACNc55zCQgCpCeMMjfldQojscZq0i3CKQNOEr/U+fS7Bg Y1QqGfpi/HIGWCoNL7UKbHvXU0dg3zy2FynZeu94ekJ9XHPfcRuKYF6USy4ZgLUH/9GL 0+44L5dNNBcWiqBaKRHZyR1nwOjR5UdVYw6WGHmq0VHRdF7H2eOoZ2a9loHv2aAwNOjO P/NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=g4kHrEowDgNpfJvpROnRHbgAmyyUXv8cp51hnQwqNfA=; b=IUm1/JTx+mYdsEtdSZGJeLy2p6hKg0WpvmHgP5LcpFzkls1c3ghjc8BoJhWjMBV30N sphm5EzKEr8C0Cw0CZBzUTUopmN5wkfQkU4jEnOJlIKsK8snQcKSVIHxAbia/lFNV7V6 tc69dD6wAHeCwQnab5JI8cGBTuWYZWvlS7Go4i4vhP9D/IkQMp7/a0u8olzTZiih8v9r /aa5ZgIjOI9HGVFJ0/QgOY/d9eVJrd9O8IhvXntX4iBvQKPiSIsdLLpBbzoXjFP8hNCx MBGkl+IHXlHL2fV3qxXwlR2m1FvyqxpxIz2o+G4oma535+dks4ng71P0P3xBJ4FX5AWZ XfKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=PyC2Sosg; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=G6aurwmS; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k13-20020aa7d8cd000000b004acb24be0d2si35870029eds.315.2023.03.29.08.44.25; Wed, 29 Mar 2023 08:44:50 -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; dkim=pass header.i=@arndb.de header.s=fm1 header.b=PyC2Sosg; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=G6aurwmS; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230041AbjC2Pm1 (ORCPT + 99 others); Wed, 29 Mar 2023 11:42:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbjC2PmY (ORCPT ); Wed, 29 Mar 2023 11:42:24 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8696135; Wed, 29 Mar 2023 08:42:23 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 159AE5C00A9; Wed, 29 Mar 2023 11:42:21 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 29 Mar 2023 11:42:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1680104541; x=1680190941; bh=g4 kHrEowDgNpfJvpROnRHbgAmyyUXv8cp51hnQwqNfA=; b=PyC2SosgS0wI2qyuyZ 8I1huT30LSUNGQRWhSG7ehj0bbh0OrF+Yf257m7kOivTEDZ53dtqluEdcqxqvPkT KIfiPo67hRBvw+GY1IAmuLaOfFNczHgNJuk/4aZ/S41F5MnxnicTGCdb6YcF1NVJ fgqdhADST+G+KrKc7QWAB2nx7u9JxXCfj/KoTG7ozpKOwDQrFvQDyraAnfgQi+y9 L3vi2XQgACUsFuqf1UKWVRSFHK6LZftPcTNSRlnSYfnA7TKzvWNYWJ4hmxTN1DpV cDYlrOOYdCwmywLgHDnX11orZXznL9gsAyOwiOK80I5vbvPfJblVjh0GM+gmCbX7 WlZA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1680104541; x=1680190941; bh=g4kHrEowDgNpf JvpROnRHbgAmyyUXv8cp51hnQwqNfA=; b=G6aurwmS0jGXgg6xfGzlXhXc074VI 5csONtOtQLbIfhmW9ovxiLJnN0i/mdQWnI+A2ZF6SqAURLaGXfbyQsSjOjsdsQvf Q+2aVFyao1llljQqEHEwl5Menwgcoxv1p10tJ0UtW5VMvnXSOs2E9i1sxKm9ChVi sIq+cmazwFavNVf2npM9YIyLadxnhazH9tHCBs7HC13wbfqqfefVvWeUHDniLsOv cXriWZWgAvw42kggofzDmj77CJJmbMY0tNzqPor9DzoGFmChResCKOGelKGcQaeQ 8OmUgKDUVVs0MP+OHBMZRxEA06ut91kUSTMsfBdS8b3KywC4gueJIdq5g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehiedgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 1EBDBB6008D; Wed, 29 Mar 2023 11:42:20 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-238-g746678b8b6-fm-20230329.001-g746678b8 Mime-Version: 1.0 Message-Id: <9a456346-e207-44e1-873e-40d21334e01b@app.fastmail.com> In-Reply-To: <20230329151515.GA913@redhat.com> References: <20230328164811.2451-1-gregory.price@memverge.com> <20230328164811.2451-2-gregory.price@memverge.com> <20230329151515.GA913@redhat.com> Date: Wed, 29 Mar 2023 17:41:21 +0200 From: "Arnd Bergmann" To: "Oleg Nesterov" , "Gregory Price" Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linux-Arch , avagin@gmail.com, "Peter Zijlstra" , "Andy Lutomirski" , krisman@collabora.com, "Thomas Gleixner" , "Jonathan Corbet" , shuah , "Catalin Marinas" , "Will Deacon" , "Mark Rutland" , tongtiangen@huawei.com, "Robin Murphy" , "Gregory Price" Subject: Re: [PATCH v14 1/4] asm-generic,arm64: create task variant of access_ok Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS 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 On Wed, Mar 29, 2023, at 17:15, Oleg Nesterov wrote: > > This look as if access_ok() or __access_ok() doesn't depend on task, but > this is not true in general. Say, TASK_SIZE_MAX can check is_32bit_task() > test_thread_flag(TIF_32BIT...) and this uses "current". > > Again, we probably do not care, but I don't like the fact task_access_ok() > looks as if task_access_ok(task) returns the same result as "task" calling > access_ok(). I think the idea of TASK_SIZE_MAX is that it is a compile-time constant and in fact independent of current, while TASK_SIZE takes TIF_32BIT into account. Arnd