From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by sourceware.org (Postfix) with ESMTPS id AB2153858C56 for ; Thu, 7 Dec 2023 07:25:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AB2153858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AB2153858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701933923; cv=none; b=lhsvOn40zTVUd6iA1j97Cbjw8UGbt67yi9wDZyF1hR49AixKbB1vuQfz2Trepe4OBOvhP+5R2Pqa+niKCckejn9RHmLv+oYt2CjohyrSipcMx+njMubBBu3gF6a+u4hJBAueqVuCwhSvrEKTaE1xB2vZI70nqEjWQ6h6cwM/dkk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701933923; c=relaxed/simple; bh=XLiD0x20pjHJhRBqbtLKZ2oG/lshyZKHQVOo/ObL7Fc=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=W5JxafIbyk/psB6Jm1vBs0G4Y5JTTfu4b90vrM8Wt96dOEx8iQooMsbQeolcLYRVplynG2wLI5tBHHMgp6Kldbc3Qk+iP1APavOd5QapiCEAGS/GwpLx8b7IsMpd2R5IJXS5zdel1DQHAr/078UvneCl84v7sLVPZ7hoNw7JOWs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50bf69afa99so398710e87.3 for ; Wed, 06 Dec 2023 23:25:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701933920; x=1702538720; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6K/wgwuV5odBgRkTlfnfEk2WfwJbsCiooW8iHKtfqus=; b=fViDGx/Di8WVFSbFKQxeIafPb/gu8ZW9cdrF1lIYRtYSdJSB34ewGHPkJTP39Ho1Uw j2iDCeRWYSZE6jsxoTTi3C4GG9dCNt1rKBRismN6Qy7novCHBdHAlfwk7D7k7UVciO+i ZIXh1pcff16q3IE278NYPcMDYPyiLpmzdMq3uv9evFgaM5xXPmZEX1z59SYyyjJe0pGB s5pOCn60Mr0KKvhqo29xyS7J9p5CVWi9jiea7uodAgBMBarOrAqM7wAgRa0m6WUvzwVa MnV+oTWMYlX4g6uvQ6OCWmnmTtm8fuo5GKur5K3UQ2d9E9fU25cUZPchzQnAP92qlAYy 76DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701933920; x=1702538720; h=content-transfer-encoding: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=6K/wgwuV5odBgRkTlfnfEk2WfwJbsCiooW8iHKtfqus=; b=gW+Z04ORXhm+MG3SD41+f3OBDFFEPEiHRRE0L3mQYsPcsKn2BaKzqbDOIVlB2XwCVi easMWv+n3D83cYNYXwVgekluWRdwAhtJlkyyeZCn/VtoGK19Hqx2ZeObFjKp06sSBogt xd0p9WywWyTiuc1utpVc196PlP/QQv4tKFW7D7jT90LrJdlVcLzpDXEbI10fF09oMV3I hllfTDqD74ST62+1lsyT9KUYrP0N0pvHa+9Ph6XggBnxPWr2pKDtMeEKdIPXDUmNKapU 2GuCNCG1BT2iL3KeU4K7G0yZsWyhmm+6ZrAQhT4NewPZhucHcFANSQR92dzye/MZPsyy WaIg== X-Gm-Message-State: AOJu0YyH1Jh078ZWeHhx+0NJIAPnb6D+z2aSCpD9vIYL45VTueu7srh/ b0oJhN3JeWkd0jeWL0xbYb+CVxkTVNYY1MoX/aM= X-Google-Smtp-Source: AGHT+IHUe1WxzqH8i5CKMo/AZoPht5DKa9f0TqbzMw1KZwyBkFE3uundlPO8kJulBYOtFUwk6UJMzcbOwmNeIwqxn7U= X-Received: by 2002:ac2:560e:0:b0:50b:fe44:ddfe with SMTP id v14-20020ac2560e000000b0050bfe44ddfemr1337785lfd.35.1701933919745; Wed, 06 Dec 2023 23:25:19 -0800 (PST) MIME-Version: 1.0 References: <87lea7sh0h.fsf@euler.schwinge.homeip.net> In-Reply-To: From: Richard Biener Date: Thu, 7 Dec 2023 08:21:20 +0100 Message-ID: Subject: Re: Causes to nvptx bootstrap fail: [PATCH v5] Introduce strub: machine-independent stack scrubbing To: Alexandre Oliva Cc: Thomas Schwinge , Tobias Burnus , gcc-patches@gcc.gnu.org, Jeremy Bennett , Craig Blackmore , Graham Markall , Martin Jambor , Jan Hubicka , Jim Wilson , Jeff Law , Jakub Jelinek , Tom de Vries Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.4 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,T_SCC_BODY_TEXT_LINE,WEIRD_QUOTING 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 Wed, Dec 6, 2023 at 11:12=E2=80=AFPM Alexandre Oliva = wrote: > > On Dec 6, 2023, Thomas Schwinge wrote: > > > As I understand things, this cannot be implemented (at the call site) f= or > > nvptx, given that the callee's stack is not visible there: PTX is unusu= al > > in that the concept of a "standard" stack isn't exposed. > > Not even when one PTX function calls another? Interesting. I'd hoped > that with control over entering and leaving strub contexts, one could > (manually) ensure they'd run in the same execution domain. But if not > even that is possible, it will render the current strub implementation > entirely unusable for this target indeed. > > Now, it doesn't seem to me that the build errors being experienced have > to do with that, but rather with lack of or incomplete support for > __builtin_{frame,stack}_address(). Are those errors expected when using > these builtins on this target? I'd have expected them to compile, even > if something went wrong at runtime. > > > > Instead of allowing "strub" pieces that can be implemented, should this > > whole machinery generally be disabled (forced '-fstrub=3Ddisable', or v= ia a > > new target hook?)? The libgcc functions should then not get defined > > (thus, linker error upon accidental use), or should just '__builtin_tra= p' > > if that makes more sense? Need an effective-target for the test cases. > > > Alternatively, we may also leave the generic middle end handling alive, > > and 'sorry' (or similar) in the nvptx back end, as necessary? > > Disabling the runtime bits is easy, once we determine what condition we > wish to test for. I suppose testing for target support in the compiler, > issuing a 'sorry' in case the feature is required, would provide > something for libgcc configure and testsuite effective-target to test > for and decide whether to enable runtime support and run the tests. There's always the possibility to hardcode target triplets we don't support of course. Richard. > -- > Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ > Free Software Activist GNU Toolchain Engineer > More tolerance and less prejudice are key for inclusion and diversity > Excluding neuro-others for not behaving ""normal"" is *not* inclusive