From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795918400; b=q5pLpry51qUIe0plzFleNabh1QSLtB/pa4omVeF1CSqU1tXo60t3jD0PXRbGrFo4HPsS EAvAgWdfwWFZF1cOJ60lnb9P1bVp0ENxXLydvc5MSiUgoYf3PcynwzrvftMvKkl8wWBm6 21mPzuoPGJjtuYHQsDCchLdHbykvBZ3AA6jPrSbqAghHISll3UvkfMDra2VTMJfz6CT/f Bc/gi0+xtah6+M4cOvokZem7mv7Yu3Hhshr56gMLuc1gCMalGjdhcG6k3zoOI0VHbcEwz 2wmg+sJcFljBudm348XtU6QFMhRXMosezr+8EoucIDopmuEPaf0yy4BP+m17jItO+aQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795918400; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-Id: In-Reply-To:References:X-Mailer:Mime-Version:Content-Type: Content-Transfer-Encoding; bh=u5mUywjDpB3hO10gJh+mJHdCwOw9pKzKfIDd97Xr8l0=; b=Vt8jhIE8GT2GwsloLVdwV/gWwyDmXAp8mzCnstRO8eCs/6goEnP3q2fUe4XAHFZMFUXC KCsiYlGHefB0Qifk6smwTb2dJ/5hXizl+WG7c2AtmZ/xOLFlmcZQt7R8kTKNt7IxWuk52 2SE5OTQvpL2OJWBQsJntk6vNEin1pty9O02ohvlIJOGSFvn8eTqDmzOhNSf3CsKcLg75A riLZ0Xau7vcZy5fW1eZRTRCBLDeNgpgJmngiE6UDoj+lFsGfTgr3HoWv0KeXK0zjxEiY8 W8PS6yJCQywuEzfh1iHkzMSAmZxKQk13Y6slzGMwanJWrfl9afCx+Yxz9HuL8oBUeTQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=l5mGAexA; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83B0D606A31C for ; Sun, 29 Nov 2026 02:13:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=l5mGAexA Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00F731F00897; Sun, 29 Nov 2026 02:13:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1795918400; bh=u5mUywjDpB3hO10gJh+mJHdCwOw9pKzKfIDd97Xr8l0=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=l5mGAexA0TWsEDjxi4lXEo0gNZBIeZs05nukpgiMtWaMkVYXhPbmvfl//S/lNFREE kIo9dRIhLjt0iNaYsOQpDCABueYKWbNJZlde5J/EqfkCzd+jPk00AXPpaLjItMcmZq jX3Y9X7Du4OcixlUwBoLYaJxD39fYeRPFq0OEUII= Date: Sat, 28 Nov 2026 18:13:19 -0800 From: Andrew Morton To: Yifan Feng Cc: Hugh Dickins , David Hildenbrand , Baolin Wang , Gregory Price , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tmpfs: escape the space in the mpol mount option Message-Id: <20261128181319.fefb285a551d3e477a38237f@linux-foundation.org> In-Reply-To: <20261128233747.60722-1-evanfengff@gmail.com> References: <20261128233747.60722-1-evanfengff@gmail.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 28 Nov 2026 15:37:47 -0800 Yifan Feng wrote: > The policy names "weighted interleave" and "prefer (many)" contain a > space, and shmem_show_mpol() prints the name as it is. Readers of > /proc/mounts take the space as the end of the options field, so > mount(8) reads back mpol=prefer and an unrelated remount replaces the > policy: A little more info please. > # mount -t tmpfs -o 'mpol=prefer (many):0-1' none /mnt what's in /proc mounts at this point? > # mount -o remount,size=128M /mnt > # grep /mnt /proc/mounts > none /mnt tmpfs rw,relatime,size=131072k,inode64,mpol=local 0 0 > > With "weighted interleave" the same remount fails with EINVAL. > > Escape the value like the other fields of the line, so that the space > is printed as \040. and what does /proc/mounts look like after making this change?