Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1444605rwd; Thu, 25 May 2023 12:43:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7QUBscCNQasCH5+wp3ztwi+/3U0NUAcGwpS2WTj8Ek+hhiTV3NldqKH30G7x5X8NHl9T1g X-Received: by 2002:a05:6a20:1602:b0:105:4206:7062 with SMTP id l2-20020a056a20160200b0010542067062mr26404258pzj.42.1685043795890; Thu, 25 May 2023 12:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685043795; cv=none; d=google.com; s=arc-20160816; b=hkgIFNeYfkVTJQ9jrHd8mc/B9rXnxxw4EexHDgu4/kzK1N61EuMNojd4ctrhcl5vW3 T5+91vKpjoSWAyYCnXZTlrLoWom+v9RB+o5oAXAz7NjU0SikDEdPBmxBgizSXgEzN5uQ Hhc3s+0ql6Vm2d2WK04FEcTaVHoIaTsAmACvgZmzIwelc4FgMARptaJ9RPVNW7q3b80K 4Hk3QZBTXULwlpRZE1AMYzFPQFxPJkdq3X1cR+6fuJ6exX3No0tcT1lS6724y+ZIAyW7 cC8nAosQdQQIwjhrF/SSm/NIN3iX7tgk6nUFlHd/dEjsEqHBIwpFBVG3VvJyQHL6pkAe QClg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=3UfPchLUYdWy9KCje7JNWMJZu0GBbqs1XHhZyb9Elpg=; b=oJfR/HBf5DV33cVD1uKklSbv315xl7nm/BjaRPO7sRP7gPXze8X4TBK5ZDh479OGPM wle3Zl98CP9notsnx0OVOxUEbipcO+ZO3Rl69EaCHaXiYk9WqX3ueCAuGl6P7wMQ692b o+EQACNWYfeLhrvI/tt8mUi1wfnSGytZUnTRSLJQh5NAZh3I2xBWaff6hIciS8YqNDA3 PrbvFm78hJA8Ra6pTJgHO+nbJ9gGwp4QuPOxSv7zW+83OMDemr+N3CieFQ7vE0poMrl2 UYqUPvkbPXh4VLkKNPF5U4CN/zS2m3ZjLFH4w4G5Wq5MaXqM1re7TllTynkYbdO1risr voFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=dREWFlMg; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s27-20020a63925b000000b0053ef2b7f24asi1941561pgn.109.2023.05.25.12.43.03; Thu, 25 May 2023 12:43:15 -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=@infradead.org header.s=bombadil.20210309 header.b=dREWFlMg; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242064AbjEYSia (ORCPT + 99 others); Thu, 25 May 2023 14:38:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241969AbjEYSiD (ORCPT ); Thu, 25 May 2023 14:38:03 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90A451703; Thu, 25 May 2023 11:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=3UfPchLUYdWy9KCje7JNWMJZu0GBbqs1XHhZyb9Elpg=; b=dREWFlMgPsOScdh4mHYj5vpNlw HeeuA9W7TI40gjiRe+mbNwDH9vWaRtED9kNXnJ7Eusr53g6BtLAuotQypKw9DJH2uep7C9CpsQ1TQ bllam3AtdkUmxLMZlhm16mC05+GB2+Gk4N6vp43KXCjFQaya1hE5GmKX/HKra0P2wBWWcjHIEo1V2 3QPjca4/AhFY57yNLeouXSnrY3JLPy6ofCSM2oqccSgpfEqxBRP9wS2qzKiS/7ETGDwKvXWJBCVSf eqlNosa0U3phxMepSLIM4URGOCcoENiqxjZrTOQyp1azZhXnTh3gdW9Ek2FpB4L2sCBWcXpjL3ZiV CQJ4yMnw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q2Fnt-00HPwi-2H; Thu, 25 May 2023 18:35:13 +0000 Date: Thu, 25 May 2023 11:35:13 -0700 From: Luis Chamberlain To: Linus Torvalds , Linux FS Devel , hch@lst.de, brauner@kernel.org, david@redhat.com Cc: tglx@linutronix.de, patches@lists.linux.dev, linux-modules@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, pmladek@suse.com, petr.pavlu@suse.com, prarit@redhat.com, lennart@poettering.net, gregkh@linuxfoundation.org, rafael@kernel.org, song@kernel.org, lucas.de.marchi@gmail.com, lucas.demarchi@intel.com, christophe.leroy@csgroup.eu, peterz@infradead.org, rppt@kernel.org, dave@stgolabs.net, willy@infradead.org, vbabka@suse.cz, mhocko@suse.com, dave.hansen@linux.intel.com, colin.i.king@gmail.com, jim.cromie@gmail.com, catalin.marinas@arm.com, jbaron@akamai.com, rick.p.edgecombe@intel.com, yujie.liu@intel.com Subject: Re: [PATCH 1/2] fs/kernel_read_file: add support for duplicate detection Message-ID: References: <20230524213620.3509138-1-mcgrof@kernel.org> <20230524213620.3509138-2-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 On Thu, May 25, 2023 at 11:08:13AM -0700, Luis Chamberlain wrote: > + fsdevel please review, > So with two other hunks added (2nd and 4th), this now matches parity with > my patch, not suggesting this is right, just demonstrating how this > could be resolved with this. We could also just have a helper which lets > the module code allow_write_access() at the end of its use of the fd > (failure to load or module is removed). This even fixes the pathological case with stress-ng for finit_module: ./stress-ng --module 8192 --module-name xfs (stress-ng assumes you have all dependencies already loaded and the module is not loaded, it uses finit_module() directly) Luis