From: Andrew Morton <akpm@linux-foundation.org>
To: Daniel Micay <danielmicay@gmail.com>
Cc: Kees Cook <keescook@chromium.org>,
kernel-hardening@lists.openwall.com,
linux-kernel <linux-kernel@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Daniel Axtens <dja@axtens.net>
Subject: Re: [PATCH v3] add the option of fortified string.h functions
Date: Thu, 25 May 2017 16:52:26 -0700 [thread overview]
Message-ID: <20170525165226.a2a1064741d7a7ef66ef21b3@linux-foundation.org> (raw)
In-Reply-To: <20170522231025.30463-1-danielmicay@gmail.com>
On Mon, 22 May 2017 19:10:25 -0400 Daniel Micay <danielmicay@gmail.com> wrote:
> This adds support for compiling with a rough equivalent to the glibc
> _FORTIFY_SOURCE=1 feature, providing compile-time and runtime buffer
> overflow checks for string.h functions when the compiler determines the
> size of the source or destination buffer at compile-time. Unlike glibc,
> it covers buffer reads in addition to writes.
i386 allmodconfig, gcc-6.3.0:
In file included from ./arch/x86/include/asm/string.h:2:0,
from ./include/linux/string.h:18,
from ./arch/x86/include/asm/page_32.h:34,
from ./arch/x86/include/asm/page.h:13,
from ./arch/x86/include/asm/thread_info.h:11,
from ./include/linux/thread_info.h:37,
from ./arch/x86/include/asm/preempt.h:6,
from ./include/linux/preempt.h:80,
from ./include/linux/spinlock.h:50,
from ./include/linux/seqlock.h:35,
from ./include/linux/time.h:5,
from ./include/linux/stat.h:18,
from ./include/linux/module.h:10,
from drivers/acpi/ac.c:23:
./include/linux/string.h: In function 'acpi_ac_add':
./arch/x86/include/asm/string_32.h:182:25: error: inlining failed in call to always_inline '__builtin_memcpy': function body not available
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^
./include/linux/string.h:301:24: note: in expansion of macro 'memcpy'
__FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
^~~~~~
In file included from ./arch/x86/include/asm/page_32.h:34:0,
from ./arch/x86/include/asm/page.h:13,
from ./arch/x86/include/asm/thread_info.h:11,
from ./include/linux/thread_info.h:37,
from ./arch/x86/include/asm/preempt.h:6,
from ./include/linux/preempt.h:80,
from ./include/linux/spinlock.h:50,
from ./include/linux/seqlock.h:35,
from ./include/linux/time.h:5,
from ./include/linux/stat.h:18,
from ./include/linux/module.h:10,
from drivers/acpi/ac.c:23:
./include/linux/string.h:204:10: note: called from here
return __builtin_strcpy(p, q);
^~~~~~~~~~~~~~~~~~~~~~
In file included from ./arch/x86/include/asm/string.h:2:0,
from ./include/linux/string.h:18,
from ./arch/x86/include/asm/page_32.h:34,
from ./arch/x86/include/asm/page.h:13,
from ./arch/x86/include/asm/thread_info.h:11,
from ./include/linux/thread_info.h:37,
from ./arch/x86/include/asm/preempt.h:6,
from ./include/linux/preempt.h:80,
from ./include/linux/spinlock.h:50,
from ./include/linux/seqlock.h:35,
from ./include/linux/time.h:5,
from ./include/linux/stat.h:18,
from ./include/linux/module.h:10,
from drivers/acpi/ac.c:23:
./arch/x86/include/asm/string_32.h:182:25: error: inlining failed in call to always_inline '__builtin_memcpy': function body not available
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^
./include/linux/string.h:301:24: note: in expansion of macro 'memcpy'
__FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
^~~~~~
In file included from ./arch/x86/include/asm/page_32.h:34:0,
from ./arch/x86/include/asm/page.h:13,
from ./arch/x86/include/asm/thread_info.h:11,
from ./include/linux/thread_info.h:37,
from ./arch/x86/include/asm/preempt.h:6,
from ./include/linux/preempt.h:80,
from ./include/linux/spinlock.h:50,
from ./include/linux/seqlock.h:35,
from ./include/linux/time.h:5,
from ./include/linux/stat.h:18,
from ./include/linux/module.h:10,
from drivers/acpi/ac.c:23:
./include/linux/string.h:204:10: note: called from here
return __builtin_strcpy(p, q);
^~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [drivers/acpi/ac.o] Error 1
make: *** [drivers/acpi/ac.o] Error 2
next prev parent reply other threads:[~2017-05-25 23:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 23:10 Daniel Micay
2017-05-22 23:24 ` Kees Cook
2017-05-23 22:48 ` Andrew Morton
2017-05-24 2:12 ` Kees Cook
2017-05-25 0:24 ` Daniel Micay
2017-05-25 23:52 ` Andrew Morton [this message]
2017-05-26 3:40 ` Kees Cook
2017-05-26 8:35 ` Daniel Micay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170525165226.a2a1064741d7a7ef66ef21b3@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=danielmicay@gmail.com \
--cc=dja@axtens.net \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome