From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id BFE693858291 for ; Thu, 21 Dec 2023 22:26:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BFE693858291 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BFE693858291 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::436 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703197608; cv=none; b=JA1JLoJUtIK1CM2yb/KigWtqizWCnXlK208shfkPkTDYID5A+7UQDco8+bRP9tvOoeIMxr+aDxgf8CbrhRhiyrcDoZbeyabXl11LQ394KI2H87xjpAaggVzvKUvx4ZWynLpMAQyUWrwOScKQkuLVVP5ABKfxcW5VLECzlDXb670= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703197608; c=relaxed/simple; bh=fFuE2cw3++y7NRGdNYXHEQ2662JraQnxmA12Rp9Bhs8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EIGwO7dtbKSl6JKj10ILTQOKailUlmjc0IC5yG05ljpAAqeZeR0JCYnACcR6aiYu+27PjPp/izOj4NVl+l9X1fYPfxWRtFC1yAubXQanEQFmnkiMgjguNhLO94ozu31IdrNIpiL7A5NYmuRNi0IHiW9M65S0Z0Y92VA0zIdKBi0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6d741fb7c8eso1249221b3a.2 for ; Thu, 21 Dec 2023 14:26:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703197606; x=1703802406; darn=sourceware.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=/JcTdy9r9F8ixz9wjDeR85B083oeD/9+1OW1nH/UiZo=; b=aDvGS6U7oln3JrLXWLXGNbzlIOfmTM8+ol0csnze8g122O2s4pxfIcG7FynhBXZjvT U58ej7ig3WjgQ9qkz4r4ghmJYNTdV+5pBIXrCThw4YkpG0RIAig12MuleczyCPz/Swph MLQ7WyZjygO1A/uXj2jhKrSOqcIlBEDRDI4BlpIcLHpL0lFwIJ9xV/RbZQuiXk1UpmJE /brIACeVo5KNT8sb5LT3kLIagLflWilYxhxQVh0h80xixCIdZkK0Kyo8MWTfBotDG+I5 vsOXvehgnfQn66Uga7PEdf8vQNQfYj86duH+8a/ZFxkKEJn0FCa57LWKJfwBt0u/b615 L4yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703197606; x=1703802406; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/JcTdy9r9F8ixz9wjDeR85B083oeD/9+1OW1nH/UiZo=; b=wb+dTMj/FRSsdO1enmRTLNt4VbRVGvEsXCHDKcQNGo/tlonpYIZjnHtJv9pDeCWDWu gw23Oy7WbUQ4MWQ7ve4y2xmrRX9dsRDCY6tk7EzxobY35XBWrJ3wFk66iuqptzfQjgPo Xe4ld72PCOM1Tli38RnLhHLhGZKR0/dhY43jm+noT0Cu6JpEtIVzj6NLse6/xAinV3eT x+MK8ar5lP4PywnTlLhQhn8iUXvjuAObaqbBKRj1Km76J120r2v0I2Kp1FpRPgirpXWH /lgaHlMEYu597Hkw8hthkrWnC1e7wQyQTbD9ElTffAa82yCMyTpwbt1mivXxZDqJg3IK JFGQ== X-Gm-Message-State: AOJu0YzmuKk5eWShZs0JFgkZfY46kK8a0PeaHqc31V3uvd2I9DCRUqiC T5K4LYvBVuYCXdFTdKP2NHONT7Q2Vr1S7a1ePW5od4NSxHo= X-Google-Smtp-Source: AGHT+IEr4i1lwS07Tc8+NnFfw9ZhAK+DJHVbNYjWvWUy4DMX9vS6LIuzXtgARibQVfnKdzcdiKNAHg== X-Received: by 2002:a05:6a00:cc1:b0:6d5:2c9e:2d7b with SMTP id b1-20020a056a000cc100b006d52c9e2d7bmr383839pfv.58.1703197605647; Thu, 21 Dec 2023 14:26:45 -0800 (PST) Received: from localhost ([2804:14d:7e39:8470:3fbf:ac2c:7273:55a3]) by smtp.gmail.com with ESMTPSA id ff21-20020a056a002f5500b006cef5c09ca3sm2163914pfb.147.2023.12.21.14.26.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 14:26:45 -0800 (PST) References: User-agent: mu4e 1.10.8; emacs 29.1 From: Thiago Jung Bauermann To: "Schimpe, Christina" Cc: gdb@sourceware.org Subject: Shadow stack command to host related subcommands (was Re: Shadow stack backtrace command name) In-reply-to: Date: Thu, 21 Dec 2023 19:26:42 -0300 Message-ID: <87h6kbfazh.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Hello again, This isn't about backtrace, but still related to your proposal I think. "Schimpe, Christina via Gdb" writes: > It is configurable using "print symbol-filename" and COUNT. > The command can be called by the following names: > - "info shadow-stack bt", "info shadow-stack backtrace" > > From my perspective, the command name has the following pros and cons: > (+) Easy to understand by just looking at the command name. > (-) Rather long syntax As I mentioned yesterday, I like the "bt -shadow" proposal but I'd also like to have an "info shadow-stack" command (or just "shadow-stack" as suggested by Guinevere) to hang a couple of GCS subcommands onto, e.g.: info shadow-stack enabled info shadow-stack locked which would get/set the GCS features that are enabled or locked. These correspond to a couple of entries in the structure returned by ptrace's NT_ARM_GCS regset in Linux: struct user_gcs { uint64_t features_enabled; uint64_t features_locked; uint64_t gcspr_el0; }; Initially I thought of exposing them as pseudo-registers, but this way seems more straightforward. What do you think? Would this be useful for Intel CET as well? -- Thiago