Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1034198imu; Fri, 11 Jan 2019 13:45:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN7k+1d7fjh+jeBkNGYXNVhQnqMrNF2+Q0eqAVEdK7ZVF/rj3l+zfl9OosTOguFk5eDV3m8U X-Received: by 2002:a62:5d0c:: with SMTP id r12mr16815033pfb.0.1547243136135; Fri, 11 Jan 2019 13:45:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547243136; cv=none; d=google.com; s=arc-20160816; b=CH75XWAmIOI/iRrQcyo7DS6/2hI8N03gr+2JR+d0rNm35BcU1KOBfemmIyd7gjqqt0 9OL8KhcOFFOMGpW7MYXJoQ11YRR0N3aZVqJUxeSpnX/1PvgSTE7X3/R/Y7SLPt0foJhK 3AAeVMwn5US6tP3bdS0z3+6wX84Eq6TH0WSSeyh3cB0kUvOTNWKyrMsMJvQtVXpGYRpt z+ykdeZxTWPJ9kdxdPxbIqFkQYlqqwdulySbRIGWWtqENh5JjNvh5Gl4dyL4DVgNaRPj lOP7p9n05ODiukby4INmEPSPP70ypUgjM09ddWF2fB2QbWdfkIIR2k7/a/sMdkbiqUBf S24Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ogFjRFSUO1JfQ58fi3ZS0InZX/w3pm3yFA4+0EQ6GTQ=; b=DX6ih+MfN0NzTiQ7kJuigzq1cKOvCvAFqKt3Hfq4BFKWJHYEcthAjcAFc8lESyX98r 7xyRH+Y8zEMNf02CoN5yqVYMP7B+n9ySqQ6rEbL6Fxi96CQ+af4gZG0UofGQyCps+/z5 728tnsNsWEtizEgIZ1holy7BsSN/tw3LLTtjJMQBn2jxAPlHPvqtmf1xldkmM+QZrM+a izWZSL4/1igE9+9bAPdUXOyX8J+NX2DqQhkHp66U59VYO1ivc1rFyRVXT5YhTM8+1npB w60P2NRp1/iYRU7eMd/g42sxUeEW0a511V3NcKBFpmBiaSGDPTkA9YyXRHA0kUhHYjbO oVaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si1019441plk.310.2019.01.11.13.45.21; Fri, 11 Jan 2019 13:45:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389947AbfAKTA5 (ORCPT + 99 others); Fri, 11 Jan 2019 14:00:57 -0500 Received: from relay.sw.ru ([185.231.240.75]:42384 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388253AbfAKTA4 (ORCPT ); Fri, 11 Jan 2019 14:00:56 -0500 Received: from [172.16.25.12] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1gi234-0006jc-Cz; Fri, 11 Jan 2019 22:00:54 +0300 Subject: Re: [PATCH] lib/ubsan: default UBSAN_ALIGNMENT to not set To: Anders Roxell , Andrew Morton Cc: arnd@arndb.de, linux-kernel@vger.kernel.org References: <20181217150326.30933-1-anders.roxell@linaro.org> From: Andrey Ryabinin Message-ID: <8bc73bbf-6c12-7fd1-3253-676731bf5ae5@virtuozzo.com> Date: Fri, 11 Jan 2019 22:01:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20181217150326.30933-1-anders.roxell@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/17/18 6:03 PM, Anders Roxell wrote: > When booting an allmodconfig kernel, there are a lot of false-positives. > With a message like this 'UBSAN: Undefined behaviour in...' with a call > trace that follows. > > Reworked so that when building a allmodconfig kernel that turns > everything into '=m' or '=y' will turn off UBSAN_ALIGNMENT. > > Suggested-by: Arnd Bergmann > Signed-off-by: Anders Roxell > --- Acked-by: Andrey Ryabinin > lib/Kconfig.ubsan | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > > diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan > index 98fa559ebd80..a2ae4a8e4fa6 100644 > --- a/lib/Kconfig.ubsan > +++ b/lib/Kconfig.ubsan > @@ -27,15 +27,19 @@ config UBSAN_SANITIZE_ALL > Enabling this option will get kernel image size increased > significantly. > > -config UBSAN_ALIGNMENT > - bool "Enable checking of pointers alignment" > +config UBSAN_NO_ALIGNMENT > + bool "Disable checking of pointers alignment" > depends on UBSAN > - default y if !HAVE_EFFICIENT_UNALIGNED_ACCESS > + default y if HAVE_EFFICIENT_UNALIGNED_ACCESS > help > - This option enables detection of unaligned memory accesses. > - Enabling this option on architectures that support unaligned > + This option disables the check of unaligned memory accesses. > + This option should be used when building allmodconfig. > + Disabling this option on architectures that support unaligned > accesses may produce a lot of false positives. > > +config UBSAN_ALIGNMENT > + def_bool !UBSAN_NO_ALIGNMENT > + > config TEST_UBSAN > tristate "Module for testing for undefined behavior detection" > depends on m && UBSAN >