linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: John Thomson <git@johnthomson.fastmail.com.au>
Cc: keescook@chromium.org, linux-mips@vger.kernel.org,
	linux-hardening@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2] mips: boot/compressed: use __NO_FORTIFY
Date: Fri, 11 Nov 2022 16:05:51 +0100	[thread overview]
Message-ID: <20221111150551.GF13465@alpha.franken.de> (raw)
In-Reply-To: <20221031170749.2159430-1-git@johnthomson.fastmail.com.au>

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 <lkp@intel.com>
> Fixes: 54d9469bc515 ("fortify: Add run-time WARN for cross-field memcpy()")
> Reviewed-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
> ---
> 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 <linux/types.h>
>  #include <linux/kernel.h>
>  #include <linux/string.h>
> -- 
> 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 ]

      reply	other threads:[~2022-11-11 15:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31 17:07 [PATCH v2] mips: boot/compressed: use __NO_FORTIFY John Thomson
2022-11-11 15:05 ` Thomas Bogendoerfer [this message]

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=20221111150551.GF13465@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=git@johnthomson.fastmail.com.au \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lkp@intel.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;
as well as URLs for NNTP newsgroup(s).