Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5092061imm; Tue, 31 Jul 2018 05:29:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd0G2x8en0Dr6vKlLOMZ7/Lggxp28ZNH+7tvYaghAz2Q6GCKMjFNQkyZ7HVEglOIPO19+H9 X-Received: by 2002:a63:d244:: with SMTP id t4-v6mr20393074pgi.335.1533040156209; Tue, 31 Jul 2018 05:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533040156; cv=none; d=google.com; s=arc-20160816; b=ddAoZ5j2n4cQZifxuw0rirc0rRSDlB0hlTzBKoPnfl0Z+JLxCe5mDSiYasw8to+imh zLfi87pw42QHwlMX/nD5udeOjdudsA1dPbgqpov8oqYhhQG2LefCcf4FT/1R4afAPNpt T7OmH9HzhF/y47UrJosae1CK6nMUJB+QPtiTLLqoE2uTmdpkO9sHpOsfk/+e5uI87jcb 0Z3av5WDJ/mhi0IXJm2Skka6zTiJkoCUKf+jN1AGmTE6ZRX3F3RSUrfAq1e4kWzUbPfl 0GSRYmzmtDLl+GLL4mUzZbrSApfkhUZHa9cME3gBzKNETDz1Dr2iEgw4+GQobhYtZEbs ff4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=jxLgCcjNq988pwATKQv9XXk91ROeJF9hbCLwptOWBy4=; b=k3/1ryAY4OvnTSS5uZNCHNGNPYu+O8dCmcSKcD3cVCJkTgBwt1gpdWBMGVQYEsXffH ywKwM0eY/nDYyemHTDAhDrsX21ZWdjbMtk1v1lcN8kTNVSzog63qP/mIfIzvNImTCAbw A6WjC4vRmGtOf9trj40nuvwIYzIz8uhA0VKklkUTf1FgefIQqqAWOjkYbiAS/OHm25J9 5WJn5dDt/2skVT2bUvqul5LyCvl4ZiMKLFTLoZVXPRz60eldukkLCpPKNTuI0SgjAUv8 Dh1wwVNRmPOQkeRwUENY5JoCZsfHETzNEOLQnfFyDivopEVkt0Re15Tcwxa6IRqKfRUL dNtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7-v6si12071117plt.4.2018.07.31.05.28.58; Tue, 31 Jul 2018 05:29:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732094AbeGaOIJ (ORCPT + 99 others); Tue, 31 Jul 2018 10:08:09 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:38938 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732000AbeGaOIJ (ORCPT ); Tue, 31 Jul 2018 10:08:09 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 70FBE8068C; Tue, 31 Jul 2018 14:28:02 +0200 (CEST) Date: Tue, 31 Jul 2018 14:28:01 +0200 From: Pavel Machek To: Matthew Wilcox Cc: David Howells , "Theodore Y. Ts'o" , Linus Torvalds , Al Viro , linux-fsdevel , Linux Kernel Mailing List Subject: Re: [PATCH 36/38] vfs: Add a sample program for the new mount API [ver #10] Message-ID: <20180731122801.GA14972@amd> References: <20180730183847.GB5544@bombadil.infradead.org> <20180730194938.GA12962@bombadil.infradead.org> <20180730210209.GY21725@thunk.org> <20180730235849.GA19692@bombadil.infradead.org> <20180731005802.GB21725@thunk.org> <18974.1533031913@warthog.procyon.org.uk> <20180731113422.GA22939@amd> <20180731120752.GA23378@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: <20180731120752.GA23378@bombadil.infradead.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue 2018-07-31 05:07:52, Matthew Wilcox wrote: > On Tue, Jul 31, 2018 at 01:34:22PM +0200, Pavel Machek wrote: > > On Tue 2018-07-31 11:11:53, David Howells wrote: > > > Pavel Machek wrote: > > > > Proposal is "message %s foo %s\0param 1\0param2\0", only strings > > > > allowed. > > >=20 > > > I think that's too strict and you will need to allow integer values, = IP > > > addresses and possibly other things also. It could certainly have a = limited > > > set (e.g. no kernel pointers). > >=20 > > I'd always use strings at kernel->user interface. Yes, we should > > support integers and IP addresses in kernel, but I'd convert them to > > strings before passing them to userspace. >=20 > Then you haven't solved the translation problem at all; you've just made > the in-kernel implementation harder. One example from the gettext docs: >=20 > In Polish we use e.g. plik (file) this way: >=20 > 1 plik > 2,3,4 pliki > 5-21 plik=F3w > 22-24 pliki > 25-31 plik=F3w >=20 > Your proposal means that userspace needs to detect "%s file", determine > if the corresponding string consists of ^[0-9]*$, then parse the string > to figure out which of the plik* words is the correct one to use. Have you actually used computer set in slavic language? Receiving "5 soubor(u) zkopirovano" is still preferable to message in english. > In my preferred solution of just sending the damned english string, > it's no more complex to regex match the string for "[0-9]* file", and > choose the appropriate plik* translation. Regexes do not work in presence of arbitrary strings in the message. If we had a way to tell start / end of string inserted in the message, yes, the problem would be solved. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAltgVdEACgkQMOfwapXb+vKmQQCfVXU6GDtXvZK7L3EqOME4lqZQ h4IAn0fHutBDMGTB1mSw3+9wRrKTr6yc =OJPq -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3--