From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93979C71153 for ; Sun, 3 Sep 2023 23:28:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348902AbjICX2K (ORCPT ); Sun, 3 Sep 2023 19:28:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229653AbjICX2K (ORCPT ); Sun, 3 Sep 2023 19:28:10 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75D47CE; Sun, 3 Sep 2023 16:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=QOimqPZwEG4DywTpNJH+D9QUy1Cy+YniSscgO3ZWNK4=; b=lK2EYOk++M1SNvBijQY1YAXniK v5/I3lIsBQptyQ+ncm80Pm5liAan9eKtGKgOjfYckS73KRMenZf/wbKppUGhI5YbyposFEReVEopS HtawQ7VcQd7EUUHNafBFmh1l72w46Wn0T0IoVz1yHue/+CfskFEJmSHGF1FWr2qaYIx8vlgfGwtoO raJ7Zmrr+7pfO8uhWML9YDvBVoCe/qxp3d6cVsOFaOmQqyVS2A3G0fERW/lq+SNCXNDdgDWJbNaxn 1TBZ8+IRgIW01jJrYI6t7w4vNGt661Js14gAf7ymSYYbykTwAROur0PLHvSGiXdBdMbxuj2x0B4D4 jawzRVhg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1qcwVe-003ArN-2K; Sun, 03 Sep 2023 23:28:02 +0000 Date: Mon, 4 Sep 2023 00:28:02 +0100 From: Al Viro To: Mateusz Guzik Cc: Linus Torvalds , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bp@alien8.de Subject: Re: [PATCH v2] x86: bring back rep movsq for user access on CPUs without ERMS Message-ID: <20230903232802.GO3390869@ZenIV> References: <20230830140315.2666490-1-mjguzik@gmail.com> <20230903204858.lv7i3kqvw6eamhgz@f> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 03, 2023 at 11:18:44PM +0200, Mateusz Guzik wrote: > On 9/3/23, Linus Torvalds wrote: > > On Sun, 3 Sept 2023 at 14:06, Mateusz Guzik wrote: > >> > >> I don't think it is *that* bad. I did a quick sanity check on that > >> front by rolling with bpftrace on cases which pass AT_EMPTY_PATH *and* > >> provide a path. > > > > I guess you are right - nobody sane would use AT_EMPTY_PATH except if > > they don't have a path. > > > > Of course, the only reason we're discussing this in the first place is > > because people are doing insane things, which makes _that_ particular > > argument very weak indeed... > > > > I put blame on whoever allowed non-NULL path and AT_EMPTY_PATH as a > valid combination, forcing the user buf to be accessed no matter what. > But I'm not going to go digging for names. ;) ITYM s/allowed/mandated/ - AT_EMPTY_PATH with NULL is -EFAULT.