From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 ED9F21547E4 for ; Mon, 13 Jan 2025 05:35:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736746506; cv=none; b=APM5P7Bo1Vf3aLCxQ1Xz6y0kZRQsVOge/mWnKPbEirJjfvI+CwjASWofNxXfik7hPgXa1t6WXwUfkhOlL9bs8h8OaYh9dIX8x0mz2iPKXP10PIW65GOLTyu41VVgQ0VhHUgHptpxEQxwioSJ7wnqQehEsaHiua73vW5eNOws2xQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736746506; c=relaxed/simple; bh=kN4Zy0zT9ZlGi644DQSKR85RGb0h003SFXEwMl1o+EU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=S01IW/9eaknD5fj5hwLekSOeil1maNyDxkDPFc5WNbpnVqLBSBrGtQsv1MxjBbhCeH0rjR0+OIAI95UUscCBVxuoTZ3c52oq/3saUTaW2aA4TP9V4Fxk+4wqCROmAH8kspQsXXnmZNkyS15JNrk3Y/P/r3aWB+CSU6At78Kzuoo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.vnet.ibm.com; spf=none smtp.mailfrom=linux.vnet.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=sQByciLS; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.vnet.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="sQByciLS" Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50D3qqRE002390; Mon, 13 Jan 2025 05:34:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=T3qUfp dpNJC/xKFcor8CV9FNp/FszUaGYal/G7hu7M0=; b=sQByciLSC8Y4U+yEdd9D2q YC7DfnwJBq98SLd/m/r6QFwOt0nInYOqS1nyoDJaFrqtrACQycZNL3xG1jbTgH2Q YX4n4aAvOpg6SG3D6+J00Z1G/vO6ZJpN44bFR4PaLgx2IrdhRQ+xp5BixUiNPU9W +OsH2IIB2+SyNVlVQJGLwYG2BNiS9JAgPylpW8SNErAy8Mz2EGrJVOcUwLpEKpih +6tpj/plb1+N6EGHsrBYhEb346deiE3+/HYTf4eVDZvYZagn7NJkpKB7koaxLiIJ PqOxS2obUO79isN9TcLRSYyAX1JySHq9FrF2N8IG6yCYx4kPL9iOoUb/Z8PpLWLw == Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 444uagr92v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Jan 2025 05:34:54 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 50D2h7tb004554; Mon, 13 Jan 2025 05:34:53 GMT Received: from smtprelay02.dal12v.mail.ibm.com ([172.16.1.4]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4442yscvbk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Jan 2025 05:34:53 +0000 Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay02.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 50D5YqRo64225750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Jan 2025 05:34:53 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B340A58053; Mon, 13 Jan 2025 05:34:52 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4339358043; Mon, 13 Jan 2025 05:34:50 +0000 (GMT) Received: from [9.61.243.116] (unknown [9.61.243.116]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 13 Jan 2025 05:34:49 +0000 (GMT) Message-ID: <555bb228-ac49-43a4-b1cf-1d163b053973@linux.vnet.ibm.com> Date: Mon, 13 Jan 2025 11:04:48 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] fs: debugfs: fix open proxy for unsafe files Content-Language: en-GB To: Johannes Berg , linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Johannes Berg , Suresh Kumar Kurmi , kernel test robot References: <20250110085826.cd74f3b7a36b.I430c79c82ec3f954c2ff9665753bf6ac9e63eef8@changeid> From: Venkat Rao Bagalkote In-Reply-To: <20250110085826.cd74f3b7a36b.I430c79c82ec3f954c2ff9665753bf6ac9e63eef8@changeid> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 6SjJ0Ii5pZ6VPElUbJFeTWM_GTP0DfQO X-Proofpoint-GUID: 6SjJ0Ii5pZ6VPElUbJFeTWM_GTP0DfQO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-15_01,2024-10-11_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 lowpriorityscore=0 clxscore=1011 impostorscore=0 bulkscore=0 spamscore=0 mlxscore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501130045 Applied and Verified the below patch. Proposed fix works fine. Please add below tag. Tested-by: Venkat Rao Bagalkote Regards, Venkat. On 10/01/25 1:28 pm, Johannes Berg wrote: > From: Johannes Berg > > In the previous commit referenced below, I had to split > the short fops handling into different proxy fops. This > necessitated knowing out-of-band whether or not the ops > are short or full, when attempting to convert from fops > to allocated fsdata. > > Unfortunately, I only converted full_proxy_open() which > is used for the new full_proxy_open_regular() and > full_proxy_open_short(), but forgot about the call in > open_proxy_open(), used for debugfs_create_file_unsafe(). > > Fix that, it never has short fops. > > Fixes: f8f25893a477 ("fs: debugfs: differentiate short fops with proxy ops") > Reported-by: Suresh Kumar Kurmi > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-lkp/202501101055.bb8bf3e7-lkp@intel.com > Reported-by: Venkat Rao Bagalkote > Signed-off-by: Johannes Berg > --- > 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 bdb4f2ca0506..16e198a26339 100644 > --- a/fs/debugfs/file.c > +++ b/fs/debugfs/file.c > @@ -280,7 +280,7 @@ static int open_proxy_open(struct inode *inode, struct file *filp) > const struct file_operations *real_fops = NULL; > int r; > > - r = debugfs_file_get(dentry); > + r = __debugfs_file_get(dentry, DBGFS_GET_REGULAR); > if (r) > return r == -EIO ? -ENOENT : r; >