From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id AA66C3857820 for ; Tue, 25 May 2021 09:55:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AA66C3857820 Received: by mail-ej1-x62e.google.com with SMTP id s22so46141028ejv.12 for ; Tue, 25 May 2021 02:55:24 -0700 (PDT) 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:content-transfer-encoding; bh=fxPXHWPdSHVODpnWsBMbR6n+h0UZYxhRKVtT80LzJzc=; b=bu7Z1EYvsU5GGOWhwX1UvXxXP/lYAjh4gpsvWS4djvjjjpgzW/f2A6B1DvgKybo0Et IWrMr6qlMCg+XZ4Q1fiRJZIvz9dmgYWUdKUjEQuYeSXaqfrVUm+6Qf5MbSEjhhaAOllv Hj88JZD56do9gMYKSVh7Yqe7OnSRUN2ZupqYZWWWAMmY1CjWO3l2g2WcIy4eWFNnO4nw zB8JhMkU6Z2FQjuX3u8j9XdyhZ1WgyhMG83TMQrR/2H/IfZGeXqjzWSgN/0QbolNuClc 8CoU41ngxopJdHkJBU7MNPuJUOBO7CckZwT4r+uP0cz9IL/WKNxKLyhtQJvf7fDQQNlC mAng== X-Gm-Message-State: AOAM532z5YIuScST7W2Ul0jXG4xpZ+OTn1lpY3CpHPnHyBiATkDTQ7Z7 Oo/Oq+Dvq0k+serXWxDbYCzmVBrSP8+i3EO8Z6I= X-Google-Smtp-Source: ABdhPJxD1WEcsi8Sf+m4spAp3ppl3DM+xE8STTprmaV2BbM2ZjOv9INOFXrU5KdPFdMo07tS6Hpo5k/ZbT0YNL6Jauk= X-Received: by 2002:a17:907:b03:: with SMTP id h3mr27528849ejl.118.1621936523818; Tue, 25 May 2021 02:55:23 -0700 (PDT) MIME-Version: 1.0 References: <411ce78b-abcc-59fa-37e7-49471a68b057@suse.cz> <7f0a98b5-1c36-d357-8c5e-bd561f029a48@suse.cz> <7204e2a0-1969-6be5-ec15-7d38b210206d@suse.cz> <583e5cf2-ee15-0cb9-6dce-d696582d6de3@suse.cz> In-Reply-To: <583e5cf2-ee15-0cb9-6dce-d696582d6de3@suse.cz> From: Richard Biener Date: Tue, 25 May 2021 11:55:13 +0200 Message-ID: Subject: Re: [PATCH] Add no_sanitize_coverage attribute. To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: Marco Elver , Nick Desaulniers , GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 May 2021 09:55:26 -0000 On Mon, May 24, 2021 at 10:27 AM Martin Li=C5=A1ka wrote: > > On 5/21/21 2:39 PM, Marco Elver wrote: > > On Fri, May 21, 2021 at 10:50AM +0200, Martin Li=C5=A1ka wrote: > >> On 5/20/21 12:55 PM, Marco Elver wrote: > >>> I think this came up with other no_sanitize [1] based on what I had > >>> written to you last year [2]. > >>> > >>> [1]https://gcc.gnu.org/pipermail/gcc-patches/2020-June/547618.html > >>> [2]https://lore.kernel.org/lkml/CANpmjNNRz5OVKb6PE7K6GjfoGbht_ZhyPkNG= 9aD+KjNDzK7hGg@mail.gmail.com/ > >> > >> Ah, you're right. I've just updated the patch to address that. > >> > >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > >> > >> Ready to be installed? > > > > Looks good, I also just built a kernel with the no_sanitize_coverage > > attribute (without the objtool nop-workaround) and works as expected. > > Good, thanks! > > > > > Not sure if required, but would such an additional test be useful: > > Yes, it is, thanks for it. > > > > > --- > > > > diff --git a/gcc/testsuite/gcc.dg/sancov/attribute.c b/gcc/testsuite/gc= c.dg/sancov/attribute.c > > index bf6dbd4bae7..7cfa9134ff1 100644 > > --- a/gcc/testsuite/gcc.dg/sancov/attribute.c > > +++ b/gcc/testsuite/gcc.dg/sancov/attribute.c > > @@ -11,5 +11,17 @@ bar(void) > > { > > } > > > > +static void inline > > +__attribute__((always_inline)) > > +inline_fn(void) > > +{ > > +} > > + > > +void > > +__attribute__((no_sanitize_coverage)) > > +baz(void) > > +{ > > + inline_fn(); > > +} > > > > /* { dg-final { scan-tree-dump-times "__builtin___sanitizer_cov_trace= _pc \\(\\)" 1 "optimized" } } */ > > > > --- > > > > Otherwise, please go ahead. I assume this is targeting GCC 12? > > Yep. > > There's V3 I'm sending. > > Ready for master? OK. Thanks, Richard. > Thanks, > Martin > > > > > Thanks, > > -- Marco > > >