From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.181 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796170954; b=Hp4t0ADvSR/L0WismpX8ePybTzJEUALa8oY58KkH5IchoMQfJbbBLxRIg1wxheKpoLMg irFhNaAM5ckTWixt/vkPdPbnkJr43dADzZG9n2dKOCJyRxWsc29m9O6O1IUdQLf7EKQH1 c4ItoKqOqVmHlHAwHagm6Lab9x5YfslFCJvLuJaUT2C5+5m6GgxNt4QT5sjih5rTpptjW ykG6kFgHBdrfebR4iwsroLsWAC6VZn3Ze1M31IiZ9eg7DF9BJQk5ZdKTdNXppi8muDye1 dfrzQt5ndHcjITRs4RRL9Tf+/XlJziHuMu9zOIJwFcfivbhHa0WlKC2ejOp7sOqbIXw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796170954; 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=nqLoPaV63yyH+LYOSLo1nSJrSQY5vt3tNrPd9y6/x5Ed6OK9LotMCv/tdToTVHy2YHBD VUKWktjwRT9bOqJXJPzG8IXRBZHgpzK4w3DKKFVF8PaJAnDW+TXXmSlST1xKHyICVcELs 6LaRMM3vVSe+pLBMGZE6dU/+mnSSNiRvMAbp/JKNyJBYGD/oIh7wj1BYz9U42bptLY57C Zn3SfMXmABG1nDuxsc7duMSzqfCJ/miuvpt5TK1YDUT2Ksxm7K7Wh6jBEo4uf1AH11Sy3 lvcsLyD2lRDYhWqzvfqmOK67aZ3isb/JrNTPfeqB9Gixzemi7V1hfSGMMJk8ze+UpWQ== 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.181 Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (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 5A73D606A32D for ; Wed, 2 Dec 2026 00:22:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5A73D606A32D 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-f181.google.com with SMTP id d75a77b69052e-55d2b4a99d4so119277831cf.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=CJE3IOverD6bkuGAVSWCe8ZTCmyNfwtIFHuksb+O5ixBYVgf+9YYMIeFjUGL3ULazR FDxuBNpJpEAPw4mxwSkDO2KyhqtysY89CaFCNECGvvRvSr22HNVNVVod8Wrt9JlbkvYV zpriE97S0u67O2Bl79T5zA8DZxOA7nAFxrnjj4/8yf6iIdn7iXz1A+jp5NCr0qX8Y3XA vBeyPTZjqH+OETpkQ3P6XtrDjLIxr0ZdY1oci6EWlAUX0JUQawHBuO2aE9dS3TUk85L0 IYQ9tm+5nwm7pyYvmyu5ECwwL3kMljITGE97FJyRoe9mPImAHCP+exUaY05bYaA83EQi ZRAg== X-Forwarded-Encrypted: i=1; AL+hErHkZMLKDQl2uo6B3zwUpwKFjFvPKOakHVoh0zaiJKlX2elWMsk4Md1kkUpnAb3TwBYCU49+WrvLQlurLKOJ@vger.kernel.org X-Gm-Message-State: APuU4Z/cSTbF0j8Uu4j8FjMpOjgvK8mP9icPl0JuxE0IfHBKiiY4MUtC +PPHxu1VGfVJYrsQUFsrm4+HCB0dg8xSNE+hTR2497ROgq23MNa3DGTz X-Gm-Gg: AZFdTZcxzUcL9Xcni8+Fccl5BRYtAUpsQEqgBly8UdTcdosPZApHwXmcQaPQUNQq0Ob W57WmpDi6U1aBcpERgHkE7qJ5gVmRafPJBVyYcAJteMTdleMAs8btbJFgcRfxgt+2PM/BzOXeVy 2rqAkEFy3Ip+jPayO4LytdCGeOs98xMzNFw0es4s2o0H6hpH91mbZq5V/r3dytSpbgQVMG6gnTM D2j3nUyQPl9IMMkfzYZDKJVTDvtiRgvwJ25LSBcxvbiqQm2GGcowEN0M4SLL+SIS1QY6mvY45E8 4sbS7SuKKUwCAuCRNXiSUcIwPVp+NvtK/lUkaiciNzwXUeQ7rBN3p6DyeXxs7DX9PyGCOChKQJ3 6qPkUJFjjiJ6zyhnoaK12n6YygBElp+lEubilwZjmi0TuGSG6p+w55pI+0uGcGt5EoZZBI7z6ks Z47zq4LR26kuJQN/ywlb1Bd6HPf8FSn+xNUP+UODnYvclVGJ8J/YfitOJkPlJr8KinLLkWSv/+6 mbYzoZn7s3/BH2cCJ9veQ2/Zlk+UVp2R9hi2BSwcdbovyvBnVJ3E4FSe/bW7r+Vy3TNIrhWASXZ GEAHTVCdUizBRqXbrxG+uQewod4oKxV7FWvKILAgdFAb4neL7SWrMJQgb2eFdVBZYq+YvIYoAnA PfbG3l9B2elM2y/GACodM07zQ+hlpQZ4FYwhoYg== 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-fsdevel@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)