From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 574E1C433EF for ; Wed, 29 Jun 2022 01:06:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229707AbiF2BGW (ORCPT ); Tue, 28 Jun 2022 21:06:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbiF2BGV (ORCPT ); Tue, 28 Jun 2022 21:06:21 -0400 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37950193F5; Tue, 28 Jun 2022 18:06:21 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 107D53200258; Tue, 28 Jun 2022 21:06:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 28 Jun 2022 21:06:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=themaw.net; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1656464779; x= 1656551179; bh=K2oGX6SnfanfkQgoCUAA8hU3hd1LuBWTiUjpPxiK7ZY=; b=J U7i6WnNuRDBIutZR8YpziE8loY9a8yFaUxXbtI5yEutajDZJE323zTAJfPsLdhnH H4imAgv2ZqEUTRNd5U9eeJrenIqGugnKzdD32bMF6KwvYNkjeld9je7WJ2ueDnd/ BjZZOmUPwwgC8XPSoYGN4OTauFquyr7lRDI9V07uxzZU1L7UBAmKflgcMo7knwWe Wsh8kesFHQLXInoBGuUuNIhtLeBKUZ8lF7FLbK7VaL+2/B+x0Hwe5MVrVrIajQ8e /fNUT6lyDPhjshBppf7m9+gPJmTJgnW+Og44MdW2ov/NsyZlJLPaPut/z9VPbXru 1j8uP6Oj4puej71tJa4dA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1656464779; x= 1656551179; bh=K2oGX6SnfanfkQgoCUAA8hU3hd1LuBWTiUjpPxiK7ZY=; b=g XGUsMOO36N+TFIcUNJAG5GAr63DGkcYVq44J+rI4gbMAadCO4vVza/AJpxczJSP4 bO3g8HeMnAdtJK2MC4qp7vvTNFTaCt94iM77VbuI7PBlYj7BeG7ZpwS5Iw0AAqeZ wv+uSXPjxDu5ae2O1Xbi1TZdVPQEwd8t5pWiYMQcik7gAhqjPzP7v/j7ElPgHsWo XPTz4/Ef2H5gRwghvQgNVV8HJYoW1j9OFKlWd4iUb7CcchwWpNfx54olYHMZ4P5n KNJz4js672RrNLjQdk2rnNnFoz7hEPMhAkRfQOO4ROv4Nbn19JrBgdJJOSbQvPss 1xD0gTRfYers3yK4gIZNg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudegkedggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefkrghn ucfmvghnthcuoehrrghvvghnsehthhgvmhgrfidrnhgvtheqnecuggftrfgrthhtvghrnh epuefhueeiieejueevkefgiedtteehgfdutdelfffhleeflefhudeuvdefhfeghfehnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprhgrvhgvnh esthhhvghmrgifrdhnvght X-ME-Proxy: Feedback-ID: i31e841b0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Jun 2022 21:06:15 -0400 (EDT) Message-ID: Date: Wed, 29 Jun 2022 09:06:13 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 1/2] vfs: parse: deal with zero length string value Content-Language: en-US To: Al Viro Cc: Andrew Morton , Siddhesh Poyarekar , David Howells , Miklos Szeredi , Carlos Maiolino , linux-fsdevel , Kernel Mailing List References: <165637619182.37717.17755020386697900473.stgit@donald.themaw.net> <165637625215.37717.9592144816249092137.stgit@donald.themaw.net> From: Ian Kent In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/6/22 01:55, Al Viro wrote: > On Tue, Jun 28, 2022 at 08:30:52AM +0800, Ian Kent wrote: >> Parsing an fs string that has zero length should result in the parameter >> being set to NULL so that downstream processing handles it correctly. >> For example, the proc mount table processing should print "(none)" in >> this case to preserve mount record field count, but if the value points >> to the NULL string this doesn't happen. > Hmmm... And what happens if you feed that to ->parse_param(), which > calls fs_parse(), which decides that param->key looks like a name of e.g. > u32 option and calls fs_param_is_u32() to see what's what? OOPS is a form > of rejection, I suppose, but... Oh ... yes, would you be ok with an update that moves the "param.type = fs_value_is_string;" inside the above else clause? Ian