Linux-Sparse Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 00/13] format-check: add specific type checking
@ 2020-10-13 23:22 Luc Van Oostenryck
  2020-10-13 23:22 ` [PATCH 01/13] format-check: void * is not OK for strings, fix the test Luc Van Oostenryck
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Luc Van Oostenryck @ 2020-10-13 23:22 UTC (permalink / raw)
  To: linux-sparse; +Cc: Ben Dooks, Luc Van Oostenryck

These patches improve/complete the parsing of the lenght and
the type modifiers and, more importantly, add specific checking
functions for all the types, replacing the use of
check_assignment_types() which don't do the kind of type checking
needed here (and which evaluate expressions, something not
needed and which complicate the interface a lot).

These checking functions are not yet complete but are a solid
base for some further improvements. They already allow to
use 'sparse -Wformat' on the kernel without false positive
and can detect of a few errors.

The series is available for review & testing at:
  git://github.com/lucvoo/sparse-dev.git format-check


Luc Van Oostenryck (13):
  format-check: void * is not OK for strings, fix the test
  format-check: more complete parsing of the length & type modifiers
  format-check: add helper type_class()
  format-check: merge 'fmt_string' & 'string'
  format-check: remove unneeded member: target
  format-check: add a function to check to type of strings
  format-check: add a function to check to type of 'n' arguments
  format-check: add a function to check to type of pointers
  format-check: remove printf_fmt_print_pointer()
  format-check: add a function to check the type of floats
  format-check: add a function to check the type of integers
  format-check: remove wrappers around type checking methods
  format-check: simplify calling of parse_printf_get_fmt()

 validation/varargs-format-addrspace1.c |  12 +-
 verify-format.c                        | 496 ++++++++++++++++---------
 2 files changed, 323 insertions(+), 185 deletions(-)

-- 
2.28.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, back to index

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 23:22 [PATCH 00/13] format-check: add specific type checking Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 01/13] format-check: void * is not OK for strings, fix the test Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 02/13] format-check: more complete parsing of the length & type modifiers Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 03/13] format-check: add helper type_class() Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 04/13] format-check: merge 'fmt_string' & 'string' Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 05/13] format-check: remove unneeded member: target Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 06/13] format-check: add a function to check to type of strings Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 07/13] format-check: add a function to check to type of 'n' arguments Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 08/13] format-check: add a function to check to type of pointers Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 09/13] format-check: remove printf_fmt_print_pointer() Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 10/13] format-check: add a function to check the type of floats Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 11/13] format-check: add a function to check the type of integers Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 12/13] format-check: remove wrappers around type checking methods Luc Van Oostenryck
2020-10-13 23:22 ` [PATCH 13/13] format-check: simplify calling of parse_printf_get_fmt() Luc Van Oostenryck

Linux-Sparse Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-sparse/0 linux-sparse/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-sparse linux-sparse/ https://lore.kernel.org/linux-sparse \
		linux-sparse@vger.kernel.org
	public-inbox-index linux-sparse

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-sparse


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git