Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933089AbcCGXYi (ORCPT ); Mon, 7 Mar 2016 18:24:38 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:42550 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932596AbcCGXY3 (ORCPT ); Mon, 7 Mar 2016 18:24:29 -0500 Date: Mon, 7 Mar 2016 15:24:27 -0800 From: Andrew Morton To: Jessica Yu Cc: Rasmus Villemoes , Andy Shevchenko , Kees Cook , linux-kernel@vger.kernel.org Subject: Re: sscanf: implement basic character sets Message-Id: <20160307152427.89422fd4d6c0696cb1b12911@linux-foundation.org> In-Reply-To: <20160307231220.GC12689@packer-debian-8-amd64.digitalocean.com> References: <1456518059-7472-1-git-send-email-jeyu@redhat.com> <20160226202810.GA6566@packer-debian-8-amd64.digitalocean.com> <20160307231220.GC12689@packer-debian-8-amd64.digitalocean.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1617 Lines: 36 On Mon, 7 Mar 2016 18:12:20 -0500 Jessica Yu wrote: > +++ Jessica Yu [26/02/16 15:28 -0500]: > >+++ Jessica Yu [26/02/16 15:20 -0500]: > >>Implement basic character sets for the '%[' conversion specifier. > >> > >>The '%[' conversion specifier matches a nonempty sequence of characters > >>from the specified set of accepted (or with '^', rejected) characters > >>between the brackets. The substring matched is to be made up of characters > >>in (or not in) the set. This is useful for matching substrings that are > >>delimited by something other than spaces. > >> > >>This implementation differs from its glibc counterpart in the following ways: > >>(1) No support for character ranges (e.g., 'a-z' or '0-9') > >>(2) The hyphen '-' is not a special character > >>(3) The closing bracket ']' cannot be matched > >>(4) No support (yet) for discarding matching input ('%*[') > >> > >>Signed-off-by: Jessica Yu > > > >Since this version is largely based on Rasmus' sample bitmap code > >(with only very minor tweaks), what is the best way to provide > >attribution in this case? A Suggested-by: tag or another > >Signed-off-by: tag (since actual code is involved)? > > Andrew, friendly ping on this patch and question? :-) Rasmus's Signed-off-by: would be most appropriate, please. I've queued the patch for some testing, however the changelog which used to have IMO-inadequate justification now has no justification at all! So please send along a paragraph or two which we can put in there to explain to people why we believe this change should be made to the kernel. Thanks.