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 63838C43334 for ; Tue, 28 Jun 2022 17:57:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233556AbiF1R5g (ORCPT ); Tue, 28 Jun 2022 13:57:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233538AbiF1R5d (ORCPT ); Tue, 28 Jun 2022 13:57:33 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B18BD6449; Tue, 28 Jun 2022 10:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Vjg9D6mYYFJGeU1AQjii4m5nzMNHpeZUnrBbDeaKDr4=; b=HA6Z1Qt57wuYGUSB9XJkb+MXDk QrX0xxYw7itX6Ii6Q0EXoAKY+2SThF/RndC3vzQ1xu2cF24+vsRNEGzQJNEelYhR+IEz9HozaNcX6 IJ3UUOCvurJJu7+M629WgZWW/5opgNM8j2oxBnQuWxggrstkNVeli9uRjfdocutzhGbRM9bgsh1Fe Ef2TySNknnxpMP41cKM7R+y3cpbUlD/1WkrXXEijlD5nah2BcZI3oeWlzjmpNz6jyubXW0pFHH5YF Qj4muANOfx3YbKJ+oHQjbtP66u09ckRTh1pGmj7QKRyOD3TQZiPZ7ZIWTKbFZG1bImSYmdCdxVadQ Rrw4V5Zg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1o6FSl-005hVo-OV; Tue, 28 Jun 2022 17:57:23 +0000 Date: Tue, 28 Jun 2022 18:57:23 +0100 From: Al Viro To: Ian Kent Cc: Andrew Morton , Siddhesh Poyarekar , David Howells , Miklos Szeredi , Carlos Maiolino , linux-fsdevel , Kernel Mailing List Subject: Re: [PATCH 2/2] vfs: escape hash as well Message-ID: References: <165637619182.37717.17755020386697900473.stgit@donald.themaw.net> <165637625806.37717.2027157232247047949.stgit@donald.themaw.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <165637625806.37717.2027157232247047949.stgit@donald.themaw.net> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, Jun 28, 2022 at 08:30:58AM +0800, Ian Kent wrote: > From: Siddhesh Poyarekar > > When a filesystem is mounted with a name that starts with a #: > > # mount '#name' /mnt/bad -t tmpfs > > this will cause the entry to look like this (leading space added so > that git does not strip it out): > > #name /mnt/bad tmpfs rw,seclabel,relatime,inode64 0 0 > > This breaks getmntent and any code that aims to parse fstab as well as > /proc/mounts with the same logic since they need to strip leading spaces > or skip over comment lines, due to which they report incorrect output or > skip over the line respectively. > > Solve this by translating the hash character into its octal encoding > equivalent so that applications can decode the name correctly. > > Signed-off-by: Siddhesh Poyarekar > Signed-off-by: Ian Kent ACK; I'll grab that one (in #work.misc - I don't believe it's #fixes fodder).