Files
linux/arch/x86/boot/compressed/error.h
T
Kees Cook 60854a12d2 x86/boot: Declare error() as noreturn
The compressed boot function error() is used to halt execution, but it
wasn't marked with "noreturn". This fixes that in preparation for
supporting kernel FORTIFY_SOURCE, which uses the noreturn annotation
on panic, and calls error(). GCC would warn about a noreturn function
calling a non-noreturn function:

  arch/x86/boot/compressed/misc.c: In function ‘fortify_panic’:
  arch/x86/boot/compressed/misc.c:416:1: warning: ‘noreturn’ function does return
   }
 ^

Signed-off-by: Kees Cook <[email protected]>
Cc: Daniel Micay <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Link: http://lkml.kernel.org/r/20170506045116.GA2879@beast
Signed-off-by: Ingo Molnar <[email protected]>
2017-05-07 10:59:05 +02:00

10 lines
184 B
C

#ifndef BOOT_COMPRESSED_ERROR_H
#define BOOT_COMPRESSED_ERROR_H
#include <linux/compiler.h>
void warn(char *m);
void error(char *m) __noreturn;
#endif /* BOOT_COMPRESSED_ERROR_H */