Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b401ddaa authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "include: Disable compile time boundary check"

parents 2fed71ce 724ed8f4
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -224,6 +224,14 @@ config ARCH_HAS_FORTIFY_SOURCE
	  An architecture should select this when it can successfully
	  An architecture should select this when it can successfully
	  build and run with CONFIG_FORTIFY_SOURCE.
	  build and run with CONFIG_FORTIFY_SOURCE.


config FORTIFY_COMPILE_CHECK
	depends on ARCH_HAS_FORTIFY_SOURCE
	bool
	help
	  Disable compile time size check for string routines as part
	  of fortify source. Selecting this option will not enforce compile
	  time size check for string functions.

# Select if arch init_task initializer is different to init/init_task.c
# Select if arch init_task initializer is different to init/init_task.c
config ARCH_INIT_TASK
config ARCH_INIT_TASK
       bool
       bool
+7 −0
Original line number Original line Diff line number Diff line
@@ -173,9 +173,16 @@ static inline const char *kbasename(const char *path)
#define __RENAME(x) __asm__(#x)
#define __RENAME(x) __asm__(#x)


void fortify_panic(const char *name) __noreturn __cold;
void fortify_panic(const char *name) __noreturn __cold;

#ifdef CONFIG_FORTIFY_COMPILE_CHECK
void __read_overflow(void) __compiletime_error("detected read beyond size of object passed as 1st parameter");
void __read_overflow(void) __compiletime_error("detected read beyond size of object passed as 1st parameter");
void __read_overflow2(void) __compiletime_error("detected read beyond size of object passed as 2nd parameter");
void __read_overflow2(void) __compiletime_error("detected read beyond size of object passed as 2nd parameter");
void __write_overflow(void) __compiletime_error("detected write beyond size of object passed as 1st parameter");
void __write_overflow(void) __compiletime_error("detected write beyond size of object passed as 1st parameter");
#else
#define __read_overflow(void) do { } while (0)
#define __read_overflow2(void) do { } while (0)
#define __write_overflow(void) do { } while (0)
#endif


#if !defined(__NO_FORTIFY) && defined(__OPTIMIZE__) && defined(CONFIG_FORTIFY_SOURCE)
#if !defined(__NO_FORTIFY) && defined(__OPTIMIZE__) && defined(CONFIG_FORTIFY_SOURCE)
__FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size)
__FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size)