From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB30BC52D73 for ; Thu, 8 Aug 2024 06:24:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WK8rtcyRr8ddH6sUXU5fxnXTw/gvxfa7lKvESZemSbI=; b=uL9oP9VlASQ00urF1gI+H+YZv9 pLc7HMXFV7zkYKUk5hnHv8GahTAxQZC5sMBusc3nxhDVQq7Nj+CbXlcAEaQlG5nYb76Oxm2Z0tl89 reGGJ9FSxpm+geqD+A7sT34KqZ2qMNfR9rGwmpkJ0h2Jv7C8LFK8eqMIXi+/cI5ADoQPIq8lA4ttC mFoYPuyUi+uCwkMGDDlHqfWywlKiaXRmUDK/Vc/GKuKLIcmWSBvUTHqP9YGOrGED39aCMlVV3ASni UwN4PUleVeLHuFpxsmzofLbtJySibk8hX0jm6jS8qgcSZ8fr3dVuBwvO86L0ljJ6avXcyq+4s+/Z0 1olq+WEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbwZb-00000007DvL-09wZ; Thu, 08 Aug 2024 06:24:31 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbwZ1-00000007DnJ-15Oi for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2024 06:23:56 +0000 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-70d23caf8ddso581380b3a.0 for ; Wed, 07 Aug 2024 23:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723098234; x=1723703034; darn=lists.infradead.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=WK8rtcyRr8ddH6sUXU5fxnXTw/gvxfa7lKvESZemSbI=; b=SWlouRuV/05rstbdUqAgxVOK8L4IsXib8yC8MPtvN3++VoMdVBtYRfkP4ZkNJE2Vcd ww8kCWPvRIF0Py7FVsfHbSV1FnvqK01yX6SdZ8OhepyNmzeAzLRu8weNbcb3thLZilNk UeSzu5NeJtFSIqK3EU3Y5a1Ip+wnsCG2YNRXU92Oq0XuyL3B+0LFNx/bv2SOgDLRTgmJ jCp3MXYRe2BdgHLdq1XNdSgq7LgezewvmHNitjbubSvZkvimt1NVziE6tIYyImwyVKHd EvZuzDQ1tgJS8dmc4r8lIBaj3MgzOhoz4cZDnW3iS2v2n0d0GonjH9c4Vx1sp3ls69wX OpfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723098234; x=1723703034; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WK8rtcyRr8ddH6sUXU5fxnXTw/gvxfa7lKvESZemSbI=; b=UoKIUOuFH+wEIKoKDwsc8+AlgEMnyJqrB+kkDMllE5J8qDYF5dVyHgAjVaiYGmulgb fX+QY8/XaGTJZxEr1K/wDmrqKw2/j3p3Pz4hpxPEEhRuz0avdMumkjCwp0MUrPVFL5pO T2F3N9t7vQqTGgq07PwhwwVlAXzPerM4K0HZuVxGb8085jQVrNjYHXJ0pl5H9zTN0qtg VUqmyfIKc/v2oV5kttbdFzKPY2h0bqrlIHuHRjsOL5y7tUNyxUVHMHXf7ThtlEXkYgp3 SzqCl7JaiGKL6XBn2HO9iHARUhNMz3VIR4ib0MPmrz1ka8ygZpuk2ThZUtuE5DPqFXna Jo6g== X-Forwarded-Encrypted: i=1; AJvYcCVFYjg15niC6yZb+YaFCunxidMP+zlakjw8CjEK0wgwN7Ku+FuaS1h3W6YBjVxrqwGHBi1cKOdv1+YBVp8fc/qAB9/5DgPHsSdaAiz627F8MkEqni8= X-Gm-Message-State: AOJu0YzpFI4oxOlB7OuvyYo4EtYewSDsit4o623raSRqXEuzyWjR7Isx j0aucoENarqIGblgbb+kwi5kjgub9bgTORkDY2mAB2TtoOOegYFo5+7XT10gpXM= X-Google-Smtp-Source: AGHT+IFYw3pObWR57BLXtwXu43FaZ7f39AGJpk9DJobImXbFcvJMmOT0vZh2bJKK6Qf6HCB4wbBa5w== X-Received: by 2002:a05:6a20:7f8a:b0:1c3:ce0f:bfb2 with SMTP id adf61e73a8af0-1c6fcec8890mr851553637.23.1723098234214; Wed, 07 Aug 2024 23:23:54 -0700 (PDT) Received: from localhost ([2804:14c:87d5:5261:ed46:7c69:6cee:3c20]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-710cb2e89ffsm480393b3a.180.2024.08.07.23.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Aug 2024 23:23:53 -0700 (PDT) From: Thiago Jung Bauermann To: Mark Brown Cc: Catalin Marinas , Will Deacon , Jonathan Corbet , Andrew Morton , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Arnd Bergmann , Oleg Nesterov , Eric Biederman , Shuah Khan , "Rick P. Edgecombe" , Deepak Gupta , Ard Biesheuvel , Szabolcs Nagy , Kees Cook , "H.J. Lu" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Florian Weimer , Christian Brauner , Ross Burton , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v10 38/40] kselftest/arm64: Add a GCS stress test In-Reply-To: (Mark Brown's message of "Thu, 8 Aug 2024 00:10:46 +0100") References: <20240801-arm64-gcs-v10-0-699e2bd2190b@kernel.org> <20240801-arm64-gcs-v10-38-699e2bd2190b@kernel.org> <877ccsdkjp.fsf@linaro.org> Date: Thu, 08 Aug 2024 03:23:50 -0300 Message-ID: <87y157cz2h.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240807_232355_332834_86569A1E X-CRM114-Status: GOOD ( 15.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Mark Brown writes: > On Wed, Aug 07, 2024 at 07:39:54PM -0300, Thiago Jung Bauermann wrote: > >> # # Thread-4870: Failed to enable GCS > > which is printed if a basic PR_SET_SHADOW_STACK_STATUS fails immediately > the program starts executing: > > function _start > // Run with GCS > mov x0, PR_SET_SHADOW_STACK_STATUS > mov x1, PR_SHADOW_STACK_ENABLE > mov x2, xzr > mov x3, xzr > mov x4, xzr > mov x5, xzr > mov x8, #__NR_prctl > svc #0 > cbz x0, 1f > puts "Failed to enable GCS\n" > b abort > > the defines for which all seem up to date (and unlikely to fail in > system or config specific fashions). What happens if you try to execute > the gcs-stress-thread binary directly, does strace show anything > interesting? If you instrument arch_set_shadow_stack_status() in the > kernel does it show anything? Thank you for the pointer. It turned out that I accidentally ran the selftests binaries from the v9 version instead of the v10 version, and the gcs-stress-thread binary failed because it was using the old value for PR_SET_SHADOW_STACK_STATUS. Using the v10 version of the selftests the gcs-stress test passes. Sorry for the false alarm. Tested-by: Thiago Jung Bauermann -- Thiago