Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1530169ybg; Tue, 2 Jun 2020 12:30:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZuKlROaPlyq3BziSx9gF1DCY7pD0pI9NWQsguuri6TFx/AMHaHyaeEkKxlqWRpV6Sxok1 X-Received: by 2002:a17:906:b1c3:: with SMTP id bv3mr8595595ejb.292.1591126242998; Tue, 02 Jun 2020 12:30:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591126242; cv=none; d=google.com; s=arc-20160816; b=oTPwmei9HMeK7gz/G+wXVVyUV19JJ/Lj44A0H7GCwIj5QDT4stHrWi/DiiNGiK/PLh ZiOeVMR/wL7Bnnkc78MjmOAbXyFeablCtRD/EMFedFMpqzceE3RoL5lioMyvC3s/m7NU WJsjxejko1MGYRWpPyAoqU5Js8rLebvIADii9T/Q72j3LUX/zn3qRlhe/JDkvV/c+QNf bZTgB5Z6lUX+KLVs8/9fvwtKrXPip0vVhQqKfnKwjfMfeZmjQHFtpxqZXvQkLic7WFdw zoYaFKR/nmdgw5Elw6v46tBhN3aLx+npIHxmxpgZje4+NwdBqP8n1ALin0n+qAmpT8w8 wcNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zgQoiQ3jaz0VjmfJxEyv0Pkaee0Wtz3ujBDf41O3EoY=; b=ukE9iIXJCUOkTVU8hUGJ7x0YPAFILpJODd6Yc7I8TqVLNmJ9Tpjq16sdk/J9iM/kOl MzU+nkELTmn3RtJ58V+IWTNBXlAoarKnC6Zgil6vk/Mav42dGCLjJXg7Apu4AMOLj2Ty UZ9RAemsw13uWepetAbsY3cczsBBKe3+jltwtIZvq/b7ryKss0oIfNEvMfNjuwdWNek9 6+9VGTdWA1cd5Jd6IHSFzVgvARxk0DvgmbTMa5bXnQ2ZiQjc8t3130QWV+gRIx6dQjdP jS7kq8hK1rIoJZ8DSkHT+BFRh9NTTuIjJBdBczcyhbg+ue5xYmOoUDDbkidqcY3c4F7v ux3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Fi2nlPxf; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h19si1883098edq.313.2020.06.02.12.30.18; Tue, 02 Jun 2020 12:30:42 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=Fi2nlPxf; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726875AbgFBT0A (ORCPT + 99 others); Tue, 2 Jun 2020 15:26:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbgFBTZ7 (ORCPT ); Tue, 2 Jun 2020 15:25:59 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD364C08C5C0 for ; Tue, 2 Jun 2020 12:25:59 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id a137so13060827oii.3 for ; Tue, 02 Jun 2020 12:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zgQoiQ3jaz0VjmfJxEyv0Pkaee0Wtz3ujBDf41O3EoY=; b=Fi2nlPxf/7Sa9yL3oOOWXjSuvQO+/3PiuizVCpbkvABocM3wpiq9rEaww9oCBIn3kJ M9us/HJhWsL6/Bm9mtP3sFn+stJEHu8jLSGBxddXYQWrgNV9l5oq2oekS3VwBZq2lJfP mFNW3S5NASbtdyAQ5rzI0ZyTdf/5X9WhEj99hn03hWzbITdwssWB8ix8bgPvsDFd9Sm6 Sk9X62TDOkck6zj1jc1U5ttZWD0h+/aJnRo4yxFPnPWLg5lFu08o7J8QwQa2oZD9JD6x tnwnVL/prvzdasAcsyB7LzT0uxRPs5NjaoD282/aBueMDrBGz8xVMcESgwEDHEgXXsQO nhRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zgQoiQ3jaz0VjmfJxEyv0Pkaee0Wtz3ujBDf41O3EoY=; b=Ql6/Khh8yWSAJkOq8l3zL/lQ+j1BFU+qq+oBXAj9gNb4i/AJIc+eZxptm5sVDLZzaz mEVBuG/olf+p54NIk4hkuTfrjTMurhfS7JFkp7DU93GWSQ2MQ5JMcO3cZzBY13v/RsNT u89Re4TxQ2PEW2T+6jfHAAV/ax3fIs3N+Xzs3HFw+mMYttSdaNvdlX/cTdWL4mB+SQi0 1QUAlKML2ji6LtPp/Kt/qeVYNWnqejfLHR9I/qjWm2VBohKVvvCaNeIEIvuS3zCDXgF/ tpkKuoRzm5wbZinzaXElohp/LCX4x4QpncBjn5E8GbmwIlQV9BNtlkIyW7+QSeIuwwWv rnCw== X-Gm-Message-State: AOAM531Sd2BNoGllwgjseB/B7Ewrec3zZ9561lbgZHvdZ+4b6DctIslD lnK1p+UNnOGZuqIUTYcdjug0Y6g/efYD21TIoOnTyQ== X-Received: by 2002:a05:6808:3ac:: with SMTP id n12mr2388414oie.172.1591125958861; Tue, 02 Jun 2020 12:25:58 -0700 (PDT) MIME-Version: 1.0 References: <20200602184409.22142-1-elver@google.com> <20200602191936.GE2604@hirez.programming.kicks-ass.net> In-Reply-To: <20200602191936.GE2604@hirez.programming.kicks-ass.net> From: Marco Elver Date: Tue, 2 Jun 2020 21:25:47 +0200 Message-ID: Subject: Re: [PATCH -tip 1/2] Kconfig: Bump required compiler version of KASAN and UBSAN To: Peter Zijlstra Cc: Nick Desaulniers , Will Deacon , Borislav Petkov , Thomas Gleixner , Ingo Molnar , clang-built-linux , "Paul E. McKenney" , Dmitry Vyukov , Alexander Potapenko , Andrey Konovalov , kasan-dev , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2 Jun 2020 at 21:19, Peter Zijlstra wrote: > > On Tue, Jun 02, 2020 at 11:57:15AM -0700, Nick Desaulniers wrote: > > On Tue, Jun 2, 2020 at 11:44 AM 'Marco Elver' via Clang Built Linux > > wrote: > > > > > > Adds config variable CC_HAS_WORKING_NOSANITIZE, which will be true if we > > > have a compiler that does not fail builds due to no_sanitize functions. > > > This does not yet mean they work as intended, but for automated > > > build-tests, this is the minimum requirement. > > > > > > For example, we require that __always_inline functions used from > > > no_sanitize functions do not generate instrumentation. On GCC <= 7 this > > > fails to build entirely, therefore we make the minimum version GCC 8. > > > > > > For KCSAN this is a non-functional change, however, we should add it in > > > case this variable changes in future. > > > > > > Link: https://lkml.kernel.org/r/20200602175859.GC2604@hirez.programming.kicks-ass.net > > > Suggested-by: Peter Zijlstra > > > Signed-off-by: Marco Elver > > > > Is this a problem only for x86? If so, that's quite a jump in minimal > > compiler versions for a feature that I don't think is currently > > problematic for other architectures? (Based on > > https://lore.kernel.org/lkml/20200529171104.GD706518@hirez.programming.kicks-ass.net/ > > ) > > Currently x86 only, but I know other arch maintainers are planning to > have a hard look at their code based on our findings. I've already spotted a bunch of 'noinstr' outside arch/x86 e.g. in kernel/{locking,rcu}, and a bunch of these functions use atomic_*, all of which are __always_inline. The noinstr uses outside arch/x86 would break builds on all architecture with GCC <= 7 when using sanitizers. At least that's what led me to conclude we need this for all architectures. Thanks, -- Marco