Re: sscanf: implement basic character sets
From: Jessica Yu
Date: Tue Feb 23 2016 - 14:40:22 EST
+++ Kees Cook [23/02/16 11:00 -0800]:
On Tue, Feb 23, 2016 at 2:56 AM, Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> 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@xxxxxxxxxx
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