From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.180 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796170955; b=S2+oKJ0pG7dSeysF3cs+QTe2+Wz/KsFiwAzHFnEMrhxUmDgWIw9/kPZjderVibux5E3L jXpJSHY80NumywOd8R9e1IdWhHDRK23vyYfrhThCBf7Ww/qswoS7HTEel+Xfofhmy5f9k uE84otFdSO4RNSazJYleW0iVroG0SJekWn5nPw9VtKA0ILlQw524lb2mRMntVcC5y4iNE cFMcUGOi8pqNPXaGhQNYY910vv/UFkyygsj/Zlsg2/G7BTMPiwC56RA2EFkJQMlbffgW0 TkUU0Wi8kAw4h4b6ChxNJuG39Bwfzvxw5ETauiTQCX6lIFuBnEHjdAVf+IUXrYw/27w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796170955; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-Id:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=PSHHU+/SxwbIWSyC366eEUGSPCHckzZlrKViY175ZQw=; b=OcKI0BNryFFz15MxN81U2yvaJEav/tqrwyHbkJC1IlD49c+ZAo7wKm2VUoi/557Y8ie9 qvq5sw5nzowTWhMotTj+PsdzHhA4oiES/fVk+3UMxDWmxzXZn9Yu4V9vd05LHnaU4Ayhw BptSM9Xc07iN7EHOsm4n76dPHdtN222dXInWlPr1ARCRJVC7v115g8lsS9GZ+PXEL76J5 60gaP8r7VIhwpowp7KlNJnTCsNbbHArRzm+d/PnCLLgqozmxadpjlKDzYx7zvriMQ9gc+ 2wqKMG7my2Z6eBjjRmjNlZwuxp7Hu7A0MhYSTeA3CaMVXAPqxfbrEo84RFmzt8L/SNg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="w/8O6fh1"; arc=none smtp.remote-ip=209.85.160.180 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63ADA606A32E for ; Wed, 2 Dec 2026 00:22:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 63ADA606A32E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=w/8O6fh1 Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-55d2b4a99d4so119277821cf.1 for ; Tue, 01 Dec 2026 16:22:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796170953; x=1796775753; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=PSHHU+/SxwbIWSyC366eEUGSPCHckzZlrKViY175ZQw=; b=w/8O6fh1WJx4aS6tf0Mz4tv9CxitcWyj4+IZAqYxR7FugmHNFRaTtkJ/hEJAHjHwI0 3FIJMMrIvI07v2nXpaJKLIDoHwzIFTcXjIsi8GzUk8U63xTZeg7cx/DVcGemw6bx3u3x rlnJptf/lWQzpMczFYrEe9xUwih5NbjJuR6M/sQy9/ndUzIyAtjgQM5xg/K0/23JgbYM AIlj+KqqBRn+OSLIA3w1IJ/QtlVHFEk49KnnLItEugMo+FRoylVDWLL+kFHwuvGMVI+K FV5F4+jSRJZmVrI/wxGJEradzWTdKHReuPYy5c5N3HuHNhQTx3UNMVMZRmzMA1Gfbp73 dsrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796170953; x=1796775753; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=PSHHU+/SxwbIWSyC366eEUGSPCHckzZlrKViY175ZQw=; b=hcrU61f4zx8lxTMnRfDtN2BuF+gpBvjuFQuXY/9pbPjQS/qtZDxwjD+96//Yjrsohr kc76zXIY+MBLVpT/PyXkANmaOaPO47Sb6Icb+9Oeol8FCAPbaH78yd+wVTReTCDecMEA L1lVSQV0veISCU5ibqMD8NRfsY/IUl3f8j6k/1QU4zRv//oJokyzPZPPPs+yj25EP8D0 O50IZxE+5qz5zEXKyqIoIQu95ctkqXwD9/Q4GRZlFn7Usng1XXXqAKidHZliul2ETv2Y NEGiE2xjxoWtNJI2NhPWGqcRRXRNcULOOSKwP6Vh31OLXCcuSIHMU0s+ubZz4ElBWVnA caPQ== X-Forwarded-Encrypted: i=1; AL+hErEmUYZERAfIhlOEE/xC9+Tgb/fCB6m2ajqFVsRBAnbX6HiRtMUH3Ng4fnUvKMb2LKz1wdM8Dj1T2dcQSEY=@vger.kernel.org X-Gm-Message-State: APuU4Z8l9bxiIdiB9yHpXtfzNFxZ2dCd7mhHTNYiRVzWy1aD5fy6kkzs nlitcBvXrtovK3bF/JSdYaEySn5GInCNPzAZx8Bs/+tIL9RgaY2uEoWv X-Gm-Gg: AZFdTZegujmFNs3DhKLjc7Ij9QyIvL6QKsEhrpd1SmQ7CfCDgtL69jhfpY6M+3QCfwQ VN7SFYnozWtntsgBcyK/ygy7jhPW9C1t5CB99oo3kX/rFGxMgzWOo+evV9Hc7hc6lBhWJM0DCmm l3hAVldWpW24rsGYZSH5LU8AX2CCMuS19LJJVc7GprILnZC7mFrXdBZdg5fOFvjKJHR6qSVbbc6 6k6BDuTQw2aaq1hdw+0dBr0H/HorBkr6/zxS3ca7zDXcuaVq2dnUcw0YqcJj5ahLFa+I7OWQI5w GNPUXw81kILofbJ+j5knbaJXJb/CIBGHztoEuHhMFCPYqGYHTtljsdlsSS9Zj6/DpEU0+lddrqX ATzaor03xtObsJlQnWMAI+L+VULghuD+RlXESNXgTa097+WjiBcs9CYpF2J46Bjufn6b6CGRINn zBmq0hhIzPbMTy7jJJqMdpKo5rfSweRs+a4OdG+bHhu6w0qn53ls2OMufDd2bICgHNZA45ohRwt 2MGD0epZP9ggsXno1J7+4TG5oOOBq2yWgJG5yGCS+8jg2Ol4l/3qioMDdu0yHeewP3V0WBI/h6m Vd+ZH2MTE+PnYCfiNsW2UyMaPQF9EBY4/zNpVaiMsLuhMaI3wxF8Bl81OvEh6JZqjEmqle2gEd1 nTCHwp4LuFuQuA/LKTwY4OPeKo114/5qXIpZz9A== X-Received: by 2002:a05:622a:2516:b0:55d:3508:e7e1 with SMTP id d75a77b69052e-55d767a6c03mr722456941cf.0.1796170953364; Tue, 01 Dec 2026 16:22:33 -0800 (PST) Received: from FKXX2DL94F.bytedance.net ([72.29.204.230]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-9217efd0637sm180572326d6.42.2026.12.01.16.22.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Dec 2026 16:22:32 -0800 (PST) From: Yifan Feng To: Jan Kara Cc: Eric Sandeen , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Yifan Feng Subject: [PATCH] udf: parse umask, mode and dmode as octal again Date: Tue, 1 Dec 2026 16:22:27 -0800 Message-Id: <20261202002227.71885-1-evanfengff@gmail.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Before the conversion to the new mount API these three options were parsed with match_octal(). Now they are fsparam_u32, which takes a number without a leading zero as decimal. So mode=644,dmode=755 gives files the permissions 0204 and directories 0363. udf_show_options() prints the values in octal without a leading zero, so they are also read back as other values. mount(8) passes the options of /proc/mounts again when it is given the mount point only, and every such remount changes the permissions: # mount -o umask=022 /dev/vda /mnt # findmnt -no OPTIONS /mnt rw,relatime,umask=22,iocharset=utf8 # mount -o remount,noatime /mnt # findmnt -no OPTIONS /mnt rw,noatime,umask=26,iocharset=utf8 Use fsparam_u32oct for the three options. Fixes: c4e89cc674ac ("udf: convert to new mount API") Signed-off-by: Yifan Feng --- Tested in QEMU with mount(8) from util-linux 2.38.1. umask=8 and mode=0x1a4 are rejected again, as before the conversion. The checkpatch warnings are the existing style of the table. Found and written with the help of an AI coding assistant. fs/udf/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/udf/super.c b/fs/udf/super.c index a81a8509524a..5a07271b9745 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -502,7 +502,7 @@ static const struct fs_parameter_spec udf_param_spec[] = { fsparam_flag ("longad", Opt_longad), fsparam_string ("gid", Opt_gid), fsparam_string ("uid", Opt_uid), - fsparam_u32 ("umask", Opt_umask), + fsparam_u32oct ("umask", Opt_umask), fsparam_u32 ("session", Opt_session), fsparam_u32 ("lastblock", Opt_lastblock), fsparam_u32 ("anchor", Opt_anchor), @@ -512,8 +512,8 @@ static const struct fs_parameter_spec udf_param_spec[] = { fsparam_u32 ("rootdir", Opt_rootdir), fsparam_flag ("utf8", Opt_utf8), fsparam_string ("iocharset", Opt_iocharset), - fsparam_u32 ("mode", Opt_fmode), - fsparam_u32 ("dmode", Opt_dmode), + fsparam_u32oct ("mode", Opt_fmode), + fsparam_u32oct ("dmode", Opt_dmode), {} }; base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244 -- 2.39.3 (Apple Git-146)