mbox series

[v2,0/3] Make sscanf() stricter

Message ID 20230610170743.2510-1-demi@invisiblethingslab.com (mailing list archive)
Headers show
Series Make sscanf() stricter | expand

Message

Demi Marie Obenour June 10, 2023, 5:07 p.m. UTC
Roger Pau Monné suggested making xenbus_scanf() stricter instead of
using a custom parser.  Christoph Hellwig asked why the normal vsscanf()
cannot be made stricter.  Richard Weinberger mentioned Linus Torvalds’s
suggestion of using ! to allow overflow.

Changes since v1:

- Better commit messages.
- Use ! to explicitly opt-in to allowing overflow.
- Treat overflow as a conversion failure instead of returning ERANGE.
- Drop the first patch (removal of simple_strtoll()) as it breaks
  bcache.
- Stop skipping spaces in vsscanf() instead of adding a separate
  vsscanf_strict() function.

Demi Marie Obenour (3):
  vsscanf(): Integer overflow is a conversion failure
  vsscanf(): do not skip spaces
  Strict XenStore entry parsing

 .../hive_isp_css_include/platform_support.h   |  1 -
 drivers/xen/xenbus/xenbus_xs.c                | 17 ++--
 include/linux/limits.h                        |  1 +
 include/linux/mfd/wl1273-core.h               |  3 -
 include/vdso/limits.h                         |  3 +
 lib/vsprintf.c                                | 90 +++++++++++++------
 6 files changed, 80 insertions(+), 35 deletions(-)