From patchwork Wed Feb 28 14:30:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinbum Park X-Patchwork-Id: 10247639 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4AFA160362 for ; Wed, 28 Feb 2018 14:31:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33FC128D8A for ; Wed, 28 Feb 2018 14:31:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2865328D9A; Wed, 28 Feb 2018 14:31:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 6AA8B28D8A for ; Wed, 28 Feb 2018 14:31:01 +0000 (UTC) Received: (qmail 29935 invoked by uid 550); 28 Feb 2018 14:30:59 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 29826 invoked from network); 28 Feb 2018 14:30:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=iomQ1J7o3UWUqhV7v91Kswn2UXPSlUB4AVwkcqhYuJ0=; b=nq/bAiZjeMBBE2s2glGQQGRARulUwvoxOXtVXTpWj/D/f+kBzJA5yutUlVsFlCp1o0 CoepQSk8Etm30n128ZimBgyq9z+N31bnVPUZ41NpAJO2AatJWdp2Eei3sOXhQ/tkdb3o uXMULbdx+GtAO8sG/YglNt5Am80iTOzw9iu3eL8hRO35dGxUUGSDMeCdrHCw0u+lKnk0 SA7AycXJdzRZUS0GJuv62TdblH8gXHCP+KBttSrhY7mGhakYr5JqH/39Lq0EKgibEjOr XCuBSJ+KlA2/pf6fBoAVH+4ZVA0A7XB1Ox9MgxKaaUSQ6U0QtkejKON9ACv09w04zeoF XZtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=iomQ1J7o3UWUqhV7v91Kswn2UXPSlUB4AVwkcqhYuJ0=; b=pgmCi05RBZCMauoYbC9rh/mvAuZS1wf3iFKZHr0luvgrhmuE2IBb1WQLkuukX6wvEN UyCAkx+rB7VwfG4ncKrzXgSxsoaAO2TZNmhOdlZEHia9Y+pzQVKiCYC9+ls0QL/lfFEz 5hxBQZKt23HkvACuM1EpxFhzzB6qBv7gMXoYV8jsOHE9u4uug+l6IKkLbSLVehmrQbQb aFbrht4DudMKh4JIjzGqPxl1X8dIaMhEfnBJOiwM1TTROzpWGbTt6rVB6TELbXi+IIH7 PNaWSGNF416HV5/cIljEqta9Mj5QlPv3dzXd9J1kEoG5kILMo1GeSmhDOXAKaOiZh+c/ iVXw== X-Gm-Message-State: APf1xPAWgwoQUJDQhyVu5zvvpyz8qnBJh+jifVakyfvuVZzCrH98Hl11 93VvB9FODDpZrfvKeTfHeUg= X-Google-Smtp-Source: AH8x227LBnk14O5LBAmQqwQZNH/Ln7a7Oq+AsgbUCsYR58jz3H8ZHy2PYfhrN6YCknnV7b7ipcLUmA== X-Received: by 10.101.98.85 with SMTP id q21mr14103528pgv.182.1519828244876; Wed, 28 Feb 2018 06:30:44 -0800 (PST) Date: Wed, 28 Feb 2018 23:30:37 +0900 From: Jinbum Park To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Cc: pombredanne@nexb.co, gregkh@linuxfoundation.org, tglx@linutronix.de, kstewart@linuxfoundation.org, luto@amacapital.net, dsafonov@virtuozzo.com, keescook@chromium.org, will.deacon@arm.com, mark.rutland@arm.com, danielmicay@gmail.com, arnd@arndb.de, catalin.marinas@arm.com Subject: [kernel-hardening] [PATCH 2/2] arm: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE Message-ID: <20180228143037.GA3150@pjb1027-Latitude-E5410> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: ClamAV using ClamSMTP CONFIG_FORTIFY_SOURCE detects various overflows at compile-time. (6974f0c4555e ("include/linux/string.h: add the option of fortified string.h functions) ARCH_HAS_FORTIFY_SOURCE means that the architecture can be built and run with CONFIG_FORTIFY_SOURCE. Since ARM can be built and run with that flag like other architectures, select ARCH_HAS_FORTIFY_SOURCE as default. Signed-off-by: Jinbum Park Acked-by: Kees Cook --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7e3d535..3765336 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -7,6 +7,7 @@ config ARM select ARCH_HAS_DEBUG_VIRTUAL if MMU select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_ELF_RANDOMIZE + select ARCH_HAS_FORTIFY_SOURCE select ARCH_HAS_SET_MEMORY select ARCH_HAS_PHYS_TO_DMA select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL