From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 2AD88385383C for ; Thu, 13 Oct 2022 11:38:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2AD88385383C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x629.google.com with SMTP id bj12so3213745ejb.13 for ; Thu, 13 Oct 2022 04:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nMoJa8l5RzY/C+ctCOU4K9MXOu6E4317YBf7fP6azfw=; b=A0C8AYSCHvfLMm99rC+O/shSOwa/EZRWVoj49UaI/HNZkbWDu1Ge472cfMhWcbpbZb 7E38Xdfuq8Ocs7vMUbG27PXDmGuwSf/snWnPsyzZ9G2UUSCdIHYq0nxA+i50i273Ynho SAiTRTyc4rQnJApp/59JfDEycqqfD6WgbpZP2OpJcEvKWcO8oUUzQWJiZEXuA9/QU/Li bzWmzNFumpnn1iWz6p1N0H8VWFt0m3Or0cJ4dxKmxdvFic8V2Hl2pdrqcvUq//54dNKN eWPE8AP1vTK5HOUgffUdaAPlJqNB3qRL5Llp//4Wk5smWdzLhFYCVt7uWjSEzqgOH2f2 YzKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nMoJa8l5RzY/C+ctCOU4K9MXOu6E4317YBf7fP6azfw=; b=dVvUKpyA/mVZdFn/W0EC0fnwylXoDVCiVLlVObiqxVeqPizPRd0EMbxNr2y9+x5Ywm v4nz62ObOuLoOIKelr1QCnaZe3Dzw2irgoNlyriv7f/vTbaT32M05p8fHzBcaEdQToso 6l7zwHomUfH6FOKyq0xgKNge8lsr+7lag351EZzvrX47BufUMWBhdcHkOLchW6VCvK92 KF2gilcv8em0P8FPBgRt/YdUkxzHR8rLPTbk0KS8wrYk8+dSwZ3yGxjtXUQOUPVxBD+W z9rWf+oINrKAc8sQfDMhoNE6ubMvletSDHkd1+ReavccqGy8FwjUfe5K9o8BPESYMCll OWFA== X-Gm-Message-State: ACrzQf2H8iGPV8imKd9j408BzdIkc88OGQVxZ6qzviwG5Xwl21FEFMBO cDqT+Lngw8y5QDi0PAIpkUcBfUSfgRPQdzd1/4s= X-Google-Smtp-Source: AMsMyM6Sq6DqDTfeQAeg8REq7G75laxn86pmdJ5iv7CWh2TOcNW4TcxWxLj1inUtM/C4VvWHktV4IZ1RqfH4RiUZ4P8= X-Received: by 2002:a17:906:8457:b0:78d:98e9:ad59 with SMTP id e23-20020a170906845700b0078d98e9ad59mr21071697ejy.29.1665661133837; Thu, 13 Oct 2022 04:38:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Thu, 13 Oct 2022 13:38:41 +0200 Message-ID: Subject: Re: [PATCH v2 00/10] Introduce strub: machine-independent stack scrubbing To: Alexandre Oliva Cc: gcc-patches@gcc.gnu.org, Jeremy Bennett , Craig Blackmore , Graham Markall , Martin Jambor , Jan Hubicka , Jim Wilson Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Oct 11, 2022 at 3:33 PM Alexandre Oliva wrote: > > On Oct 11, 2022, Richard Biener wrote: > > > On Tue, Oct 11, 2022 at 1:57 PM Alexandre Oliva wrote: > >> > >> On Oct 10, 2022, Richard Biener wrote: > >> > >> > As noted in the Cauldron Discussion I think you should do all > >> > instrumentation post-IPA only to simplify your life not needing to > >> > handle inlining of instrumentation > >> > >> I looked a bit into that after the Cauldron, and recalled why I wanted > >> to instrument before inlining: in the case of internal strub, that > >> introduces a wrapper, it's desirable to be able to inline the wrapper. > > > I think if the wrapper is created at IPA time it is also available for > > IPA inlining. > > Yeah, but now I'm not sure what you're suggesting. The wrapper is > instrumentation, and requires instrumentation of the wrapped > counterpart, so that can't be post-IPA. IPA folks can probably explain better but there's IPA (local) analysis, IPA (global) propagation and IPA (local) code generation. You'd instrument (and actually create the wrappers) at IPA code generation time but virtually the wrapper would become existent somewhen during IPA propagation by means of a clone to be materialized (I understand the wrapper is something like a thunk). The IPA propagation phase would decide which calls should go to the wrapper (and instrumented function) and which can use the original uninstrumented function (maybe from local already strubbed functions). Richard. > > -- > Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ > Free Software Activist GNU Toolchain Engineer > Disinformation flourishes because many people care deeply about injustice > but very few check the facts. Ask me about