Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp640981lqt; Thu, 6 Jun 2024 13:54:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXwKM3wYJQWIO5TdlPfm/WIGSz3pLmBFud3HdnxCnNVxgUZ20GgAE4G6yXbCIMzReuUt+i67ovmiyFzrrLGWVS/tdnQj5JGcT02gfNG3A== X-Google-Smtp-Source: AGHT+IGcsiIV4KP0xjH1cZuBQdY6rJny7M8CiCp9+HjN0I4i8P41lU6sJTuP8Nzjzo8mUZdp9IKa X-Received: by 2002:a05:6358:6f87:b0:199:36c9:b3f with SMTP id e5c5f4694b2df-19f1fceb6bamr97685355d.4.1717707261792; Thu, 06 Jun 2024 13:54:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717707261; cv=pass; d=google.com; s=arc-20160816; b=Pa/ILuBMC18/nCb3ECOaGov54PxKMZOQwkqFLJ36qVnR0+ioe+96Ib6zaPrY42Dh8L qJJFZ+nm1aVXB8ALl6Y2gHTspC0oINj961VWIMzrcnTKAjVGom0umUL3lxI1K285hSZA 5TSuw3VxMoMbN0UJGfbHzifcUkzyBZnAbzPgiaxhGSmYDncwxSsZ8iHjaX5yzoqdayX/ ObKig3jZ/QKx/DNRbw6QvVFxGyfs/Bo5PQv94s8peTuafkqdx7ZkHIzIgTCZPbIOGMre WSQkSCHqNuU4aVdWlsE5Mbdy8sZlM+r8Db991S1f9QKopy36xKh8IhFF0e9tw3BUNFkN AAWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fLVuCQX2DNezLS2JHa31w+B9qkLac0MTzxigY7z1vXo=; fh=ImK4vWF1NeIeWyTR+pCj5hOyFT7t97++wsuKSlCfcEU=; b=hpMlWtnPn84Poec7ShZC/3jWAB5TzhIODXN+fJkCYMUsqorQRB2Pw8pJrYeqhK093m eeTD7xde02aCp1aUUuWlJqnfRqUJ+PJ3n9TnvgncJjf2L2oVcRrGDMCRuRlc6aNpdxJD O6plnwH+LIEq5+7xc8h3ApuZK6xuv3fwpRxjEHsn/Keknx66JPxnb34orwvaI9d4wiDc 6y5+y/usa04dvC81ZiiOd3Whc8GJJp2eMgu4pJhhorwumscrcPagpGcVRyUQQlBbcGZA goU97d6ZVEAsag0RDczOxagL38f4F3fl5m/Uz0JeG072a0+b2Tuuylh9gMuu8oRpxfY/ sv0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A6kyP1N4; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-205009-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de28955e82si1675673a12.606.2024.06.06.13.54.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 13:54:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205009-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A6kyP1N4; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-205009-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6192528664F for ; Thu, 6 Jun 2024 20:54:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0BF5913C3C4; Thu, 6 Jun 2024 20:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="A6kyP1N4" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28E7B6F06E; Thu, 6 Jun 2024 20:54:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717707249; cv=none; b=muizLf7rpNZoT3jwdVC0lzFlPt3LwwUVp2FTpfVP977F5SeXWFxaKACp1RKPZZtNIMX529oIdCLgiLcJBYnhuKGR86glxA3ERrhj93McoN9w7Il7aYuZNb8LjJRcXza/0A276kRMwqPFodLG1w2K3aDFznqs2s/6lCcABl/Fg2I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717707249; c=relaxed/simple; bh=UqeI96+MM5X3pqwCptXH2eQJ3yuc1OFxEnYiSX/y3zc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OThTK7TeDfB4FDEef+Pq4zdCh0CoNe++cWG0bzYJFMCdbGf9WkY6LS3fljVegBAXcHL8Js1ICIr6HxFd+Mz1WfeqkGidY/73hTKHODIJcFD0A4B8/th/MpLyE8P43+RWSM36gRr/XI1cTzqL4ILyKwEP6GY1ad2SUtC3PsBY/mk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=A6kyP1N4; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59061C2BD10; Thu, 6 Jun 2024 20:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1717707248; bh=UqeI96+MM5X3pqwCptXH2eQJ3yuc1OFxEnYiSX/y3zc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A6kyP1N4dXj3GzUHpLannf6y6D/DZdpilO3+TVH+Fi8roM8Aj39obTruHOHQheVuo UJwXzYsvbA9zFqU5zAV9iT651Za7HI5PQpS0joWloWlz6gfYZXd5/Xg1juzOG9Jn4T 4c7WbLPv3KG8D/bcooMr+zVEgBpvvB94WvCxd0eE= Date: Thu, 6 Jun 2024 22:54:06 +0200 From: Greg Kroah-Hartman To: Martin Oliveira Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, Jason Gunthorpe , Leon Romanovsky , Bjorn Helgaas , Logan Gunthorpe , Tejun Heo , "Rafael J. Wysocki" , Andrew Morton , Mike Marciniszyn , Michael Guralnik , Dan Williams , Ard Biesheuvel , Valentine Sinitsyn , Lukas Wunner Subject: Re: [PATCH 1/6] kernfs: create vm_operations_struct without page_mkwrite() Message-ID: <2024060658-ember-unblessed-4c74@gregkh> References: <20240605192934.742369-1-martin.oliveira@eideticom.com> <20240605192934.742369-2-martin.oliveira@eideticom.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240605192934.742369-2-martin.oliveira@eideticom.com> On Wed, Jun 05, 2024 at 01:29:29PM -0600, Martin Oliveira wrote: > The standard kernfs vm_ops installs a page_mkwrite() operator which > modifies the file update time on write. > > This not always required (or makes sense), such as in the P2PDMA, which > uses the sysfs file as an allocator from userspace. That's not a good idea, please don't do that. sysfs binary files are "pass through", why would you want to use this as an allocator? > Furthermore, having the page_mkwrite() operator causes > writable_file_mapping_allowed() to fail due to > vma_needs_dirty_tracking() on the gup flow, which is a pre-requisite for > enabling P2PDMA over RDMA. > > Fix this by adding a new boolean on kernfs_ops to differentiate between > the different behaviours. This isn't going to work well. What exactly are you wanting to do in sysfs that you feel this is required? thanks, greg k-h