Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1372392rwl; Wed, 29 Mar 2023 17:10:39 -0700 (PDT) X-Google-Smtp-Source: AK7set8pX3HQGBHB0nWbK/MWVuhM57eMYTZqxjI61BClF/Sqd6n6TiIVktnkb5fk4+Sd8/wFw3e3 X-Received: by 2002:a05:6a20:2098:b0:cb:867d:1594 with SMTP id b24-20020a056a20209800b000cb867d1594mr18748951pza.6.1680135039115; Wed, 29 Mar 2023 17:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680135039; cv=none; d=google.com; s=arc-20160816; b=hbx9XhGuKPLjBT+E5p196BSLbLf6oebVpO31xhh8XAq9FoYn6sKuYqWszC3oRHGqct aRnKfIKXuk2t9NeBjzJoT3WEpA1aB48Fbcqwep6fC0FmOpi/d7SBIZHH6pjc2+5QHojN /Sf64hk1DjLlGizLgyRGotRSjiSjivbJq2U9fYvxQngZ1fTssORi9HTMbx+a4jcO6TFT CYLweeOYyrjZoSY8MZonml09YEC+kt8ujY63iI5KgDmNKpqce2rieHfeOy8CHf+z1ALK AMTOPx/KwRwRmM/b9YgK6Iv3ZfxAFHvQnN8j/a36W9zkT3kYCiG6eLujFJwBrd/lPdQW FB8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=YDvzU53CPeswLit/FMHu3YOxwiNaBZwdjQxKehJieKw=; b=LYedW3zHLPkJtwQawW9uL8soUa4I0nhxU3AWzGSIBpN7OssUGmx5uGzfFEJmXx5Tow eAuKs8+5eh65AVZGtXoLUrpy8A3elGOxbfZqkO1f+CggUCBmj1qOdfbW91wpSJP8tL4H 6IQMh9P0yLfhqQ2dW0BmYzepyrcVM/lmCT3QptIbuy+Ql6eCpI97UWCStGsJrlYMH4dp qvmAMNexsFFu95rZ7CC6YSm3NL9AivQRmpiU8fMfJF3+OIJojsnaYWlM42kEn5TZJ7Da s74DhxCTamKkzUd7CZNC0nEkCp/UbbRf/o0GhbeRZM013bikQwD5/D3vUbKJ+yAsviBm VP9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M4SuFubx; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 4-20020a630004000000b005030a59a80bsi34221925pga.178.2023.03.29.17.10.23; Wed, 29 Mar 2023 17:10:39 -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=@redhat.com header.s=mimecast20190719 header.b=M4SuFubx; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231281AbjC2Xzr (ORCPT + 99 others); Wed, 29 Mar 2023 19:55:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230474AbjC2Xzq (ORCPT ); Wed, 29 Mar 2023 19:55:46 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EA7159EF for ; Wed, 29 Mar 2023 16:55:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680134102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YDvzU53CPeswLit/FMHu3YOxwiNaBZwdjQxKehJieKw=; b=M4SuFubxzbQ1GDT8aKx1QmIIYx2Luv02KE16TChtGPwnmK5AIr6ZgrD9ahggesiKOpCA/C bIBAON2s2KGzwPlVKqSxTYLD//3+KjMlpjTmtaMnThH7wyYEEmnrZKkauJpksr+3gW66mF GEbSd3AC/nM3SBJ2HaHPl6LjlNmyggA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-658-gjbwPLEMPuu8BeS56HR0nQ-1; Wed, 29 Mar 2023 19:54:56 -0400 X-MC-Unique: gjbwPLEMPuu8BeS56HR0nQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C88EE3C0DDA1; Wed, 29 Mar 2023 23:54:55 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.161]) by smtp.corp.redhat.com (Postfix) with SMTP id AFE50492C3E; Wed, 29 Mar 2023 23:54:51 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 30 Mar 2023 01:54:48 +0200 (CEST) Date: Thu, 30 Mar 2023 01:54:43 +0200 From: Oleg Nesterov To: Gregory Price Cc: Arnd Bergmann , Gregory Price , 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 Subject: Re: [PATCH v14 1/4] asm-generic,arm64: create task variant of access_ok Message-ID: <20230329235442.GA10790@redhat.com> References: <20230328164811.2451-1-gregory.price@memverge.com> <20230328164811.2451-2-gregory.price@memverge.com> <20230329151515.GA913@redhat.com> <9a456346-e207-44e1-873e-40d21334e01b@app.fastmail.com> <20230329160322.GA4477@redhat.com> <20230329171322.GB4477@redhat.com> <20230329175850.GA8425@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 03/29, Gregory Price wrote: > > Last note on this before I push up another patch set. > > The change from __get_user to get_user also introduces a call to > might_fault() which adds a larger callstack for every syscall / > dispatch. This turns into a might_sleep and might_reschedule, which > represent a very different pattern of execution from before. might_fault() is nop unless CONFIG_PROVE_LOCKING || DEBUG_ATOMIC_SLEEP. Again, I won't really argue with task_access_ok(). Just I am not sure 2/4 gives enough justification for this new helper with unclear semantics (until we ensure that access_ok() doesn't depend on current). Oleg.