From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90878C4167B for ; Fri, 11 Nov 2022 15:09:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234996AbiKKPJB (ORCPT ); Fri, 11 Nov 2022 10:09:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234923AbiKKPIF (ORCPT ); Fri, 11 Nov 2022 10:08:05 -0500 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DDA376B211; Fri, 11 Nov 2022 07:06:50 -0800 (PST) Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1otVcD-00037d-05; Fri, 11 Nov 2022 16:06:45 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id D998FC11F2; Fri, 11 Nov 2022 16:05:51 +0100 (CET) Date: Fri, 11 Nov 2022 16:05:51 +0100 From: Thomas Bogendoerfer To: John Thomson Cc: keescook@chromium.org, linux-mips@vger.kernel.org, linux-hardening@vger.kernel.org, kernel test robot Subject: Re: [PATCH v2] mips: boot/compressed: use __NO_FORTIFY Message-ID: <20221111150551.GF13465@alpha.franken.de> References: <20221031170749.2159430-1-git@johnthomson.fastmail.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221031170749.2159430-1-git@johnthomson.fastmail.com.au> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org On Tue, Nov 01, 2022 at 03:07:49AM +1000, John Thomson wrote: > In the mips CONFIG_SYS_SUPPORTS_ZBOOT kernel, fix the compile error > when using CONFIG_FORTIFY_SOURCE=y > > LD vmlinuz > mipsel-openwrt-linux-musl-ld: arch/mips/boot/compressed/decompress.o: in > function `decompress_kernel': > ./include/linux/decompress/mm.h:(.text.decompress_kernel+0x177c): > undefined reference to `warn_slowpath_fmt' > > kernel test robot helped identify this as related to fortify. The error > appeared with commit 54d9469bc515 ("fortify: Add run-time WARN for > cross-field memcpy()") > Link: https://lore.kernel.org/r/202209161144.x9xSqNQZ-lkp@intel.com/ > > Resolve this in the same style as commit cfecea6ead5f ("lib/string: > Move helper functions out of string.c") > > Reported-by: kernel test robot > Fixes: 54d9469bc515 ("fortify: Add run-time WARN for cross-field memcpy()") > Reviewed-by: Kees Cook > Signed-off-by: John Thomson > --- > v2: > fix subject typo: FORITFY->FORTIFY > --- > arch/mips/boot/compressed/decompress.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/compressed/decompress.c > index 5b38a802e101..c5dd415254d3 100644 > --- a/arch/mips/boot/compressed/decompress.c > +++ b/arch/mips/boot/compressed/decompress.c > @@ -9,6 +9,7 @@ > > #define DISABLE_BRANCH_PROFILING > > +#define __NO_FORTIFY > #include > #include > #include > -- > 2.37.2 applied to mips-fixes. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]