mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Kees Cook <keescook@chromium.org>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/16] nfsd: escape high characters in binary data
Date: Wed, 10 Jul 2019 18:09:31 -0400	[thread overview]
Message-ID: <20190710220931.GB11923@fieldses.org> (raw)
In-Reply-To: <20190628163358.GA31800@fieldses.org>

On Fri, Jun 28, 2019 at 12:33:58PM -0400, J. Bruce Fields wrote:
> But I may just give up and go with my existing patch and put
> off that project indefinitely, especially if there's no real need to fix
> the existing callers.

I went with the existing patch, but gave a little more thought to
string_escape_mem.  Stuff that bugs me:

	- ESCAPE_NP sounds like it means "escape nonprinting
	  characters", but actually means "do not escape printing
	  characters"
	- the use of the "only" string to limit the list of escaped
	  characters rather than supplement them is confusing and kind
	  of unhelpful.
	- most of the flags are actually totally unused
    
So what I'd like to do is:
    
	- eliminate unused flags
	- use the "only" string to add to, rather than replace, the list
	  of characters to escape
	- separate flags into those that select which characters to
	  escape, and those that choose the format of the escaping ("\ "
	  vs "\x20" vs "\040".)
    
I've got some patches that do all that and I think it works.  I need to
clean them up a bit and fix up the tests.

--b.

  reply	other threads:[~2019-07-10 22:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1561042275-12723-1-git-send-email-bfields@redhat.com>
     [not found] ` <1561042275-12723-9-git-send-email-bfields@redhat.com>
2019-06-21 17:45   ` J. Bruce Fields
2019-06-21 22:26     ` Kees Cook
2019-06-22 19:00       ` J. Bruce Fields
2019-06-22 20:22         ` Kees Cook
2019-06-24 21:05           ` J. Bruce Fields
2019-06-26 16:21             ` J. Bruce Fields
2019-06-27  4:16               ` Kees Cook
2019-06-27 15:23                 ` J. Bruce Fields
2019-06-27 20:21               ` J. Bruce Fields
2019-06-28  3:58                 ` Kees Cook
2019-06-28 16:33                   ` J. Bruce Fields
2019-07-10 22:09                     ` J. Bruce Fields [this message]
2019-07-11  1:54                       ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190710220931.GB11923@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®