From patchwork Mon May 22 01:32:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Axtens X-Patchwork-Id: 9739549 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 572AF6034C for ; Mon, 22 May 2017 01:33:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47350285CF for ; Mon, 22 May 2017 01:33:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A74A285F3; Mon, 22 May 2017 01:33:21 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 4109C285CF for ; Mon, 22 May 2017 01:33:19 +0000 (UTC) Received: (qmail 21975 invoked by uid 550); 22 May 2017 01:33:18 -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 21874 invoked from network); 22 May 2017 01:33:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aYWsZesRTyN1EYQif6jRwfDkI/wgSA7GELH9fsgyjfU=; b=iV0Y0m0xGbyVOz26VkmsNR+wpXGiiuewqn7ADOo89P3tAx9rYhrrav7KC15Q/fRIAT tt5yiU0G5PA8CBEN/YIjItWRuwDVn/eLqnRh020xrQ62gb4dnQ56Kfa8wR0immZ5AUS4 oOh3VADWNHNdF2qQULQ8etSvuzLDtsNfC6nlc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aYWsZesRTyN1EYQif6jRwfDkI/wgSA7GELH9fsgyjfU=; b=I8hHjYjYSZXvifdVoaL2/1NlfFjuicP5vQNA9f3EvIS4u+HTuHVpCyWXqln1V5th0B uMAipy9u3wUOZDjVaXuNpi/PoNv6aP/N3Kwj4K690CLVpXfxKiBrM04stBEHa/kL8lSK GqUsC8fdOM6vZ1MBM4hgKJYeA/Q5oXAQFEcx3uf/CCxyiOop7qKVDmjDslPxMQz9dTS1 WmuOZJfUQ+qeXDipB1JvPNAOnv6MflQdIc7aEJCVd09QJSk3SNzjRyhW0w7+V52Vfzc4 2hapoc01NHh1EQr53PUvw/nhfxgpcwBbM3f9r8+p6yD1SKCmn/zI0Zr+DA2XTKJFwpNi imcQ== X-Gm-Message-State: AODbwcCllciPivycwE8TilswwkEM+qiPAA9xegGVdKEKt9kgkvU2ZuiD M3N7qcnQtHmkPD6S X-Received: by 10.55.31.38 with SMTP id f38mr17850130qkf.267.1495416784278; Sun, 21 May 2017 18:33:04 -0700 (PDT) From: Daniel Axtens To: kernel-hardening@lists.openwall.com, linuxppc-dev@lists.ozlabs.org Cc: Daniel Axtens , Kees Cook , Daniel Micay Date: Mon, 22 May 2017 11:32:32 +1000 Message-Id: <20170522013233.21780-2-dja@axtens.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170522013233.21780-1-dja@axtens.net> References: <20170522013233.21780-1-dja@axtens.net> Subject: [kernel-hardening] [PATCH 1/2] powerpc: Don't fortify prom_init X-Virus-Scanned: ClamAV using ClamSMTP prom_init is a bit special; in theory it should be able to be linked separately to the kernel. To keep this from getting too complex, the symbols that prom_init.c uses are checked. Fortification adds symbols, and it gets quite messy as it includes things like panic(). So just don't fortify prom_init.c for now. Cc: Kees Cook Cc: Daniel Micay Signed-off-by: Daniel Axtens Acked-by: Michael Ellerman --- This will need to go in before the main fortify support, but it doesn't make any sense in the absence of fortify. I think it would make most sense for Kees to queue this up with the main fortify patch, with an Ack from mpe? --- arch/powerpc/kernel/prom_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index dd8a04f3053a..613f79f03877 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -15,6 +15,9 @@ #undef DEBUG_PROM +/* we cannot use FORTIFY as it brings in new symbols */ +#define __NO_FORTIFY + #include #include #include