Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2902663ybd; Mon, 24 Jun 2019 15:03:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNTZupA70aZVHPKPf/HbyQfmXnu3YmSfsERhqc/li912OtxxDSsglX0MimlIwEv9k0uPl7 X-Received: by 2002:a65:66d1:: with SMTP id c17mr23304826pgw.293.1561413836256; Mon, 24 Jun 2019 15:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561413836; cv=none; d=google.com; s=arc-20160816; b=UtTO2LBXaHdpWDyI+ARB46MNMrFpStIo2Bcb94ljKvx/Nnswbn1mANXsh6Xg6iqjyO M5H0/k4eP7ZYDoWuOTWbe2wzdPPcRMuCxNMebD80J26QV4QwbjZMR2TmaO1SGlgQ7AaM d4LbA72lD4KWbaNFqB874zPpGlCF9EC39YcDDDpmRUVUTowN4oNSPXJl7COZmDgjDWMn WvDNj2ES/bW7lJwzqvTkzCy0MIWYzXGYstVxHfEuy/ru8D4tNncb5+0cgv+QxfEsnEdy Q27dw0fMdGCFS8DaAiLhsALZ2wTE2J77enVuqqsOGQtGNB/gNCRLSt9Xc/MNVOMi7ax/ Lvjg== 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; bh=RiEjTsmanCFnxlSCcENs8NTtrxSYLAd+luy3S3AHtIc=; b=ZnTK44Z36MR6XwM1buD3MW+SpPHwvkGbkLvE4/85EAXwkLHGoUcPFsoTWPeOK+yow2 cL9a2e+GCQEEVX9IMfWQ9S0Dbf56jWRIzJOYkcfopKI3OZnC12eX6uxt6nLdGe4VOKcY QNPZKjYdS+Jty1e0Nq4d0uMDZpBQqcYlkl0rObk+A5f9jSon1DiAn/2PXQMbbcADg1RO scjm/gBFm4YvmNDmpygK4uycNacI3nsRSYSX8ki+r5Yeo1bAbQq8XE6bb4GosmYoqaGF UVr59XGgHTbHPjHPJ1rYc40Pu6vtowY0l8s5jcHjFr1rZdg64LJmvV4R3hLMnH/6rUE9 KqWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-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 a25si12198968pfk.201.2019.06.24.15.03.34; Mon, 24 Jun 2019 15:03:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-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-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726730AbfFXVFM (ORCPT + 99 others); Mon, 24 Jun 2019 17:05:12 -0400 Received: from fieldses.org ([173.255.197.46]:48992 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727436AbfFXVFM (ORCPT ); Mon, 24 Jun 2019 17:05:12 -0400 Received: by fieldses.org (Postfix, from userid 2815) id 0FD8F1E67; Mon, 24 Jun 2019 17:05:12 -0400 (EDT) Date: Mon, 24 Jun 2019 17:05:12 -0400 From: "J. Bruce Fields" To: Kees Cook Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 08/16] nfsd: escape high characters in binary data Message-ID: <20190624210512.GA20331@fieldses.org> References: <1561042275-12723-1-git-send-email-bfields@redhat.com> <1561042275-12723-9-git-send-email-bfields@redhat.com> <20190621174544.GC25590@fieldses.org> <201906211431.E6552108@keescook> <20190622190058.GD5343@fieldses.org> <201906221320.5BFC134713@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201906221320.5BFC134713@keescook> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sat, Jun 22, 2019 at 01:22:56PM -0700, Kees Cook wrote: > On Sat, Jun 22, 2019 at 03:00:58PM -0400, J. Bruce Fields wrote: > > The logic around ESCAPE_NP and the "only" string is really confusing. I > > started assuming I could just add an ESCAPE_NONASCII flag and stick " > > and \ into the "only" string, but it doesn't work that way. > > Yeah, if ESCAPE_NP isn't specified, the "only" characters are passed > through. It'd be nice to have an "add" or a clearer way to do actual > ctype subsets, etc. If there isn't an obviously clear way to refactor > it, just skip it for now and I'm happy to ack your original patch. :) There may well be some simplification possible here.... There aren't really many users of "only", for example. I'll look into it some more. --b.