Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6126807imu; Wed, 30 Jan 2019 09:13:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN7CXks3UG9KY7DHy78rJQvQuyT36LdvMfs8YK+SrQ1PmyZy6cEU0Dc3nSsIaQolrU2Jtr6E X-Received: by 2002:a17:902:292b:: with SMTP id g40mr31487951plb.82.1548868422092; Wed, 30 Jan 2019 09:13:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548868422; cv=none; d=google.com; s=arc-20160816; b=sAMLdEBMwXIgYLCskjdAUMxH33ETwUAFVEijaoxaCmTvVfgvnlNuHGwanBtdKPNec6 ZMvZuslkFU4BkH4UoOZZs/SMd20jP+9cJY54IUSyNxxJ3eZhtK1D8zorHvIAGz0m+CPx eUNJYtbcfoidorU2KYHSQTCxNN+HRVlg0GBXD5ljJz1Y7mlMiyn/Ey6fY2+b6GWauB+N MztVmcyT66Y4ccFVhFUOZrmn1UGHMvuW4ljqhpsDNTh3SIXLU2Gn2+49qMbrQRTDSI6R QDNgL+29ENDdraSJ/f1N2RyXw6Rrpvl6p7w19bhlMKoMWk7qiqFTKgS38ULIUo0I0OUM hn/g== 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=aiLoB38v3dtnM248HEOWwHwiu/rTqrRDNd/ERGHAywk=; b=hcfFMB719GBMPbvXr+8wUovBjz/Ol3VvazkhbT8ORXY+VTxN+H2gC6vOLB3o9qLkeC 8l8FycYwdnrQoa3ra59zX+h/45MvYtRNcGybpAMRyVEV0Cajotr0CglUsGfn+ufDJAj8 tlAg7nMGj4wb9g1h/ZmLnf1s9v0wVhiRy5Aq+hZmgR6nPfLnB95dZ1ChcTAkYg5ApFnt /oebMUVYA4wQ4AmA8PeYAg0c8mjxKjEibyE8CgI/sCG1Ix4w/+IB6FHHaZtQschfg9Rf WuG+BFCe8k3BDh0rBFIGQDXLIhbvHOXSVu4ebL/Q7DZQs27AdUtM+fOm146pdA/TxYte bSyA== 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 j12si1776137pgq.26.2019.01.30.09.12.44; Wed, 30 Jan 2019 09:13:42 -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 S1732313AbfA3RM1 (ORCPT + 99 others); Wed, 30 Jan 2019 12:12:27 -0500 Received: from relay.sw.ru ([185.231.240.75]:33224 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727976AbfA3RM1 (ORCPT ); Wed, 30 Jan 2019 12:12:27 -0500 Received: from [172.16.25.12] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1gotPT-00043X-36; Wed, 30 Jan 2019 20:12:23 +0300 Subject: Re: [PATCH] lib/ubsan: default UBSAN_ALIGNMENT to not set To: Andrew Morton Cc: Anders Roxell , arnd@arndb.de, linux-kernel@vger.kernel.org References: <20181217150326.30933-1-anders.roxell@linaro.org> <8bc73bbf-6c12-7fd1-3253-676731bf5ae5@virtuozzo.com> <20190129173634.ee579795b227b141efc8bd30@linux-foundation.org> From: Andrey Ryabinin Message-ID: <2370bfbc-762f-fb3f-79b1-483a095fdf7c@virtuozzo.com> Date: Wed, 30 Jan 2019 20:12:45 +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: <20190129173634.ee579795b227b141efc8bd30@linux-foundation.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 1/30/19 4:36 AM, Andrew Morton wrote: > On Fri, 11 Jan 2019 22:01:16 +0300 Andrey Ryabinin wrote: > >> >> >> 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 >> > > Confused. Why does allmodconfig result in UBSAN warnings? > UBSAN warnings is a result of enabling noisy CONFIG_UBSAN_ALIGNMENT which is disabled by default if HAVE_EFFICIENT_UNALIGNED_ACCESS=y. It's noisy even if don't have efficient unaligned access, e.g. people often add __cacheline_aligned_in_smp in structs, but forget to align allocations of such struct (kmalloc() give 8-byte alignment in worst case).