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

Commit a85d6b82 authored by Kees Cook's avatar Kees Cook
Browse files

usercopy: force check_object_size() inline



Just for good measure, make sure that check_object_size() is always
inlined too, as already done for copy_*_user() and __copy_*_user().

Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent ab29b33a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ static inline int arch_within_stack_frames(const void * const stack,
extern void __check_object_size(const void *ptr, unsigned long n,
					bool to_user);

static inline void check_object_size(const void *ptr, unsigned long n,
static __always_inline void check_object_size(const void *ptr, unsigned long n,
					      bool to_user)
{
	if (!__builtin_constant_p(n))