From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 A901837474E for ; Fri, 12 Jun 2026 08:56:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781254602; cv=none; b=fhRyJekQ+c77ufIzmrqZqA6ftGqxWGK4ICBioiEBuE0GQrfg7ezbKqQCJ2YYrY+VBDgi0w4kwhxs/N+Mx2d5UscoG+GNCLiks0tafa9VYQ7f6ZGxTFQuscGEPgy0Z+Q5f/h/jItpPzg1Qik9BMkfStwBlrl1UN/ko1pB/KPGbMM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781254602; c=relaxed/simple; bh=izApThMnkGomAbHMNy7dSnB84greHvo9TN/4/HGY7jg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VUOkIKYi1i+Ii5MAducWbFRyCnDKe8m2Fqycg565cU/3ogPRlM9V5CzJHIIhBLJ/lqCvnM93P8NaiysoPBmKkzySG6bpvIhdSEAqV4P7gZXOXlHmCI6GCxApmlGOjLvGsztR+7BPUf3G/nOcDG9A9WVS5xVPsTh93g4L5RQJP9U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=eR+N7lB7; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="eR+N7lB7" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-490aebf33e9so3120795e9.3 for ; Fri, 12 Jun 2026 01:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1781254598; x=1781859398; darn=vger.kernel.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=njU7SwokzXLnAOAvKiJOLoJhBijRof4SaZzq2UEzjN0=; b=eR+N7lB7Q6XrXNlnrOmnoMUXoWIXBFJCOZjpJql3vQBw/wRiqy/TkNoL3njkp6JK7z yPxTEjjdSUcWfbakdeP67yiU/veOiEESLdRXNFruTS4mAuzVwo2A52BtW9xWgHsShObw S8Vl+b8shJpqi4wp71B0tW3d59djnE5Bd8JIUjoOxG2krJvD5cXxk+Df41pwsrGM0z/n xC/JWionvDZvoe89CrN+w7xTDoijEGnk7I08mGlhG9oIwIm+d10Gwwb+1XAVkJLGz5ht FYhuZT5yNDFLSOPOBitVhgj21ifKr2x8sKQtEhpceU1xZzqa1f6Fo6AxaBjX8VFMBGUX nfAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781254598; x=1781859398; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=njU7SwokzXLnAOAvKiJOLoJhBijRof4SaZzq2UEzjN0=; b=OeUYz5XwBrcq6Y6XiSDNgrcXdvvuu+153rTgoh2CywULRj99KmXGCTD+dLuQ2/xFQ7 qsh0l+inB9IncSEwAbhiUBbfpyXptskIEdI4NsHe0bc/yocYgQUSVsuU+PPkbHGwu48k Mf9TlIFfXOzxzN5/5W5pREip6Ppqo4CNcHhUfP+tHbvEbCu68mQA64/+F2VXYWZzWwHR AKT1upp1Pi2bZtdp5VmqDcBjcYx6u9MbRvydkR/77trza4hqUdg3eob2UlQeW+zd1bzs NJW3wZ4VwCxaUoapMczqaBx1+KJLm889247luVQIApiJqNYRv43iGO43rTKyW1oBgn43 TnvQ== X-Forwarded-Encrypted: i=1; AFNElJ9v5lnapHXdQhgZ1ouR4TM1HECvvX6HREzih7QleEePnqYfl7a387EoIv0uygska2jvPa25q8L18uVcCeM=@vger.kernel.org X-Gm-Message-State: AOJu0YwTO28eYkFvzzABUD6BfiwuNWGm/KqMSA/DSJUYKowqkaMJwGQK VHagxosNYiFVQFMGofUfuOat/cAiyCWxV5BwWlKdpcaqUKPddOZGqbMEDuhGdRVWlag= X-Gm-Gg: Acq92OFQaaVjKNbp4XscBlYrBi0dus2LrbOMFsF4cGK5oFNRKZP4yEM3r7oBo5HIagF zF+538guOHDvQZKC2acMr2gmJ6hnKp2Nf2Zzrn89JS8OIyhGNAwbyum6sn+NL+NG8Acjz2HxInt epUNJcuRfk5tQfoc7utRChwBU0Qe/B5c/3f/TaIx+IIDduS+DgTRMrP6faYgyl6/T76atXYPGrN FASDjY7MmOGCgrgYh5DXCfDYWkifehipRYB2jstBRzI6stgLT2iWLHXpbEvpLjecYQYYOgsWn3U sqPdj/6auUFGoJg2z+TjzYCqeDo3GHzudI0eVGQp5xg1I0YBpp5JEvoyC2dbav5f6/XOdl5VBhC 2zStpA30ON/E/D5exkGoM6WB5ZP6grZjlIwL1ABmiLDhw+/Xk2xF7bQlAOKAo8PNSXCb8TTD4+A KFXhqIoFEG52vIXg== X-Received: by 2002:a05:600d:8653:20b0:490:c032:ae92 with SMTP id 5b1f17b1804b1-490ec50ffc3mr15206145e9.33.1781254598006; Fri, 12 Jun 2026 01:56:38 -0700 (PDT) Received: from linux-l9pv.suse ([124.11.22.254]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3081e48c3dcsm2583094eec.1.2026.06.12.01.56.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jun 2026 01:56:37 -0700 (PDT) Date: Fri, 12 Jun 2026 16:56:31 +0800 From: joeyli To: Lorenzo Stoakes Cc: Chun-Yi Lee , "Rafael J . Wysocki" , David Howells , Andy Shevchenko , Thomas Gleixner , Matthew Garrett , Greg Kroah-Hartman , Danilo Krummrich , driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, jlee@suse.com Subject: Re: [PATCH] debugfs: Fix lockdown check for mmap_prepare Message-ID: <20260612085631.GJ11413@linux-l9pv.suse> References: <20260612055455.16894-1-jlee@suse.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: User-Agent: Mutt/1.11.4 (2019-03-13) Hi Lorenzo, Thanks for your review! On Fri, Jun 12, 2026 at 08:28:29AM +0100, Lorenzo Stoakes wrote: > -cc wrong email > > (Please make sure to use my correct email address - ljs@kernel.org - > I usually do not see emails sent to the incorrect one) > > +From: Chun-Yi Lee > > (You're sending from a different email address so you need to explicitly > add a From: xxx tag to match the S-o-b at the top of the message) > I will use your kernel.org email address and put From: tag. > > On Fri, Jun 12, 2026 at 01:54:55PM +0800, Chun-Yi Lee wrote: > > Commit 651fdda8406d ("relay: update relay to use mmap_prepare") > > changed the `mmap` file operation to `mmap_prepare` for relayfs, but > > the lockdown check in debugfs was not updated accordingly. > > > > This prevents debugfs from being locked down when the kernel is in > > integrity mode if a file uses `mmap_prepare` but not `mmap`. > > > > Update the lockdown check to look for `mmap_prepare` instead of `mmap` > > to fix this. > > > > Fixes: 651fdda8406d ("relay: update relay to use mmap_prepare") > > You need to explicitly add: > > Cc: stable@vger.kernel.org > > As we will want this backported. > I will add cc. to stable mailing list. > > Signed-off-by: Chun-Yi Lee > > I think the idea is correct, but needs tweaking to cover _both_ mmap and > mmap_prepare, until the mmap_prepare conversion is complete, see below. > > > Cc: David Howells > > Cc: Lorenzo Stoakes > > cc: Andy Shevchenko > > cc: Thomas Gleixner > > Cc: Rafael J. Wysocki > > Cc: Matthew Garrett > > Cc: Greg Kroah-Hartman > > Cc: Danilo Krummrich > > Cc: driver-core@lists.linux.dev > > Cc: linux-kernel@vger.kernel.org > > --- > > fs/debugfs/file.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c > > index edd6aafbfbaa..d5e187895dd8 100644 > > --- a/fs/debugfs/file.c > > +++ b/fs/debugfs/file.c > > @@ -273,7 +273,7 @@ static int debugfs_locked_down(struct inode *inode, > > (!real_fops || > > (!real_fops->unlocked_ioctl && > > !real_fops->compat_ioctl && > > - !real_fops->mmap))) > > + !real_fops->mmap_prepare))) > > This is not only applicable to relayfs. > > So while we both have mmap and mmap_prepare, this should be: > > - !real_fops->mmap))) > + !real_fops->mmap && > + !real_fops->mmap_prepare))) > Yes, thanks a lot! I will send v2 patch. Joey Lee