linux-brain/scripts/genksyms
Michal Marek d93cf73400 genksyms: Fix segfault with invalid declarations
commit d920f7c662 upstream.

Do not try to recover too early and segfault when parsing invalid
declarations such as

echo 'int (int);' | scripts/genksyms/genksyms
echo 'int a, (int);' | scripts/genksyms/genksyms
echo 'extern void *__inline_memcpy((void *), (const void *), (__kernel_size_t));' | scripts/genksyms/genksyms

The last one was a real-life bug with
include/asm-generic/asm-prototypes.h on x86_64.

Reported-and-tested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
[arnd: rebase to 4.4, regenerate parse.tab.{c,h}]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:51 +01:00
..
.gitignore genksyms: migrate parser to implicit rules 2011-06-09 14:04:41 -04:00
Makefile scripts/genksyms: clean lex/yacc generated files 2012-01-08 14:48:15 +01:00
genksyms.c genksyms: Handle string literals with spaces in reference files 2018-01-10 09:27:13 +01:00
genksyms.h genksyms: Do not expand internal types 2011-10-11 12:00:39 +02:00
keywords.gperf genksyms: fix typeof() handling 2014-04-03 16:20:52 -07:00
keywords.hash.c_shipped genksyms: fix typeof() handling 2014-04-03 16:20:52 -07:00
lex.l genksyms: fix typeof() handling 2014-04-03 16:20:52 -07:00
lex.lex.c_shipped genksyms: fix typeof() handling 2014-04-03 16:20:52 -07:00
parse.tab.c_shipped genksyms: Fix segfault with invalid declarations 2018-02-25 11:03:51 +01:00
parse.tab.h_shipped genksyms: Fix segfault with invalid declarations 2018-02-25 11:03:51 +01:00
parse.y genksyms: Fix segfault with invalid declarations 2018-02-25 11:03:51 +01:00