Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp450559pxb; Tue, 9 Feb 2021 04:43:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0qH/YL8caxS18cPbDwfI9/yylJMCCrX2CrZtAmrQ6X2lo9vFcwUhrHPA14qaW04KDtfpq X-Received: by 2002:a50:b765:: with SMTP id g92mr22866273ede.317.1612874627359; Tue, 09 Feb 2021 04:43:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612874627; cv=none; d=google.com; s=arc-20160816; b=owlEtsVKxKHnjXkD9T4dfJWY4485Ifgn55b28gPWMmdLpSTUx6h6ZOft6O0QeWvZbb ZdC3W0vFQW7GOWgLHyMh/YXEMu77KaWagMo+/TgSd9QmfY64JDYhbOG10Bs+sYKubhjf sWkl4FWu5sn71UotiNZeMVQPqKa+FKEwC5QAiCakJaYBiVdTQ6F6q8E6jhujCcN+RruP 345egaEEb1ltd9XI3/GOVb7z1TpmCMijvnpnCCz1MHr+bq7Wl3uPlC01HF7luvKjqpxI QYCyXJy/SrSz6M5br9TcCcr7gMgD78IjPwpHE7sgsH8NynJtzr+aeLXkubICTEiG/AaM gw0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=XEcEvQnn/tuPB+fLKT/b3apdLU6+MMvGAdEGuTPETVM=; b=eYrjmjf0vWwKZFJ7IotNSsQX2TWz7IZWWnDxKgKc6zo39Ghf6r61/i6plGfunRUs7K DvdR1RdcgqJLmdwY+ffELKletw5BDvOHfcRH50xn5cAab5h4TiKwOevGtib4K34UlDLR /yJ3Qk5vOmELGXwUnnVuJKDllJf/M3zJ7r/onW5EQ29uxWBlDTfpKHPjKbpBGN2ILT8s uXglPPhveHLzQpGjP+bluqOkK+bPkISSbxg+0vyYMGb7yeJkIlt+Hl6vEdhoG/ZNXUJK YE41Zf9lFQ7kuFtuWPYb3ql8rAdKnj1zK6kE+WZiIEfreVQCcz18My5k0UgywPFNazu3 mBOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hy19si8730424ejc.692.2021.02.09.04.43.24; Tue, 09 Feb 2021 04:43:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230322AbhBIMmR (ORCPT + 99 others); Tue, 9 Feb 2021 07:42:17 -0500 Received: from elvis.franken.de ([193.175.24.41]:36528 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230228AbhBIMj7 (ORCPT ); Tue, 9 Feb 2021 07:39:59 -0500 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1l9SIV-0003IE-05; Tue, 09 Feb 2021 13:39:15 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 37F2FC0DBF; Tue, 9 Feb 2021 13:38:17 +0100 (CET) Date: Tue, 9 Feb 2021 13:38:17 +0100 From: Thomas Bogendoerfer To: Alexander Lobakin Cc: Paul Cercueil , Youling Tang , Jiaxun Yang , Xingxing Su , Huacai Chen , Paul Burton , Hassan Naveed , linux-mips@vger.kernel.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH mips-fixes] MIPS: compressed: fix build with enabled UBSAN Message-ID: <20210209123817.GE11264@alpha.franken.de> References: <20210208123645.101354-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210208123645.101354-1-alobakin@pm.me> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 08, 2021 at 12:37:42PM +0000, Alexander Lobakin wrote: > Commit 1e35918ad9d1 ("MIPS: Enable Undefined Behavior Sanitizer > UBSAN") added a possibility to build the entire kernel with UBSAN > instrumentation for MIPS, with the exception for VDSO. > However, self-extracting head wasn't been added to exceptions, so > this occurs: > > mips-alpine-linux-musl-ld: arch/mips/boot/compressed/decompress.o: > in function `FSE_buildDTable_wksp': > decompress.c:(.text.FSE_buildDTable_wksp+0x278): undefined reference > to `__ubsan_handle_shift_out_of_bounds' > mips-alpine-linux-musl-ld: decompress.c:(.text.FSE_buildDTable_wksp+0x2a8): > undefined reference to `__ubsan_handle_shift_out_of_bounds' > mips-alpine-linux-musl-ld: decompress.c:(.text.FSE_buildDTable_wksp+0x2c4): > undefined reference to `__ubsan_handle_shift_out_of_bounds' > mips-alpine-linux-musl-ld: arch/mips/boot/compressed/decompress.o: > decompress.c:(.text.FSE_buildDTable_raw+0x9c): more undefined references > to `__ubsan_handle_shift_out_of_bounds' follow > > Add UBSAN_SANITIZE := n to mips/boot/compressed/Makefile to exclude > it from instrumentation scope and fix this issue. > > Fixes: 1e35918ad9d1 ("MIPS: Enable Undefined Behavior Sanitizer UBSAN") > Cc: stable@vger.kernel.org # 5.0+ > Signed-off-by: Alexander Lobakin > --- > arch/mips/boot/compressed/Makefile | 1 + > 1 file changed, 1 insertion(+) applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]