[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <32e8b52d64b642608595142ab2952f16@AcuMS.aculab.com>
Date: Tue, 13 Jun 2023 12:42:59 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Rasmus Villemoes' <linux@...musvillemoes.dk>,
Demi Marie Obenour <demi@...isiblethingslab.com>,
Hans de Goede <hdegoede@...hat.com>,
"Mauro Carvalho Chehab" <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Juergen Gross <jgross@...e.com>,
"Stefano Stabellini" <sstabellini@...nel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
Lee Jones <lee@...nel.org>, Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
"Andy Shevchenko" <andriy.shevchenko@...ux.intel.com>
CC: "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
"linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>,
"Christoph Hellwig" <hch@....de>
Subject: RE: [PATCH v3 3/4] vsscanf(): do not skip spaces
From: Rasmus Villemoes
> Sent: 12 June 2023 12:08
>
> On 10/06/2023 22.40, Demi Marie Obenour wrote:
> > Passing spaces before e.g. an integer is usually
> > not intended.
>
> Maybe, maybe not. But it's mandated by POSIX/C99.
>
> And of course we are free to ignore that and implement our own semantics
> (though within the constraints that we really want -Wformat to help us),
> but there seems to be existing code in-tree that relies on this
> behavior. For example I think this will break
> fsl_sata_intr_coalescing_store() which uses a scanf format of "%u%u".
>
> Sure, that could just say "%u %u" instead, but the point is that
> currently it doesn't. So without some reasonably thorough analysis
> across the tree, and updates of affected callers, NAK.
It would almost certainly need to be " %u %u" to allow for
userspace generating the input with "%6u %6u",
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists