Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4994377pxj; Tue, 25 May 2021 23:38:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7/Ya92+r8l3dfmPdhNfk6Gk9Qs293iy/2upIDp03r7L1eUKWGgHYHs1HREwpqqdhZDVjq X-Received: by 2002:a50:fb0a:: with SMTP id d10mr35648214edq.47.1622011087255; Tue, 25 May 2021 23:38:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622011087; cv=none; d=google.com; s=arc-20160816; b=Oyf4pb2zzda9T5HxkrRRpyZWsgqHoNyM7BJ5+8FObju+J9WcX6/KHsUQWaumT3W9aK JNQ6bS7GfS5JOw+Kv7AJSWohnluUPnD3A2RzGZ0fOBsxpvviU3odbtHV3cuEubEzLsBt bbMSdcYMQDXZL+QIo0p4k0Ex1EpjV17BWqUXEUUujQJqHq0UYePQGSywCnjrgm+8QWHM qwX1IkOmV9sIHr4Do8T0CBRs2yx75s/aRbKU6vxdCGmN16AsYKkEUGA5pjN7hovMz7nV V58Tqg67NuEIKLBAbvW/3To9PQ7VqNISpfS8qip5tQqpa1UIbXn6sXAoiknOZkoNjf+n sUyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=WpFGeM+BH3Mgu7E6GssVzw2HhPZxd2Kqk2VIWf3hIA0=; b=Jx0D9bqofJUOKWl46VjiUzcC1g1I8mbO/PkCNLF3DznLaIA/kfO20ygHsitygpjVJp R08Sk0g0i1u2ZNThIHLx0vXSN35x+Klqd2pk2CWOwx/T8cW3jiWczYwk7MBi/7LSC3f6 PWlcHahosOQVa9hME0ZMZiY7QsM34OP6DtJviBsWBjdgtU9x/4jdYw2sf19ZuWOtEAVp gp3Ld3/+YaeAnaXEyvHn2ilHW5EkGpZfxx+5Pl1S6WLbnVFc1WkZ8EgT3y8UWHsyZwR+ rqGAj+Dq4xvrvnvcTsq70uk0hbY6vCqnTZM9m2y6GmNupmeeG2edT4bj8y3nBVos9H1W +oog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Q4O0S5sA; 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 v20si14031903edc.437.2021.05.25.23.37.42; Tue, 25 May 2021 23:38:07 -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=Q4O0S5sA; 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 S232507AbhEZG1D (ORCPT + 99 others); Wed, 26 May 2021 02:27:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbhEZG07 (ORCPT ); Wed, 26 May 2021 02:26:59 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5C44C061574 for ; Tue, 25 May 2021 23:25:25 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id v22so519736oic.2 for ; Tue, 25 May 2021 23:25:25 -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=WpFGeM+BH3Mgu7E6GssVzw2HhPZxd2Kqk2VIWf3hIA0=; b=Q4O0S5sAPUtIIoXljcBlaahvCY9lNWYEl8FlEybGbIw43ir04PMJ+D8/IpDHP+DQYl z3T4FHclaFDx6/g8oeINq9NODFyKLcnRe92y06dDJzVfmCntEoIPgU01v56dSm728+v5 Rs+NXTXuvK3pj6HT6GkrOAVlPOIatNGb9lcICXP+mpF3s1szn4Oqb4dP/WUgrMdFX0G6 BG0bmebOzjfYBMxsNyGQ2B7zfzeKDbWxLc1ILTUc4VaIwEwLK1lmRRxdn/TYAvTY5dl7 xNMIv9kV1BEFHip5xWzun+PEGwJm5IsNkrPWXuDqrhEUS/1Y6SSMgpA5GQ+Y+zGUwTr0 Grlw== 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=WpFGeM+BH3Mgu7E6GssVzw2HhPZxd2Kqk2VIWf3hIA0=; b=nJqxqVoIJ8hgNi6DzNqn75VSwy4riMtFso05cKv3XjB3/lymlw0BnUcUptqttxlmZx qPuhZQX0RVdkv0lvS+OtEgVhKzc3vIvJlIyj1fF6UyMt3C8q6Uww4Pg+US8NfGmI7HIR f5Bp58SyE+nbmjvvmm0C+50gtfi9jZu08tGCH3O2zWKNfuy3T7sw1/wiXxctE7dVipey AGAfEKCk0L5RElAUQv/mPDaKauOXjDhYocxtyUSfxJJZ1m0aSNZfV2S9UgSTpTWd//bC tUIejQi9irDkgC9aCF5p+gOIE/rd0ZXDMZ7RkjFoIWELXYR5bJBBMzc+PwaIZuAfliOB 51Mg== X-Gm-Message-State: AOAM5314+e/A6eiVSzYrgL7RELwTyhij0jN14M8innUccCCbgAvRsUxs Z7bHTcI41T46TXG3bMQVHTIrLQa1/PVYAhNzgkFy0Q== X-Received: by 2002:a05:6808:10d4:: with SMTP id s20mr858862ois.70.1622010325003; Tue, 25 May 2021 23:25:25 -0700 (PDT) MIME-Version: 1.0 References: <20210525175819.699786-1-elver@google.com> In-Reply-To: From: Marco Elver Date: Wed, 26 May 2021 08:25:13 +0200 Message-ID: Subject: Re: [PATCH] kcov: add __no_sanitize_coverage to fix noinstr for all architectures To: Miguel Ojeda Cc: linux-kernel , Nathan Chancellor , Nick Desaulniers , Miguel Ojeda , Kees Cook , Andrew Morton , Will Deacon , Ard Biesheuvel , Luc Van Oostenryck , Arvind Sankar , Masahiro Yamada , Peter Zijlstra , Sami Tolvanen , Arnd Bergmann , clang-built-linux , Dmitry Vyukov , Mark Rutland Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 May 2021 at 03:54, Miguel Ojeda wrote: > On Tue, May 25, 2021 at 9:13 PM Marco Elver wrote: > > > > Long story short: this is not fixable without more Clang changes. The > > only way to do it without a version check would be to introduce > > no_sanitize_coverage attr to Clang, which we probably shouldn't do, > > and I didn't want to fight it. ;-) > > I am not sure I followed why you would not want to support querying > for the attributes (if they are intended to be used separately). Not my decision, but some historical decision in Clang. Somebody thought "no_sanitize()" simplifies things. Hence, Clang only knows about the no_sanitize attribute but not its "subattributes". > But regardless of that, why not the feature flag at least then, to be > consistent with the others? __has_feature(coverage_sanitizer) does not work either (yet). > Going back to version checks seems bad -- they should be reserved for > e.g. known broken versions and things like that. New compiler features > should come with new feature flags... > > In fact, for Clang, I do not see any version checks in code at the > moment, so this would be the first :( In this instance it's absolutely required (for now). But if you don't like it I'll go back to trying to fix Clang more. I'll check with Clang folks which one we can implement, the feature check or the attribute check. > Cheers, > Miguel