From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753439AbcBVTj0 (ORCPT ); Mon, 22 Feb 2016 14:39:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43740 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752673AbcBVTjY (ORCPT ); Mon, 22 Feb 2016 14:39:24 -0500 Date: Mon, 22 Feb 2016 14:39:21 -0500 From: Jessica Yu To: Andy Shevchenko Cc: Andrew Morton , Rasmus Villemoes , Kees Cook , linux-kernel@vger.kernel.org Subject: Re: Implement character sets for sscanf() Message-ID: <20160222193921.GD31460@packer-debian-8-amd64.digitalocean.com> References: <1455931259-27117-1-git-send-email-jeyu@redhat.com> <1456133234.13244.16.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1456133234.13244.16.camel@linux.intel.com> X-OS: Linux eisen.io 3.16.0-4-amd64 x86_64 User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 22 Feb 2016 19:39:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Andy Shevchenko [22/02/16 11:27 +0200]: >On Fri, 2016-02-19 at 20:20 -0500, Jessica Yu wrote: >> Hi, >> >> This patch adds support for the '%[' conversion specifier for >> sscanf(). >> Since functions that calculate substring lengths based on accepted or >> rejected characters already exist in the kernel (namely strspn() and >> strcspn()), it's not much of a stretch to add some basic support for >> the >> bracket '%[' conversion specifier for sscanf(). This is useful in >> cases >> where we'd like to match substrings delimited by something other than >> spaces. The original motivation for this patch actually came from >> livepatch >> (https://lkml.org/lkml/2016/2/8/790), where we were trying to come up >> with >> a clean way to parse symbol names with substrings delimited by >> periods and >> commas. >> >> Patch based on linux-next-20160219. >> >> Here are some test cases: > >Test cases should land into lib/test_scanf.c and be submitted as a >separate patch. > >Also, you have something misconfigured when you sent patches. git-send- >email usually does a perfect job. Thanks for the tip. Yeah, I had a small hiccup with git-send-email, which is why the patchset came out like that :-\ In any case, the attached test cases are more for the benefit of the patch reviewer, not something I intended to be merged. For v2, I will just send the single patch out. Jessica