From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 56A0D3A0B2E for ; Tue, 23 Jun 2026 06:11:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782195105; cv=none; b=fftgVM4UhOk29JOkQcmRbgZw7KI7yF6exwRRrqAirDOb2zyzCgaFCl1smTL0yqcxZz2y5Qte+EzFqqPkOMZkkpkFXgkSFwIF2xFq24EeEenXsyc3ra120I2XyOXFfjqVkrF48PbNU6prn3et43YjaQajHcX8uRomLW7WxPAZx0U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782195105; c=relaxed/simple; bh=lbPIcbZwWKO9mggxTz7p3Nf3bUnQJxUwEnf9iEg+jNs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KkmlT814S5MT+i0bhKKb1W5X2qTkEeaa+GEIEl/0chcLSYq0PrAuBjPOokus4oHjbX+dka7V0mq8VZGXOYN5AiKhxPF+Py5cxz8B+OloF5dVExUNSH3ybsxVKnWCqbUfSxSVY4kgqqFViOtetMJ44Dizh28n9Nf+MEIExPT4Vos= 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=W/lpISAD; arc=none smtp.client-ip=209.85.128.47 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="W/lpISAD" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-490b613a17bso42799115e9.3 for ; Mon, 22 Jun 2026 23:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1782195097; x=1782799897; 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=gEWRyTTg19ufsww9mTBAfvx9IHHIlg0mdl0hqLyxq/0=; b=W/lpISADcxduaZNlocdKjZzyD3/aYeFeFse0gyPD6hliSxtm3l/HldHzEkne38zin2 clRIZPQyy8YlF/4yIDZ2cWzxhxICI0DB9g//8m4H8JIniWoXj4iDpkR8iXoBRAZRAX6e RCkh/hk6hpOeN4OeklOD1VOdqUIgv4ZOpHoI1nskcoBeXa7po1jxCqFgDPAMIZCTxnG8 OQ67VPfh1DmZ1XI18rr2MUH5oTTYTCHs0Jz7y6oXnCioTw/plVsP+36nXBPt7ytF0VUQ jxlMy6GYftVkIlxvIjr/qv9NDXnB2cCKLojB5MHlZ4LGpMzdpwWlDwRkQdzrcKpzWk3B 8NqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782195097; x=1782799897; 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=gEWRyTTg19ufsww9mTBAfvx9IHHIlg0mdl0hqLyxq/0=; b=okjv6VjDyBQJRs4lks9xF2xgeqORyjUbQJB+0K27/bv58kkVFCwAUIDD+DHlbFaLKK u60X9EsPj6QM1uDCbAmxjsECXIIarzIoMVBSsNMWlbkm5EH/x40h7Bko9SPRsT4jk/Yn jbQaXQ+/mCO3v3idH9Kkn6b15nI93zumIAK3hpEx2zLJ9sXSm6JTUAxQEM59+/LxxUxK AlBRaFF5YJnqgdlsCoS+QPbcXXBWVv12vsC9WS88lXLLQESxMqk3ApgvQgIZ4vfZhu9g jHXMtPkWZj+uYtgpqAa3d9oQYB1+da3+dj9VK09vAUkdFbZvgakV2vqLdKScPWZ25nJ5 EliQ== X-Forwarded-Encrypted: i=1; AFNElJ8aB8p8GuIRLUdRHSFXRw4AluiRyd6Day4KKj52med208ki+C1hK7CKzk2gIIzP8cRomeDCm97kBoPIac8=@vger.kernel.org X-Gm-Message-State: AOJu0Yxb4MsD/s2hjRNuqRllOyhjVIJZF27Is/WxzdOdMY9kdQJgPRQ8 KMW+nelUZort1SL8oNCjkOMY8GbxxTT/nmQS0AyPCLKU6dv9IAxb0ffuQ1wiuHKl1q0= X-Gm-Gg: AfdE7cmrf/puxOa45RckbqUg06bI/JBPgYa7f3BSl3rJXNTgnGRru0UQVjJ/9nNjUhx /XYeYlWgnmS1K3sY9b5b41QwsjjgArkhAMK2oOS0ctFe9M1SGyGBcbejX8np6i0JRYvbaNrOAHU JTcBdCnn5aRkntDDF7FmZYXvMJDnL+CUYs9XLCVMvvo++ZPzDDhXB0yQITJpMrZy0DRud2zFK9O 7ceNWyj4C73m/YcBe/+zGjL1rIR+XxeC9IkWb3lyF6n1I0kDOMOUEtKXcZ+FhblvOmCAIPn2jE9 kJR67Il4fbB680b3LDq1/s52TOF8LGTEXRN/18nimoOnzz+j8BQ7f0IM5eAV5xKlpsSNMmcQwzE G4Sg2oJEdOg+uk5bau03JLdpXCkTIr/lQK0U9FdBeaU//xpOKHNb6Byohk4btg59WkhuDF2mUP8 ePWpw= X-Received: by 2002:a05:600c:4694:b0:492:4717:59fb with SMTP id 5b1f17b1804b1-492490a77a4mr214171985e9.17.1782195097216; Mon, 22 Jun 2026 23:11:37 -0700 (PDT) Received: from linux-l9pv.suse ([124.11.22.254]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-37d1aa48f04sm2986708a91.2.2026.06.22.23.11.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2026 23:11:36 -0700 (PDT) Date: Tue, 23 Jun 2026 14:11:30 +0800 From: joeyli To: Disha Goel Cc: Chun-Yi Lee , "Rafael J . Wysocki" , David Howells , Lorenzo Stoakes , Andy Shevchenko , Thomas Gleixner , Matthew Garrett , Greg Kroah-Hartman , Danilo Krummrich , driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2] debugfs: Fix lockdown check for mmap_prepare Message-ID: <20260623061130.GA11413@linux-l9pv.suse> References: <20260615104750.1000-1-jlee@suse.com> <30561ae5-1e6a-4cc2-99e2-436c88b2f11d@linux.ibm.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: <30561ae5-1e6a-4cc2-99e2-436c88b2f11d@linux.ibm.com> User-Agent: Mutt/1.11.4 (2019-03-13) Hi Disha, On Fri, Jun 19, 2026 at 04:41:57PM +0530, Disha Goel wrote: > On 15/06/26 4:17 pm, Chun-Yi Lee wrote: > > From: Chun-Yi Lee > > > > 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`. > > > > Since the conversion to `mmap_prepare` across the kernel is not yet > > complete, update the lockdown check to look for both `mmap` and > > `mmap_prepare` to ensure comprehensive coverage. > > > > Fixes: 651fdda8406d ("relay: update relay to use mmap_prepare") > > Signed-off-by: Chun-Yi Lee > > 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 > > Cc: stable@vger.kernel.org > > --- > > Hi, > > I tested this patch on ppc64le with lockdown enabled. It correctly fixes the > security issue where debugfs files using mmap_prepare were not being > restricted. > > Test: blktrace/001 from blktests (uses relayfs via debugfs) > - Before patch: blktrace bypassed lockdown and accessed debugfs > - After patch: blktrace properly blocked from accessing debugfs > > Environment: > Kernel: 7.1.0-rc7 > Lockdown: integrity mode > > Feel free to add: > Tested-by: Disha Goel > Thanks for your testing! Joey Lee