From patchwork Thu Dec 12 21:50:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schubert X-Patchwork-Id: 13906033 Received: from outbound-ip191b.ess.barracuda.com (outbound-ip191b.ess.barracuda.com [209.222.82.124]) (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 1BC981D79BE for ; Thu, 12 Dec 2024 21:50:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=209.222.82.124 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734040249; cv=fail; b=ZXNubXak8hLq4rD/qIFFUGAfYhClX0p+JSWBx9vwo9oTTAwuJGuIYsKBeakgtttgopj6tIf7L9Af9mupYkbnC4Mn0HlK1Cuf8HLTGfpQm+PzqJfwAhENWszuurrskBsKT8cFpYW0STDRU/CIvXsub7n3/NfOhHi4jjB8kDXhjjo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734040249; c=relaxed/simple; bh=27uI/83Wo66dN1R2ZFpFey9JybTCeP7Z38LGSptFJX0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mtGaDhP8yYRprYCHIRsDX4JPMwB64lff8cMGRX7ewoKDPNlC65SQfjfOQFLveBdI0J8sRL5D5Ofn8K+VTiuhT1auZr5SK8IsP28Us2HuJizUspCGGn6wbXaVI5MJv/hX6lw8btlE2+GUlSHwE2wXNbai1pmjsmTCSgg3UIGeQTQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ddn.com; spf=pass smtp.mailfrom=ddn.com; dkim=pass (1024-bit key) header.d=ddn.com header.i=@ddn.com header.b=QiCakhpb; arc=fail smtp.client-ip=209.222.82.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ddn.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ddn.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ddn.com header.i=@ddn.com header.b="QiCakhpb" Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2170.outbound.protection.outlook.com [104.47.55.170]) by mx-outbound18-182.us-east-2b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 12 Dec 2024 21:50:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GTAJNtd15FliiTcSovldOHCPg5nnj0detdRWhfqKFimQx8yFyvTuRB50873djl8dPxLZkABTwoBMD73HeA1+SE7NQYMKhjV5p+o/0gholIvxkpfDbC5W8FGpRf54su3m1BHuwKuDk2v3DHJSRpuCfDKz3Hhb2fiH/Z26sM8ziSBd6TJtwBfgsUwDOqo+Id8AnFL8Xs/Xt4uTTCzSBEkQH3bPYiwOwjIbcLxrOWA6aori7AkbhBnlhTy8zLM+oH93GO3JV+u59iKni33olgnmLlbMSpuaDB67//55R7lqNwXF2PdRfD9SJNtVclqn+vm7VV0k8EBMTq7xQYSJi23/PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QxauPhNoPknuKGY0jNish0hJHf40Fk7uU8ChAZBk2sk=; b=Renak1yRrUCg1/CCjeRd5FoNtGUye0FQZ6vEyM0f5fAcCLNQqLUz9BDOEYvBKYSdj3CI06YmT04Gexj2d6fjjvJTMaIDriJtHGVaT7YaS0vzuYN+4Hk2yc0F6u5zlmE61HWZJOIx5wXbkUtIrFMNBjz6Bnlk1QJ5dm6S4H3lKZOFTIyJHQLtxAQCOcpI1GNZbx88fUcr8UVg9EwAobGirybvATNzS1QjfWxnWLWb5AqJNf1JJ6mV4wcbDxW5b6vzoBAxSZIIm4DEP9uAloY9Ron8SgRWIQNCVaCn8rMPMzWQKC6+QHKPANRzt4VSxuB0AtZkO6JJQwqMQTwpHgzdOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 50.222.100.11) smtp.rcpttodomain=ddn.com smtp.mailfrom=ddn.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ddn.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddn.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QxauPhNoPknuKGY0jNish0hJHf40Fk7uU8ChAZBk2sk=; b=QiCakhpbzHWhMkR1x6GojiLuLRDNvJElQZs8q5ZhhOR+B/t6+FdaW1r4EQkQsl9r1/xS4xv09236aYSJNZBlR+haU1+ucWKar4pQgLiSc4f521+c4+D0sbvFdqdq2IC/gC3qUoPh+GSHaWf56KL05zLb4aKir3zZJDwyikqlyz4= Received: from BN9PR03CA0497.namprd03.prod.outlook.com (2603:10b6:408:130::22) by BY5PR19MB4728.namprd19.prod.outlook.com (2603:10b6:a03:1d3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.16; Thu, 12 Dec 2024 21:50:36 +0000 Received: from BN3PEPF0000B06B.namprd21.prod.outlook.com (2603:10b6:408:130:cafe::1) by BN9PR03CA0497.outlook.office365.com (2603:10b6:408:130::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8251.15 via Frontend Transport; Thu, 12 Dec 2024 21:50:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 50.222.100.11) smtp.mailfrom=ddn.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ddn.com; Received-SPF: Pass (protection.outlook.com: domain of ddn.com designates 50.222.100.11 as permitted sender) receiver=protection.outlook.com; client-ip=50.222.100.11; helo=uww-mrp-01.datadirectnet.com; pr=C Received: from uww-mrp-01.datadirectnet.com (50.222.100.11) by BN3PEPF0000B06B.mail.protection.outlook.com (10.167.243.70) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8272.0 via Frontend Transport; Thu, 12 Dec 2024 21:50:35 +0000 Received: from localhost (unknown [10.68.0.8]) by uww-mrp-01.datadirectnet.com (Postfix) with ESMTP id C318355; Thu, 12 Dec 2024 21:50:34 +0000 (UTC) From: Bernd Schubert Date: Thu, 12 Dec 2024 22:50:33 +0100 Subject: [PATCH 1/2] fuse: Allocate only namelen buf memory in fuse_notify_ Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241212-fuse_name_max-limit-6-13-v1-1-92be52f01eca@ddn.com> References: <20241212-fuse_name_max-limit-6-13-v1-0-92be52f01eca@ddn.com> In-Reply-To: <20241212-fuse_name_max-limit-6-13-v1-0-92be52f01eca@ddn.com> To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, Bernd Schubert X-Mailer: b4 0.15-dev-2a633 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734040233; l=2182; i=bschubert@ddn.com; s=20240529; h=from:subject:message-id; bh=27uI/83Wo66dN1R2ZFpFey9JybTCeP7Z38LGSptFJX0=; b=ZVj4R6dtBZXaDSv0Ov36S94Yuq/Y+mn/fyCuBq/KIYae5y0rmG3UIRstWbBKQ3O3g5BBtZ1XE 6WdrwnMlrAgAq+lSIG/dipA1kjT/eqlwcQ9a+GFr7BOVU1Ay4HWf1Rf X-Developer-Key: i=bschubert@ddn.com; a=ed25519; pk=EZVU4bq64+flgoWFCVQoj0URAs3Urjno+1fIq9ZJx8Y= X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B06B:EE_|BY5PR19MB4728:EE_ X-MS-Office365-Filtering-Correlation-Id: a5158ad9-015c-4f68-b6e8-08dd1af7028d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?q?rJXojYNaiaBW4JkJpQn98th7xAGrj+Z?= =?utf-8?q?vbhCQFi03RZ+/NaO/gKGtZAielsZ3Bb+2SRFmNDq5Of9h2jra2J/NQyiSPgymyqft?= =?utf-8?q?xuwOPUyG5+sf5YTTLcWcFEM6EOQ6v3NGAF4DO+IfIUOA8cx7wRGbDQfB3b3C4QH37?= =?utf-8?q?/z/ZcksBh6TS8U+0xyNwdlSAWUWSh5Q3JTsrtI8DV3Vx9uAvyg4vO4297HPNaW8Dc?= =?utf-8?q?dj38g7yE7sEsu5wpWyOgz/KfybaNF97KzsQBnZjTmUAshTrYwYyQ7CKTm1/N85qyD?= =?utf-8?q?tNq2GYNQZpqWmjDaWd/a7skIAy4SLM5qNyZR2xF5SEcG0sMUxYAUOD4ownYFpt1Tx?= =?utf-8?q?juVfBfy7izQVZCnR1qhJ7cIqvBqyRtiMsJVtSKD67svvOLnn77g2no/g78SDClATb?= =?utf-8?q?zyH9TsbaaGbI8B7NdmoaH5MyaZuTsmOccFUXkFEtZoO8LaZC2/b02d5iOa8QVktXX?= =?utf-8?q?Mtghp5+VpC0zVJDIsSqrUf+ybWTRYO06NhYWjbsBK+aP9YVsK3SxkdsN4vZ/Sx+bN?= =?utf-8?q?dk2iFZdXNAOKS39Zv3YBH4SWawcn6vg9Ipi0vbUPLG2hL9niN5SrBeOut7jIMsJnn?= =?utf-8?q?hwESnZ8raY+RdSPC2TZrdlWxOr5qqFuubKMIS+B7Pgysrsq0lDk9jnEnFDKfHaNkz?= =?utf-8?q?AHZYXV6vbp+p4wpMmf9nwjZmQumAZ18k6CvRlDVWDF+T8jLaqcCqEu26hQv7tyUPg?= =?utf-8?q?r2E5zdtmlaF4JPO5sFOnvjqmcD7HvXRl41AE+2p5TNKBFOpMl7i8yOMAZeoq7PpOO?= =?utf-8?q?0GfivcfEDEd3+dMZMkXRaxbfPO8imSKWKk+0A4yfTbde7UKMbw93TzGahcR99sISV?= =?utf-8?q?enBuL0xrgry0mrJf4aj2tdyqn9ofVC9X9Pl5el8algwVAKieHsVpVa7PE01ctDUxQ?= =?utf-8?q?kDR0NciWu5qqlI9aTX+G5neIe3gzNDTBKN63If1INpEqLfQNF+MTZuNQikmn+7CKp?= =?utf-8?q?0gXVPUpU9YG9ktQO4Urr2fKR5+rxgYH6VEEyXGAJbBx3D2kBDNKU3wREZ/vqveMJD?= =?utf-8?q?020yhq326GW/kH826vsyLPJ/nLqudXudHOaDlpO9F08bAYMMCWlSo61e3hiPyOsmH?= =?utf-8?q?ll802d7dL0wtOXdrcj5OHXFMxeNtBeWVNFh4VMkaWPaUd73dQI2gavaPOOeegGchT?= =?utf-8?q?UzgxBeGovWSmWUD+g4mZGeduQM+SVHsUL2flKxBtv92FPkqlnxQ+o64HcOZAtcWoH?= =?utf-8?q?ITZWDzgkOVgJQTcnH24TMTDMYafFPwnrIa1AP4UTFVzKteLzoHm77H+cM0pMew65E?= =?utf-8?q?yAu7agplzPBkrj1l38WPkCN1wD9TED6i0Q05zbzOtmY5FZS6mez9bKjvpI07a6otq?= =?utf-8?q?XgIdE9suxXYdMiOe0ZoxaLcU/8HzO218d8n/Z3W6bSgz+IKrt76xr5iSmh5wGgXEY?= =?utf-8?q?Ll7f80R+/Wd?= X-Forefront-Antispam-Report: CIP:50.222.100.11;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:uww-mrp-01.datadirectnet.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(376014)(1800799024)(36860700013);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: GoBDiemW+0jr3AJI3XA9tiXAmO0Q4H2qmoTjK8AL1bgpfOymlDsmQ10rq88ZagwdeCtMNvs3tjdG9F8eZtDAue+2g7hERCxyaqFm0iC7YBfSxZFF1iLlso64VQMz74pPDWje9OCL7oisoTkY6OiPb17uBUIyFlxKch6oSJb1YDMxxn6U5HviJlDTcTWF8JFC0UW0E/BC5SKoVy49gZS2kaxifoWxxCY+J2pjeaW/l+7ds6kzsfWDBaAFIBe1n+Gk/5TVwP035avlD5Nn9MbXAY7SnJDpFiAq0wIoIP0MMcHLT4unYRlEaorHjufgggFaBgDYyo2v//GAIOO3f5MJdG6OFdp2OCd2UpfVw93Fh0JmnsgvYuXlgVppRQhV08mmxdc7ckNzcxiUApG+mAjqpDI3sCuX4HHQXl3krzA04EqGOkgfnF42HewihrHv7V7LM8tjHibxJGKFMXZ537/+iZxn4M7GAzuHhX0XhI9f/Jtfk36kvH+osV7spdKAsF7b7N1rxMm4HA/xaoO5b8cNO0t+gUQlOfHuiH7h7wnPN6JtE/RqqM9/H2wLXtNoUJGZff0dEXudHlSBJENGREpQrI/mWC6LvWOYLs5XUkZWYv0jWbP8MOWLkc6k2Tl4kgYJMjVzqlMm0ccP1ZtqJCGFqA== X-OriginatorOrg: ddn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2024 21:50:35.6533 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a5158ad9-015c-4f68-b6e8-08dd1af7028d X-MS-Exchange-CrossTenant-Id: 753b6e26-6fd3-43e6-8248-3f1735d59bb4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=753b6e26-6fd3-43e6-8248-3f1735d59bb4;Ip=[50.222.100.11];Helo=[uww-mrp-01.datadirectnet.com] X-MS-Exchange-CrossTenant-AuthSource: BN3PEPF0000B06B.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR19MB4728 X-BESS-ID: 1734040238-104790-13334-13635-1 X-BESS-VER: 2019.1_20241205.2350 X-BESS-Apparent-Source-IP: 104.47.55.170 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVkaGBhZAVgZQ0Mw4JdHCyNwoMS nJ3NQwOS3FIsXC0sA01cDQ3NDAJNVYqTYWAPoFlNVBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261069 [from cloudscan8-242.us-east-2a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS124931 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 fuse_notify_inval_entry and fuse_notify_delete were using fixed allocations of FUSE_NAME_MAX to hold the file name. Often that large buffers are not needed as file names might be smaller, so this uses the actual file name size to do the allocation. Signed-off-by: Bernd Schubert Reviewed-by: Jingbo Xu --- fs/fuse/dev.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 27ccae63495d14ea339aa6c8da63d0ac44fc8885..c979ce93685f8338301a094ac513c607f44ba572 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -1525,14 +1525,10 @@ static int fuse_notify_inval_entry(struct fuse_conn *fc, unsigned int size, struct fuse_copy_state *cs) { struct fuse_notify_inval_entry_out outarg; - int err = -ENOMEM; - char *buf; + int err; + char *buf = NULL; struct qstr name; - buf = kzalloc(FUSE_NAME_MAX + 1, GFP_KERNEL); - if (!buf) - goto err; - err = -EINVAL; if (size < sizeof(outarg)) goto err; @@ -1549,6 +1545,11 @@ static int fuse_notify_inval_entry(struct fuse_conn *fc, unsigned int size, if (size != sizeof(outarg) + outarg.namelen + 1) goto err; + err = -ENOMEM; + buf = kzalloc(outarg.namelen + 1, GFP_KERNEL); + if (!buf) + goto err; + name.name = buf; name.len = outarg.namelen; err = fuse_copy_one(cs, buf, outarg.namelen + 1); @@ -1573,14 +1574,10 @@ static int fuse_notify_delete(struct fuse_conn *fc, unsigned int size, struct fuse_copy_state *cs) { struct fuse_notify_delete_out outarg; - int err = -ENOMEM; - char *buf; + int err; + char *buf = NULL; struct qstr name; - buf = kzalloc(FUSE_NAME_MAX + 1, GFP_KERNEL); - if (!buf) - goto err; - err = -EINVAL; if (size < sizeof(outarg)) goto err; @@ -1597,6 +1594,11 @@ static int fuse_notify_delete(struct fuse_conn *fc, unsigned int size, if (size != sizeof(outarg) + outarg.namelen + 1) goto err; + err = -ENOMEM; + buf = kzalloc(outarg.namelen + 1, GFP_KERNEL); + if (!buf) + goto err; + name.name = buf; name.len = outarg.namelen; err = fuse_copy_one(cs, buf, outarg.namelen + 1); From patchwork Thu Dec 12 21:50:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schubert X-Patchwork-Id: 13906034 Received: from outbound-ip168a.ess.barracuda.com (outbound-ip168a.ess.barracuda.com [209.222.82.36]) (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 C03391D8E06 for ; Thu, 12 Dec 2024 21:50:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=209.222.82.36 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734040250; cv=fail; b=BxFgvwpfoTXCUoOSWHFt4eH0B4md6miDaxCBqvrlCTfbYK+BgX93+FB52L4TKLX+v0ZcG2VxQRODXnfUjxduNUc/54zpeUcbrE0WmGEnaQ+pP/yIxMD+KPbDYcsg6TPBWgCSB13RQ3+CzhU58jZKUIL5xIAKIv76plC1R7xX8eY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734040250; c=relaxed/simple; bh=R4RQU4urJ3/dseKJ952zf5zqJ1RRSeM4npAkPi7Pswc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UOl0ZbRkJZTWR4HNd+sXoJEOjD9/rHZB4U3qmx8AM7Su7/oyn8rPmw7KLLWz8dW6qgK89YnJacFrspuwT3Xa/+fpc9zlFLqpzpjthDJ2QZ7qCXtx1BnXU6n1vwUEmDkm9L4LGCurbgBgqx7k/S4BGw742CC+EQwC7XLzVjYTiqM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ddn.com; spf=pass smtp.mailfrom=ddn.com; dkim=pass (1024-bit key) header.d=ddn.com header.i=@ddn.com header.b=Uct1vzqw; arc=fail smtp.client-ip=209.222.82.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ddn.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ddn.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ddn.com header.i=@ddn.com header.b="Uct1vzqw" Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2175.outbound.protection.outlook.com [104.47.57.175]) by mx-outbound47-50.us-east-2c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 12 Dec 2024 21:50:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hb0eQDb1lTYz6S8D3BvZczzqe1RLB3p5rP69Ul5zMLkSoQhfckm6RmJhpZmXxA14XKtUL+gOmdszwVpr8A71bXNnviVs+RC79i2oZrJmSs2s6xpuSc1Zz6F02ejYG0f8TOJ4b+Ta44fm9cnDIs1bnpuMA1gdBAWu3zzk4tOpUP19U7vZCmd7278bh9mGObbNkm1du6Y42L2shiCAYYgNc1Q/bB3HPg7h6Wc1nUSfAFDlL+LhlZ3Bk1A1YsIIzbN9p9hgWEEjAKMUbpKmQ5852l+WOoREY/dZdhfw4lJo8cJT9JedIIu+gnYgfDhSDI4YL+Vx26N2goZpsuSdTp0Ytw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=potzp3EIcXcMarb3G7UFG23mJvw1oRBKl6Zbd7WB148=; b=nPcFroQrLch2ZJjzfQJpAELleHlRE0v5S8l+HzcOxdb3jHtEfbwJh/YSPURVgmprhusDLUI+CYoX2tgM4NSZcamgi1LekDmdXX5RQJdxrE3EnlfHSZ9xwxCdG6zVwFFx/0W+wtLF7jCFcyY5HNt/UQPOZ7LKGOZ4Ojs6OlyWYXVyrI9X3HNIT0KUSlqE/776pT5qoQ2K75imdkUaYqjr8XUbJ3xPbPMiy1m4b4+oFQnhPvcKe9h+6qcJpK3qPcm5pgEDQk3FTMEq5aNrIpmj2Z7WhxtMVwO8vNrqHdLXvsYOqlqnqSX9Ug+9M8Mw2GqpX6d1vk8E+M+rORhf2o+tkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 50.222.100.11) smtp.rcpttodomain=ddn.com smtp.mailfrom=ddn.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ddn.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddn.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=potzp3EIcXcMarb3G7UFG23mJvw1oRBKl6Zbd7WB148=; b=Uct1vzqweZ/STHUaYgi+4gBj8zphoTFNKh9MgfWiITCbVm+lRUiJYBGOwv0lzCsWUPNRA5axvoj4chV60t+LNlFZhoLeEoCqC144jOQzH/8PVXGsWPYZfE4cTx7/0fT8J5wK75XI4vUOL/NTFAY/+PKS7PY4Z7L0S8US0CQa14s= Received: from BL1PR13CA0014.namprd13.prod.outlook.com (2603:10b6:208:256::19) by PH8PR19MB7760.namprd19.prod.outlook.com (2603:10b6:510:25c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.16; Thu, 12 Dec 2024 21:50:37 +0000 Received: from BN1PEPF00004689.namprd05.prod.outlook.com (2603:10b6:208:256:cafe::56) by BL1PR13CA0014.outlook.office365.com (2603:10b6:208:256::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8251.13 via Frontend Transport; Thu, 12 Dec 2024 21:50:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 50.222.100.11) smtp.mailfrom=ddn.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ddn.com; Received-SPF: Pass (protection.outlook.com: domain of ddn.com designates 50.222.100.11 as permitted sender) receiver=protection.outlook.com; client-ip=50.222.100.11; helo=uww-mrp-01.datadirectnet.com; pr=C Received: from uww-mrp-01.datadirectnet.com (50.222.100.11) by BN1PEPF00004689.mail.protection.outlook.com (10.167.243.134) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8251.15 via Frontend Transport; Thu, 12 Dec 2024 21:50:36 +0000 Received: from localhost (unknown [10.68.0.8]) by uww-mrp-01.datadirectnet.com (Postfix) with ESMTP id BC8ED4A; Thu, 12 Dec 2024 21:50:35 +0000 (UTC) From: Bernd Schubert Date: Thu, 12 Dec 2024 22:50:34 +0100 Subject: [PATCH 2/2] fuse: Increase FUSE_NAME_MAX to PATH_MAX Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241212-fuse_name_max-limit-6-13-v1-2-92be52f01eca@ddn.com> References: <20241212-fuse_name_max-limit-6-13-v1-0-92be52f01eca@ddn.com> In-Reply-To: <20241212-fuse_name_max-limit-6-13-v1-0-92be52f01eca@ddn.com> To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, Bernd Schubert X-Mailer: b4 0.15-dev-2a633 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734040233; l=1088; i=bschubert@ddn.com; s=20240529; h=from:subject:message-id; bh=R4RQU4urJ3/dseKJ952zf5zqJ1RRSeM4npAkPi7Pswc=; b=FYYA+mKNX38q0FgOtUFhEZjciWvVoemO63CohihG42u7+I3niUzQ0ttrFk3K7yIPNJSbhoE1W NmXx/JsFQVPD4Xv8TUaoiBX3Atcpy+o9p6uDiuBAY6ISYAKQW+1Axx/ X-Developer-Key: i=bschubert@ddn.com; a=ed25519; pk=EZVU4bq64+flgoWFCVQoj0URAs3Urjno+1fIq9ZJx8Y= X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004689:EE_|PH8PR19MB7760:EE_ X-MS-Office365-Filtering-Correlation-Id: 16039be8-9539-4737-27b0-08dd1af70315 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?q?5uxTiov2cPzzeVzC4BrwzJCsOtFSPXc?= =?utf-8?q?PgEMvPfhelSvM/y3sLGp90sgO2Dhme3sUK50ds0ZSoQttbDXURdwy7FAmb8iFuIIp?= =?utf-8?q?phQYA+jn1rxs0fHD/Nyrz17gpvjElsb1R8x1wG8bV9WUUI3x9pUlGHG5FE1jcuB4s?= =?utf-8?q?S6J630qCKIvcnIulVEuT+Cfm2F59VofbNlDTWYAPbyHEEuaoCAt7t3HtUSUtxzrzJ?= =?utf-8?q?X6eoamyDazVPQdtRmFbhJXC3UFbqWpO3Nftnvz1GZS44aixdPkpJjJTUVDdF2MCbh?= =?utf-8?q?P3SM6+LadTW79AZ2CoA4zR90WqXWDuWX/lMsM/9CGznDfAe0OOhCCzVBJj3zEn4o6?= =?utf-8?q?gDn6WtjMvNAhlr6B/48cs3z+t7HWhthIZw/yyoIHc8Ku+U5PPSZSGmOF5HQVI2bva?= =?utf-8?q?A3s7DzlAzPnCYh8VuDRlUxg87nWozI5s92HWhGyl/w0mQDcDHFoQ3t/86eRSsqdTa?= =?utf-8?q?agHB+uLIwPfeo7UdmsUMyRlM8eWifqtxWi1ouhnEDUCn2plBEsWJ0FV//4dGeQyQZ?= =?utf-8?q?6BmnjCtp5/Gt42GSMueGTUKrE35lKQ6qPxKOzIuVXGcf0cP+bhrGwZZJwPlScGKua?= =?utf-8?q?kZmTnigCR1V3+pIoJRAh2FWYn4ZNluGTo4YwKacDIJhjIscXZknMiwUReUMPz7AkN?= =?utf-8?q?wWU5Ip+H8Uh2/JAqT5oToFuo4Tu4mQFuwLzx+D26yuzF7BjniKhUOapP/+YDE+RGU?= =?utf-8?q?sgdB2Zgnv1n4iPq0lT+0k140VLkOFPB2cQ4quogLfHsY9Kyqln2U7aV+G74oT7JSf?= =?utf-8?q?eDwAU3KfVQGU0Fnw0XGNn036eBM69xf9xenQ/Sz509Wo62/ByZDeQWjiI52Uj8KFC?= =?utf-8?q?rzrp0bdno8YnUsEDJbW35KatseGkmZ61nlG33JNPjdYxP0XCbdAsQ1Z2rAp8tSOr3?= =?utf-8?q?EwuzZjaC9XpKDAPptciRecTDSHPU+a4Ua1m96QQOaEZR/ZdXTWZ/uiVIX/D3F7x0Z?= =?utf-8?q?4+AeLptKE25wAO+0LURI/let+HC4yhzesILfkKCYAmA0uCOay/woUqr0u9wIExYxD?= =?utf-8?q?xus+tmlsj79enyBwharvjRl53/PWghPWwwpRKUpcPh3VqtoupCW/onuOyV7tw9HpU?= =?utf-8?q?aCe7+gl18yxdm7RSQm67M5LG6WfPpQ+uIYb9qAhi6asNmrxhvOal4P0dZfYe75MaM?= =?utf-8?q?yQ1o9s0U+3AQ5yy/l4vrLZG/qMAc5eOsqpWr/aRHx2vq3eAfahisSIf4sEjt2cB4M?= =?utf-8?q?HT7H/EqMnHTfIOWlZC7hlI+xaoH/2pfbh0og9N06YCmhnFmUR2+m53//BTBGsIDPX?= =?utf-8?q?kVdMmN3B9fdpTpBv2wEp39bUO6x+jn5zDiCjgxym0fGqkqfb3bu4M+NNEy8Roqtpb?= =?utf-8?q?UW0J4q0tGL2yv8iV7Xfg5FTrOG5/qSwmN/62+jNI6uFdXJuRROW5q52BtVLd+XvI3?= =?utf-8?q?eRtsrCUGWAf?= X-Forefront-Antispam-Report: CIP:50.222.100.11;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:uww-mrp-01.datadirectnet.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(82310400026)(1800799024)(36860700013);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: MWWSJWQhCpB0QC7EFR5+iJUhnwRoScehsyvKVSjcdq/nYWxGUJZb5cUvhiiQzqX02u6T/ymcFlspSybof+nglivTJecx30ng/dPMShoXK00ZBOv0I8umU8BmDJAPO2qrqqoszFtwwu263isG1oxbrnnUuo23D/6HMn+ftn6egoMvw3s9gxv+O1e3Yt+yJRKCeHqdQ8DYlAOVzGN0MrjUmUxbx8EIAp9Oo1TcSFPLqfSmNPO9U0Bany5nvTowa+chPl6j4Hyc9TA5/j/enSJSekEOY6K9zwr8WYQ4rgefWydGXw7Pi17pvvn3Cp0PfyMu4M14G4C4R+Uj/hN0uCxpwLvKfrXiBkZTJ77O4KJkODcVYXlMhR1j1j+rXDHHmuJBr28gpcFfS9nEdKPxnNN+ZqFg97gLfULlNPxzacAGwySCdG9UHPSVruOT5zlX7ryTLAhifSn2QHdf/VL55k1SuWudbyf2TsdvBIih5t9BXkKvkF10l+oJPZKu3AlFq/oHll4RJZ0Dk2X2+ha5QpyqibiyY6MkDKyhxl3Icj8lkJ2jAII+l6Ctw213pjp4xQn9SLAdHRCSx8kFwWftwML83QaD6iaG66rblKE1GmBGOAGC5u9EVFOPx7U0ArRD4CKDjS05v6mGCTtjP9QJVb2bpA== X-OriginatorOrg: ddn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2024 21:50:36.6190 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 16039be8-9539-4737-27b0-08dd1af70315 X-MS-Exchange-CrossTenant-Id: 753b6e26-6fd3-43e6-8248-3f1735d59bb4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=753b6e26-6fd3-43e6-8248-3f1735d59bb4;Ip=[50.222.100.11];Helo=[uww-mrp-01.datadirectnet.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF00004689.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR19MB7760 X-BESS-ID: 1734040241-112082-20061-47397-1 X-BESS-VER: 2019.1_20241205.2350 X-BESS-Apparent-Source-IP: 104.47.57.175 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoYGphZAVgZQMDnZyMQs2SDFzC zNxNwkOTnN1NIixdjM2NDE3NTQMDFJqTYWAEUWxNFBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261069 [from cloudscan20-173.us-east-2b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS124931 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Our file system has a translation capability for S3-to-posix. The current value of 1kiB is enough to cover S3 keys, but does not allow encoding of escape characters. The limit is increased by factor 3 to allow worst case encoding with %xx. Testing large file names was hard with libfuse/example file systems, so I created a new memfs that does not have a 255 file name length limitation. https://github.com/libfuse/libfuse/pull/1077 Signed-off-by: Bernd Schubert --- fs/fuse/fuse_i.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 74744c6f286003251564d1235f4d2ca8654d661b..91b4cdd60fd4fe4ca5c3b8f2c9e5999c69d40690 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -39,7 +39,7 @@ #define FUSE_NOWRITE INT_MIN /** It could be as large as PATH_MAX, but would that have any uses? */ -#define FUSE_NAME_MAX 1024 +#define FUSE_NAME_MAX (3 * 1024) /** Number of dentries for each connection in the control filesystem */ #define FUSE_CTL_NUM_DENTRIES 5