From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754962AbcBWTkR (ORCPT ); Tue, 23 Feb 2016 14:40:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55408 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751374AbcBWTkP (ORCPT ); Tue, 23 Feb 2016 14:40:15 -0500 Date: Tue, 23 Feb 2016 14:40:12 -0500 From: Jessica Yu To: Kees Cook Cc: Andy Shevchenko , Andrew Morton , Rasmus Villemoes , LKML Subject: Re: sscanf: implement basic character sets Message-ID: <20160223194012.GB30919@packer-debian-8-amd64.digitalocean.com> References: <1456176259-32643-1-git-send-email-jeyu@redhat.com> <1456224992.13244.38.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-OS: Linux eisen.io 3.16.0-4-amd64 x86_64 User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Kees Cook [23/02/16 11:00 -0800]: >On Tue, Feb 23, 2016 at 2:56 AM, Andy Shevchenko > wrote: >> On Mon, 2016-02-22 at 16:24 -0500, Jessica Yu wrote: >>> Implement basic character sets for the '%[]' conversion specifier. > >What part of the kernel will be using this feature, by the way? > I explained the motivation a bit more in patch v1's cover letter: https://lkml.kernel.org/g/1455931259-27117-1-git-send-email-jeyu@redhat.com The original idea stemmed from a discussion from the kernel livepatch mailing list: https://lkml.org/lkml/2016/2/8/790 We were looking for a way to parse out substrings delimited by something other than spaces. Specifically, in livepatch we are parsing symbol names that contain substrings (which contain livepatch-specific information) delimited by '.' and ','. Instead of manually looking for these delimiters and adding a lot of string code to livepatch, it would be cleaner to have a single sscanf() call to do the parsing for us. Jessica