Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp604352lqp; Wed, 12 Jun 2024 10:30:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXQr/zuIhaEZHIyilqB00Ktw2eLdqBTs4wun3m1WGRXQBwZlXGG+FEeY36ZWKA+fQZpblun/r3fgI2y3SapvF9+lNXkbj/mAXfm7fp1Zg== X-Google-Smtp-Source: AGHT+IGXbbaxjoqnqkLZqleWAwOgIajnACako/NCB27VS3UxRXaxy3aLacgCkk2cBFKBRQb3T7ny X-Received: by 2002:a05:6a21:398f:b0:1b7:edea:e3f with SMTP id adf61e73a8af0-1b8a9b65ec2mr2926156637.12.1718213439317; Wed, 12 Jun 2024 10:30:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718213439; cv=pass; d=google.com; s=arc-20160816; b=qHo7oYHt+uwRR9gGENR4/NO+KuJRnBgejqHiLvTo0O9qaoBbmzKSjuIVNETi5vXuMJ 7A1XwjasIxNvA3bJgnANcI/UI0ffZFXrCZke4fej4xesxAsS4e+cZtVFtDMa6s5nq2FT a1OthoOe9CggGlaiu3jU/2fj7/q/sVUOPSPDi9R8EUrKOJRiII6nTAN19b4ymfpyOAkX SaQDqyAn+/iybHASOc8WG1cGud5q+/IQL3V+cKlaAAoEPM+fKi1ytRofckw8CXvfbBIF 3hxZqcm8EEANs3d758X3nknBfdcj/+yFf3xgC2u7FApFq8e9+2OG7qGlfSGYg0qzlcex Fwdg== 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:sender:dkim-signature; bh=/7EZE8kZJ8YwXGxhpq3/arcNZCvvFBiX+mbM6jw0kdY=; fh=DcekzUyrm70a2kK0BLhlPqtrBRHBfZMEMCS8blUrKh0=; b=KIHMTITLlszaH6gZIYuHDTbW+OIXwSJzrJQX7triw0wGez73lTLLwagZvxaYiu5MtF wKt98E99i50RJ9XlSXVwGfMk3cFxGxM6PMdHfyBPrQRTawfGJwlAxFRq7wEay4wSUs89 IseadphbR12DChRU44/PdxoPLFZ38jUnNXDUz3zy5hvsXZ0Oeg2cruaD+90VwLGqcZJ/ nIlJvMBg29IB5emmiWA4DVCf1X72GESO1B3wr8dLFws2t+nbU19YAVLIBNAvOXtNCLd5 ETUkQW2EvJZ7Eh+TloYq9ETV945aqCGqfNsPXqNh6oWJLsqm56rpjH3O3PJE0Azzzu+C Y+Xg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=l5T7VXSb; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-212009-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6eac1dea979si7120265a12.102.2024.06.12.10.30.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 10:30:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212009-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=l5T7VXSb; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-212009-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 4434A285B64 for ; Wed, 12 Jun 2024 17:30:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05810183087; Wed, 12 Jun 2024 17:29:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="l5T7VXSb" Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD29B1822D4; Wed, 12 Jun 2024 17:29:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718213376; cv=none; b=MqOkIgAYhwjza4QwWA1F5wMV2VlfXwC6hMXXJpy2D5rYOyxNU8U6w65NnCc0/W46L9vfKs7basI7onDoanu1yzp56CWyRRfOIZQwXOG7eoNjOE870EX800PEbf2/aGUbtEJw6LCnt4S6WbNnXRqBpThZBXhXBjzyiev3EHiw7IM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718213376; c=relaxed/simple; bh=Ba6GyynrpGuIi2Xb7JlSRrHrUtyBqSQwFHKrMZhcRb0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MxYpD4UQhiFeT2OkNLmjIbFR8l8fm1rcggJXLBbbvfaUPWc5WxUz8p4kNSFKWvv1AVx9e23KpFp95L5w+lnHBCvLMdr8nxnpP4VQpD+GVvKmIuMkZTWI0DXC/C9nviFNX5BY/7LtVdf6gQgs1V6jLZdiF9T6j6XHAfJxqBqBiKQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=l5T7VXSb; arc=none smtp.client-ip=209.85.215.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-6e7e23b42c3so51906a12.1; Wed, 12 Jun 2024 10:29:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718213374; x=1718818174; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=/7EZE8kZJ8YwXGxhpq3/arcNZCvvFBiX+mbM6jw0kdY=; b=l5T7VXSblow1UfHW7uXzGe8JE9/Fu95k4EG2JKAuDFqZIpd/LTS+PvTjurrPo2YF86 yTXvbyHadkhA37K8PNdhYGUmWFeGtA5SV4HvDUGm4sKuG28oMwOwR6fFi7je7eaK6RM/ sqLvAGlHiOb8O1KwH4QOCuGEhWiEMC5PXkLyXrSiBl1gYLRxL/mQxxR3+YOkwRq0EH9v Rvtgladx4GBLBtJ02DvlfYk7q6gQs3lnf6kIx50TgpJWZs2FaiTl3135EnPkNgjFcrNy PLz2epUJ/L1YUYNO5FJnJA21JOAjGLZ2kM7rM4bYqb7rY6HR+dOkBiN2YcRe826VDmfk 30lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718213374; x=1718818174; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/7EZE8kZJ8YwXGxhpq3/arcNZCvvFBiX+mbM6jw0kdY=; b=Z9MhGeeT+RkDPwvKpN7sKzmwDJJ/PchxAOC/UxlDDyUEg77mkRYmUPrKciDo+ve3E4 rd0x7mBYP7ypnhZv4n4hHBfKeyJ7gQwjzs+XTbwbTH9/tCpYAX3t0xjesPjeqna2p+Fs dPOWD0HaO9eveXOZF52Hwp6NgHZNI/3Ntz0zOXB0JMsWmXwJHoG5MvSylmJTpCr+tTqM dEaGAiNj8AeYUDcX9xhzM2nubymDeJs1TrwnZcZ9KGoT2/+Wm7+32gW3/bA2gfwBVb94 MHiY8dKYte6CGPymy6F4VeI6raIXLoOgtFH9q4jJiNECC52Hsdess6AA89sEY416DJdc Q5XA== X-Forwarded-Encrypted: i=1; AJvYcCVrlQTfePZyknSgT4Jh36Yeuir/xfChUGN5nt2dfA0l5Uzav1GzbFeRF0kp/+/9is2ILBKNhZTDpEzVT2Yc/VaVHtdCzFfm6tNRl8NF X-Gm-Message-State: AOJu0YwqWmywzFh9z+0CEA1tfT+a4J+MT/14/Z8GrGcPBFT6i74JnvRW hyqJ9H0jJsfhZh8BSeLqeXU7y2da8eG0jXYYhjODu8CcWZSPgMjE X-Received: by 2002:a17:902:eccc:b0:1f7:3bb3:abb5 with SMTP id d9443c01a7336-1f83b64ac13mr27474335ad.8.1718213373929; Wed, 12 Jun 2024 10:29:33 -0700 (PDT) Received: from localhost (dhcp-141-239-159-203.hawaiiantel.net. [141.239.159.203]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f72a6c5a5fsm39546885ad.233.2024.06.12.10.29.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 10:29:33 -0700 (PDT) Sender: Tejun Heo Date: Wed, 12 Jun 2024 07:29:32 -1000 From: Tejun Heo To: Martin Oliveira Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Jason Gunthorpe , Leon Romanovsky , Greg Kroah-Hartman , Andrew Morton , Logan Gunthorpe , Mike Marciniszyn , Shiraz Saleem , Michael Guralnik , Artemy Kovalyov Subject: Re: [PATCH v2 1/4] kernfs: remove page_mkwrite() from vm_operations_struct Message-ID: References: <20240611182732.360317-1-martin.oliveira@eideticom.com> <20240611182732.360317-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: <20240611182732.360317-2-martin.oliveira@eideticom.com> On Tue, Jun 11, 2024 at 12:27:29PM -0600, Martin Oliveira wrote: > The .page_mkwrite operator of kernfs just calls file_update_time(). > This is the same behaviour that the fault code does if .page_mkwrite is > not set. > > 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. > > There are no users of .page_mkwrite and no known valid use cases, so > just remove the .page_mkwrite from kernfs_ops and return -EINVAL if an > mmap() implementation sets .page_mkwrite. > > Co-developed-by: Logan Gunthorpe > Signed-off-by: Logan Gunthorpe > Signed-off-by: Martin Oliveira Acked-by: Tejun Heo Thanks. -- tejun