Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp195327pxk; Wed, 16 Sep 2020 01:48:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy64tj3DNgLFM5ruh2HOeXE0l2BDj0eccGYII9AX1es6n1hXJu2zNvbGBq57ddIIQ+GtcCj X-Received: by 2002:a17:906:724b:: with SMTP id n11mr24684729ejk.328.1600246121745; Wed, 16 Sep 2020 01:48:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600246121; cv=none; d=google.com; s=arc-20160816; b=ZwAAFJG7ymCBq5v8JKIjHlD+8LVkO6TAWPtcWqbRIGsleqP40ataQHPkuhTSLtwr98 BBtq27QaaIFgc9cHfAj02PyZ2cpxjthDmaGdKF+xd5iSj/HToXF7+59Q5sS0bvU1olfV 5wZGWD0ElhKE18phdhuE13wXYBwV2FbF+Ry1KOzQJQlJPOJn7EuHolXnPw+oRsJrD3PV HUji+Ftu2Gn9HKCjFGscp+0I9sJvumtQidIRXo0wpG0sdVoJ7qKjen9TA9QjEtaRpNii +5ps1H9/KpLyK5+IPzZGPlohZdMXb7kD7JEJWtlO+/y7cG6o/0nZBEoiXkz0G8sfqsCG eGBg== 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=mFHlsqUTp6bF1BGPzUjg3LJj5CvZI8A5XHbHTxJpfjI=; b=il9ZtaSNl/Jt8vDW3jMybCmXZclFrB44Gb/RYo5A2QSSvmJhk2177OMuRIQGMK6TXa RfxJU0EmXZU5GuE9J0C0ysaLb8f3jGw21st1jjLIKfAmH+ROwz/XS9naIBqyReM6ksvT nywb5UTvCSR0cSfu/73lXv5qcpEcJFsaPrXcvVwOjuw98nt6gPijYviEQvoEirdaxnAS Px+HLfFPu+sMa2shoXtjptzUQWWR+McCF/B7JBxnFxEHDkHJqmq7ikunI8YhnFbgiyuq fcyn+Bri7/C1ZTXam/LMneXt8NFYcnIEXdbZoWgC5xYZGod7IkuPCZzWSqgliCNqJxIF 8VDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=s3aJCgj3; 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 g19si9485364eds.240.2020.09.16.01.48.18; Wed, 16 Sep 2020 01:48:41 -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=s3aJCgj3; 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 S1726612AbgIPIq4 (ORCPT + 99 others); Wed, 16 Sep 2020 04:46:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726161AbgIPIqy (ORCPT ); Wed, 16 Sep 2020 04:46:54 -0400 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D24DFC06174A for ; Wed, 16 Sep 2020 01:46:53 -0700 (PDT) Received: by mail-ot1-x342.google.com with SMTP id g10so5932374otq.9 for ; Wed, 16 Sep 2020 01:46:53 -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=mFHlsqUTp6bF1BGPzUjg3LJj5CvZI8A5XHbHTxJpfjI=; b=s3aJCgj3o2+HOyPW2y5oQ6FHm99qHE3quyCn9AiqVXCY29lH7v25P4pV3RaBzYr6tI TXsfCsViS30UfmXp9txl1r1XYHoJgUKcr2i0ukFwUOgdjpL8t96JsBVxl1rMyQ7G7TZL tz5nog7zbQMP0vGP2MFs1KLVoqnyTD3Qc5KXgpr9B9GZFSRwIDLz3ATpV344qAa5G9u7 K41LFww87ee6HgxlRrG87o8HJCTj/uJhboUgZozUgkj1oTAyrTJ6hdFoTmTX/QyIvJhi t1kUldhN7ncNvR9yn63zkry9G6szzV1kc+pC7ZvAYdJZbhGo8Ta3Lkq8iHsP1qBCUxr+ MKWg== 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=mFHlsqUTp6bF1BGPzUjg3LJj5CvZI8A5XHbHTxJpfjI=; b=I8yNlo6buy1W7wtoD6SWZBpoCM/gb0TTnFPD+yecv6Br5SsKgwmy3NAOjJTAyqqFOy cMz0Hc5tXSunVK+/RppcKpMTEnszT8efzdPVy25I9ZKXMO/htKOS1lwWkaK8gIngEIcf ub3RI2Fj+gS5IUOD4I32Dktz/zWwTMALIsm5NtP6n3v6bqoyayjPAXzbglbz8R1RwVL2 Xf1CDQpci4mDD3b1jeetJXS2mAkHIrx+DKEzj57SqZXgzEb/c1dUeACM8/tsGo+pWerN Yi1C+ovkYTxvIdqdPuu0CZDZcNB4NQl8Uil/SNaFkNIOQ4J6itLORzuPTrVlItMEU3K6 ruKA== X-Gm-Message-State: AOAM531KHQd+q+AyGr4Qv5T+xFA28wJumMsUXo8B50eSsdG2tS9vedka IjW4NmUlvu/QTpYOBg1qJwiwELYm1j/tfXWtb+Uhcw== X-Received: by 2002:a9d:66a:: with SMTP id 97mr2793069otn.233.1600246013074; Wed, 16 Sep 2020 01:46:53 -0700 (PDT) MIME-Version: 1.0 References: <5f60c4e0.Ru0MTgSE9A7mqhpG%lkp@intel.com> <20200915135519.GJ14436@zn.tnic> <20200915141816.GC28738@shao2-debian> <20200915160554.GN14436@zn.tnic> <20200915170248.gcv54pvyckteyhk3@treble> <20200915172152.GR14436@zn.tnic> <20200916083032.GL2674@hirez.programming.kicks-ass.net> In-Reply-To: <20200916083032.GL2674@hirez.programming.kicks-ass.net> From: Marco Elver Date: Wed, 16 Sep 2020 10:46:41 +0200 Message-ID: Subject: Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e To: Peter Zijlstra Cc: Josh Poimboeuf , Borislav Petkov , Nick Desaulniers , Rong Chen , kernel test robot , "Li, Philip" , x86-ml , LKML , clang-built-linux , Andrew Morton , Kees Cook , Masahiro Yamada , kasan-dev 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 Wed, 16 Sep 2020 at 10:30, wrote: > On Tue, Sep 15, 2020 at 08:09:16PM +0200, Marco Elver wrote: > > On Tue, 15 Sep 2020 at 19:40, Nick Desaulniers wrote: > > > On Tue, Sep 15, 2020 at 10:21 AM Borislav Petkov wrote: > > > > > init/calibrate.o: warning: objtool: asan.module_ctor()+0xc: call without frame pointer save/setup > > > > init/calibrate.o: warning: objtool: asan.module_dtor()+0xc: call without frame pointer save/setup > > > > init/version.o: warning: objtool: asan.module_ctor()+0xc: call without frame pointer save/setup > > > > init/version.o: warning: objtool: asan.module_dtor()+0xc: call without frame pointer save/setup > > > > certs/system_keyring.o: warning: objtool: asan.module_ctor()+0xc: call without frame pointer save/setup > > > > certs/system_keyring.o: warning: objtool: asan.module_dtor()+0xc: call without frame pointer save/setup > > > > This one also appears with Clang 11. This is new I think because we > > started emitting ASAN ctors for globals redzone initialization. > > > > I think we really do not care about precise stack frames in these > > compiler-generated functions. So, would it be reasonable to make > > objtool ignore all *san.module_ctor and *san.module_dtor functions (we > > have them for ASAN, TSAN, MSAN)? > > The thing is, if objtool cannot follow, it cannot generate ORC data and > our unwinder cannot unwind through the instrumentation, and that is a > fail. > > Or am I missing something here? They aren't about the actual instrumentation. The warnings are about module_ctor/module_dtor functions which are compiler-generated, and these are only called on initialization/destruction (dtors only for modules I guess). E.g. for KASAN it's the calls to __asan_register_globals that are called from asan.module_ctor. For KCSAN the tsan.module_ctor is effectively a noop (because __tsan_init() is a noop), so it really doesn't matter much. Is my assumption correct that the only effect would be if something called by them fails, we just don't see the full stack trace? I think we can live with that, there are only few central places that deal with ctors/dtors (do_ctors(), ...?). The "real" fix would be to teach the compilers about "frame pointer save/setup" for generated functions, but I don't think that's realistic. Thanks, -- Marco