get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2196958/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2196958,
    "url": "http://patchwork.ozlabs.org/api/patches/2196958/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20260216172545.1179353-3-yury.khrustalev@arm.com/",
    "project": {
        "id": 41,
        "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api",
        "name": "GNU C Library",
        "link_name": "glibc",
        "list_id": "libc-alpha.sourceware.org",
        "list_email": "libc-alpha@sourceware.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260216172545.1179353-3-yury.khrustalev@arm.com>",
    "list_archive_url": null,
    "date": "2026-02-16T17:25:45",
    "name": "[v4,2/2] aarch64: Tests for locking GCS",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1bfc431421fce6fe74fa36fd5ef649fbec5c428a",
    "submitter": {
        "id": 88214,
        "url": "http://patchwork.ozlabs.org/api/people/88214/?format=api",
        "name": "Yury Khrustalev",
        "email": "yury.khrustalev@arm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20260216172545.1179353-3-yury.khrustalev@arm.com/mbox/",
    "series": [
        {
            "id": 492335,
            "url": "http://patchwork.ozlabs.org/api/series/492335/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=492335",
            "date": "2026-02-16T17:25:44",
            "name": "aarch64: Support locking GCS",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/492335/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196958/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196958/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "libc-alpha@sourceware.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "libc-alpha@sourceware.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256\n header.s=selector1 header.b=O3UYoT4/;\n\tdkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com\n header.a=rsa-sha256 header.s=selector1 header.b=O3UYoT4/;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)",
            "sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256\n header.s=selector1 header.b=O3UYoT4/;\n\tdkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com\n header.a=rsa-sha256 header.s=selector1 header.b=O3UYoT4/",
            "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=arm.com",
            "sourceware.org; spf=pass smtp.mailfrom=arm.com",
            "server2.sourceware.org;\n arc=pass smtp.remote-ip=2a01:111:f403:c201::3"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fF8tz4gDVz1xtN\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 04:30:51 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 724FD4BAD161\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 16 Feb 2026 17:30:49 +0000 (GMT)",
            "from AS8PR04CU009.outbound.protection.outlook.com\n (mail-westeuropeazlp170110003.outbound.protection.outlook.com\n [IPv6:2a01:111:f403:c201::3])\n by sourceware.org (Postfix) with ESMTPS id 159DF4BAD173\n for <libc-alpha@sourceware.org>; Mon, 16 Feb 2026 17:27:20 +0000 (GMT)",
            "from AS8PR04CA0136.eurprd04.prod.outlook.com (2603:10a6:20b:127::21)\n by GVXPR08MB11785.eurprd08.prod.outlook.com (2603:10a6:150:2bf::21)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9611.16; Mon, 16 Feb\n 2026 17:27:04 +0000",
            "from AMS1EPF00000090.eurprd05.prod.outlook.com\n (2603:10a6:20b:127:cafe::7b) by AS8PR04CA0136.outlook.office365.com\n (2603:10a6:20b:127::21) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9611.16 via Frontend Transport; Mon,\n 16 Feb 2026 17:27:04 +0000",
            "from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by\n AMS1EPF00000090.mail.protection.outlook.com (10.167.242.87) with Microsoft\n SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9632.12\n via Frontend Transport; Mon, 16 Feb 2026 17:27:03 +0000",
            "from AM8P189CA0017.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:218::22)\n by GV1PR08MB10838.eurprd08.prod.outlook.com (2603:10a6:150:16a::10)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9611.16; Mon, 16 Feb\n 2026 17:25:53 +0000",
            "from AMS0EPF000001B2.eurprd05.prod.outlook.com\n (2603:10a6:20b:218:cafe::ba) by AM8P189CA0017.outlook.office365.com\n (2603:10a6:20b:218::22) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9611.16 via Frontend Transport; Mon,\n 16 Feb 2026 17:25:19 +0000",
            "from nebula.arm.com (172.205.89.229) by\n AMS0EPF000001B2.mail.protection.outlook.com (10.167.16.166) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.9632.12 via Frontend Transport; Mon, 16 Feb 2026 17:25:53 +0000",
            "from AZ-NEU-EX04.Arm.com (10.240.25.138) by AZ-NEU-EX03.Arm.com\n (10.240.25.137) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Mon, 16 Feb\n 2026 17:25:51 +0000",
            "from fdebian.localdomain (10.57.10.35) by mail.arm.com\n (10.240.25.138) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29 via Frontend\n Transport; Mon, 16 Feb 2026 17:25:51 +0000"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 724FD4BAD161",
            "OpenDKIM Filter v2.11.0 sourceware.org 159DF4BAD173"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 159DF4BAD173",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 159DF4BAD173",
        "ARC-Seal": [
            "i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1771262840; cv=pass;\n b=L/u/sjACwZhVOtrgOsOiupfyRX0CxXpQhuLPBSHRXqN73RX5qsr6NwesO5MMEHV2BE96pFMZwD+8Y6oViQZOGkUDamJBALYmgSFm0inLyuZx/sos/k36rnIfQLeEMKvoB2lhF/KJ8PleKissrlRZeIa8vq2kR14sag20x/7X9JE=",
            "i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;\n b=bFmfEZ0CUP+xhGXLPh3Hx2cQa9PVuaGOtv0LDDqDz1AQbaDcd93+PJYPSwXNFKbMOPhg3wxy4XueoNA76p9QITWpbVN+vbBaAquA9H8x7cUonI8Bhxfa/2YcxjjuWcg/60yNUz9IHKAdwZ2yxBGTiFBGNFjhA11dCcoLwPjj+iWQkQ4r0/Zldy+aDELiqPZ4gI1kvARcCxeFNWF9YXwWP1ylCt9EPMY/qwXKBsFrJc6FeAQj9AIUaBxGw+MK72DrqWtOTbSUQJuTf8lU2kOx2AJlEkhEHeomdmxO/QWdSfC/wl2OnQmmwj58sEX4KgGVxzM4lHrxEKLEznEph9FSfA==",
            "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=W7S4YQxFlthHmq83VyTCDhLgbuH5Owm3HXpRFyofxYQJb2kn8wHmxPMUeQN2I1O7Bh85Q9oj1c1H+yGouuqqR1bn5lgVj5PxlV1JXcj0lbUGoEW4ZUGnO4YoqypySw0skJD8PCB6XASmCnhBGUovdYgjfXMMPf6LncW7vtXvgS15cR65dMZK18QIsam86g92KINBJKKZZchXcUvGYMPt51AIhIWYmHhD+ZEB+dpiA4BUyxHtK/mgpgIIByuBUcX4CZjKjtlUzrTMOrzyase99YUUGShZKerKHXppoYfR6F3Bu3nSkbLZ4SU+pBrTD6deN8gUPiOr0BYlbEjNrbFtAw=="
        ],
        "ARC-Message-Signature": [
            "i=3; a=rsa-sha256; d=sourceware.org; s=key;\n t=1771262840; c=relaxed/simple;\n bh=3gqrOvMZR4faggimziDYFpNtRmpcwhQ2B3+1TMg6P0g=;\n h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID:\n MIME-Version;\n b=M1cazURSH3VigJ0oXwQbEplLPf39wzBBytz9FbmrmGjCczbai4TbnC3PDb/uKhQjOuyKeJSk2QzANb6yJurxWTO0ghEr9Cb53M8i2r04QMC72lL/GpGn1WOu9rSa5jD1cu2KCO2VfMXAJLlGv4NZyoeL5t1EFshDzi5EirZzq4E=",
            "i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=PP0rLhaBFqoKc9NMeuKxOnQmBbhOBhrIvrB3nWuHQM0=;\n b=csqUodvkBGDEQinSvYhf90WPNwYiT0t8vqBIN8e5ptS3NYH6kv5txY93gxne+j8kIoT7Ckx3cLM5Qu17ZX+h99Q0KS6W9lO0apOhNwEwkwFmldFPZ/IuefBiGKj/6sNfZrkVCs8hc6YSnsevHIEuU7df/naS3HJsxXjmyaywbrrjn5yk9sI/3CSGl9KywsHP8CVP1f5VDC0DuVTR1QfdgT5WjC0YdT8gJzMCZ68A/aMtK5HvERacqty2TNSGzM+5Jyv2KplAjn5zUnFNyS3N49qOMgzIZBP49MsSWZR0clqJDYUVctyjhLA62rIE+NSvj+EHm+M5BB3XiKl4bgu0RA==",
            "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=PP0rLhaBFqoKc9NMeuKxOnQmBbhOBhrIvrB3nWuHQM0=;\n b=Zzbsa5TMIvfVY8V+mLBUIFq7e/g23jQ3udab5L7+Eg/f2aKavzx2Gua+62aAfUCEClBR6m6IzAbp7Vxe1b3E5Su5WHhXNMZyVyFOBVMAp2sZu7XHhKga1jjdZdP1/UhNLxL/UI8UYmLrWH4xHrLKjNBLzI/lKLcXwc9Fu83Y06+P2NSSdpcZKc2ys8BxN2lqw+nYC/UTTAWDb+aEqcYLYDvFsb6fHJy2zEuKIWZm0IeH+xEkVO/KZx34yT8+EDcmLBCd5Irh3ju7zF+9W7QkIYrnQyYxzvpN9ScvcO4g3TJNgK0NQ2mfu+HMysB+LYwNQVXgYzxMjzgtWCsBKB5CEw=="
        ],
        "ARC-Authentication-Results": [
            "i=3; server2.sourceware.org",
            "i=2; mx.microsoft.com 1; spf=pass (sender ip is\n 4.158.2.129) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com;\n dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com;\n dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1\n spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com])",
            "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 172.205.89.229) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com;\n dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com;\n dkim=none (message not signed); arc=none (0)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=PP0rLhaBFqoKc9NMeuKxOnQmBbhOBhrIvrB3nWuHQM0=;\n b=O3UYoT4/0FvoVHRBGbDMuO+KaRt6HlPPBzoX+jnZHedi1Joq6yjbzpmGFBkVHvRqMsOmejtDGsRlRUAhLibHzsz2hrmf/uLnoHF6vnCUd1D9gs17TSG5Alv1ZiP0rVx3M1mPcx6RfxJP9mIKy9meTlVu5qFc8qkqxDLq6K449cA=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=PP0rLhaBFqoKc9NMeuKxOnQmBbhOBhrIvrB3nWuHQM0=;\n b=O3UYoT4/0FvoVHRBGbDMuO+KaRt6HlPPBzoX+jnZHedi1Joq6yjbzpmGFBkVHvRqMsOmejtDGsRlRUAhLibHzsz2hrmf/uLnoHF6vnCUd1D9gs17TSG5Alv1ZiP0rVx3M1mPcx6RfxJP9mIKy9meTlVu5qFc8qkqxDLq6K449cA="
        ],
        "X-MS-Exchange-Authentication-Results": [
            "spf=pass (sender IP is 4.158.2.129)\n smtp.mailfrom=arm.com; dkim=pass (signature was verified)\n header.d=arm.com;dmarc=pass action=none header.from=arm.com;",
            "spf=pass (sender IP is 172.205.89.229)\n smtp.mailfrom=arm.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=arm.com;"
        ],
        "Received-SPF": [
            "Pass (protection.outlook.com: domain of arm.com designates\n 4.158.2.129 as permitted sender) receiver=protection.outlook.com;\n client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C",
            "Pass (protection.outlook.com: domain of arm.com designates\n 172.205.89.229 as permitted sender) receiver=protection.outlook.com;\n client-ip=172.205.89.229; helo=nebula.arm.com; pr=C"
        ],
        "From": "Yury Khrustalev <yury.khrustalev@arm.com>",
        "To": "<libc-alpha@sourceware.org>",
        "CC": "Adhemerval Zanella <adhemerval.zanella@linaro.org>, Florian Weimer\n <fweimer@redhat.com>, Mark Brown <broonie@kernel.org>, Jeremy Linton\n <jeremy.linton@arm.com>, Bill Roberts <bill.roberts@foss.arm.com>, \"Steve\n Capper\" <steve.capper@arm.com>, Andre Vieira <andre.simoesdiasvieira@arm.com>",
        "Subject": "[PATCH v4 2/2] aarch64: Tests for locking GCS",
        "Date": "Mon, 16 Feb 2026 17:25:45 +0000",
        "Message-ID": "<20260216172545.1179353-3-yury.khrustalev@arm.com>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<20260216172545.1179353-1-yury.khrustalev@arm.com>",
        "References": "<20260216172545.1179353-1-yury.khrustalev@arm.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-EOPAttributedMessage": "1",
        "X-MS-TrafficTypeDiagnostic": "\n AMS0EPF000001B2:EE_|GV1PR08MB10838:EE_|AMS1EPF00000090:EE_|GVXPR08MB11785:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "df1e1b44-14b8-4e1e-da8b-08de6d8099de",
        "x-checkrecipientrouted": "true",
        "NoDisclaimer": "true",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam-Untrusted": "BCL:0;\n ARA:13230040|82310400026|1800799024|376014|36860700013|13003099007;",
        "X-Microsoft-Antispam-Message-Info-Original": "\n gfJIhDhK8ITJyZHilDqKYstyiJ5Ux+lmETumwFnrnfedA8LszfX2kRhpOJUZHNa5b+uALYOKqKIrHQowjBbiv8BREERZLeek5jOhQMGlrSfrN2yIuYTSHRIj4sNeyHpsrAJ0AYK/vTxrcxRDlry8X/Z1lAyPfThdPBjzbhcHdYYCcUWfFJLAZoKPFcoH9gQuCcFqEO3UvJ//NkU+I+nKL9035pdG9az70/RSQCVO4ShF4wV5eKSY+ZuOb5eoc0TGJlskUrHbJbWI5RjaHrjoQ1H9HOFLq9QCSJAxNu+kr/fKk0jlojUxMAW1H7Rbts/xCaCmzJ6XzZR8s79HNsu8s+3x6m1Ukn4b4ogbn389FKuhD+wlmadb5fX+TZ4L/odPO5sHBMnbpMnQAMtS2HE9/7vKIi3mTBRqVuEp+zxtuxhnCJOZiZCd8F9VURtl61qVLgZtSG7RVeZWKxajqaA5N89z3tH+8Cg1AliDf3DuWcJEzNKOvQxI3XyrW3oAVKO+MOA6ND9OjEICbLcD5yXW3DD1XdqPM4LupP+iCLj0776DmurnvYjMwFZvmjhws/tK1UyBvc2evKBqK2TlEYXpqsMb+ZhJjI7cB7EbllovN7sayl4bALOgpzaWAG2tLevBXUzuGpo97D787FPU0uq0Tad1oFg+FKAYuB9J2QaEVvzfOTuyac41Dr1JFAD6mDsZPQWCffpoaX4NNi+d8lICYcYXOEbFs5NMoJ02kybw27/YXMjIoWw3cu9on7HPvBoP3kl8d/6nkeC4+xs2wNlzGws4/bLvfdWX4BwqDPfQg9uJX9hK7yAjSkAVBMyakkLf3eLJpGRAmhvRChMy0O6Rlb2oQDavobC0NLTP553C+v1qI+0UaIrXPGFsZTJ1LOFifYosC+P3Jfn5Jxz/w9X1wCMYzctOT5Piivz2RZt+zJn3fl40eVXZgZArpG/wj7MGxhY3nXdnzHE//cu0loebsiy3qMyNNKUhL5niTJm7QtFtfiBa0ZFtWVNywmAYeOFh8xvXRiFXn7Uw+PykbECP1l/K4rrMyL9+sImn27k3iUF5oxI8vZqZYEH2YdfmZnQKSfg82UnXszEi0/ayEnZHOKIDrFHoxlNPN2b9ytMDy+3cZPIfvKm95DJSDaYt5LSIRNhcwyoP/lvca7/5BU4SIFb6CpWDEak+E3LV49W70lOjzisUEbpwZUPknOquzPr/YEYK4LeA8jMq/u4eJbbOfYq3U8FZ0Ugo/21XfloWkRQwg3qoHrUoqq2El8UbJadHA9yBPrk7ZOGHu9dy4OzCDXiGHA3PWpJR/KUxRj/vjZyCKvdH6d6+9u6M8jgdjWKzCEKXj0XjZnC5TZzllEJWVN+mbWTA5u4pV51t3pEXt9JNTgJTdbXW36Fj2AqWABj0DqF1wwXiDQOsNTCj7cmOGJh3Wa6lgKjb2DVseZl13vCzUwappBjJMS/9nHUn1keHnP9QtgaocpbEbFJsZub04hx6GzVWPqkAjb9wM0P3dAGO7LN++gRPGY3riJqY1q9x8BtSawzOofzG3XLlAOL3gvvqbK7bzZO0Hy8f0jvw7NG3NFJDjvqRj9ecICLCSuj6zqXjocsaNGhnSRCPneC6mCtr9AdABiORIOPHkbwoJIZNzuXr6vDGk5FigNOA0KJh0H1IxJBNuWgKb0xhi6ZndA==",
        "X-Forefront-Antispam-Report-Untrusted": "CIP:172.205.89.229; CTRY:IE; LANG:en;\n SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent;\n CAT:NONE;\n SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013)(13003099007);\n DIR:OUT; SFP:1101;",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": [
            "GV1PR08MB10838",
            "GVXPR08MB11785"
        ],
        "X-MS-Exchange-Transport-CrossTenantHeadersStripped": "\n AMS1EPF00000090.eurprd05.prod.outlook.com",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id-Prvs": "\n d094d587-2412-4bc1-fa0a-08de6d806fc4",
        "X-Microsoft-Antispam": "BCL:0;\n ARA:13230040|35042699022|1800799024|82310400026|376014|14060799003|36860700013|13003099007;",
        "X-Microsoft-Antispam-Message-Info": "\n sb6cYknZlEwLA5+QBkVk+8JoseE08eGhtoRMaD9fFDcrwBkhFVU8Oe+qQ0zk6Y7t4A+UF4TM+dUqKVllFOSSIcbMYVnki31GJDumtiJ97aUl13CuL0bK67Y83VTAe+ioTVZKFhAJJ7+dfNIdaRQQDr5dP0YDsVk2AlvZUd7P1OQK94OJfpTQH59PHCaQuS8xNeCjN0PlSgD0akcJBaL3okQVeKuo5wglxa4+iF/VnSJQMl36aZ2rXNfDcUgRribOLt1Vck0QOPuBc7XxeWfT4JsmOImGodoQwR+0WQ0W8PWAA3bCtWoE/GX0hKF3bdIORAJESCdSCc/8jKhlHbSADdTMViXjrnrJo+AzgFVnJ0n92vXXMZ+rQrUTogFBYXZlP2BmAzYk4XsLVWCT4rvkyKdcA2GTZFfeu8Nl3coLcT2lx+0TyfFZIeyjPQ+Y4FaqaknPqgGZPK7mCj2qRhJs/LZ3Sjjq7ajvGOM0dz9pxD2XG3HhjR/lZ2CPuGGEwp6BJhOjkgwIMNN7Y3fqrxlqyD/Y3tF5IYfHTS0pJ8kbmRNihAyiWmxHU4rdSxGbWf/g0GWuy3B2X3t+fRfu8mNP6UnAoB9rGW1tkvtYeN6wsBJThLRJb42S5S62qv9+XuYTukjbQALGBhkDqgH4vHAyLSKGxZeuXE7UHvt40eStvmp4mOlN943Xw++zwkjjux1dZlbKA3ijIWeXfml2WBDtUb2Ks+01It2aKMnDBzOLLX9T5LHlwe8u7x2DFJI70GfpdHEEx2pv4pSkTyCWMvoDmlMuLTfpeyC9u9+rx/737O1xyPDyJI3dAm6n8Em2RiLz3Gnl5dUqNk8F8bel6muc067jh+rpHjlqYukgnb8JBjxY3ygzZdattOGxwcoqM0A0AhfJgfB2ZNKjCdvAJbPSMuNi0pA6eShaftpiScjxXf0Jpb1MWaUUNI4wiY3nG9BcZyLKoZ/MR3zLhUZl1rIuqBgyRyttRx2Y+opv9amYg0FraQPx1mlAxJhzP1fjqV6TQEd79Vk2OxZ9SxI2HMKFSx9ft+P/8RmzcsXyfbcPODTm8Du/PJqrtqFIpVp+4wgGDmnVUEeYMTkEEZVQwIdqYtf7rEDR4cBmcGUnejXkxmpaBt+EwCdrtyNTFdO1LbBbmj4QA4nuM862Br7RbVwpPVkT18IToJWYdeJR3vs/Q1PkzTxY218vptBHBBYvwO6dGPgRhShEydxKJBnFBS/1B3kXYWhFw0mWWXwqUsPM+B+Z9OyWrHVGGNPgm9kHbt7BdLLp22hOx/aG2Op4LVkzTnFGIuMD+X14E1165Rwe+8iZPyxDTJEpm+iS3/70GPAcH9blUjE8boiSDGdty9GM8bvyjvAfo6lV4X7t7dBimj5v9CC1PsY2R5hxhccMUHmXYrppVKP0xderor8/Oo9vI0dpCG8TNuO13LAF5Q56+hPfStoLiJe42xvy6YeUWMFu1QcL5kbWHhfa88AhShBvq+CUcgMshlDIPnA2LWN5Ru/GJLK+chB7nOp+yzzc614ENEk33fIFCpxIbPeYMcQ4ArjD2hTLolaxre11osUeMENIVRVvXsweLIK0wODunx7kidmG6wnLoThT1f7dufD0VwMiIuu5KZhk0+4XMkAr7Bw4kBHbaqv/xNewJiabspz3tlTnxawZNPkOJz4iwtOGaw==",
        "X-Forefront-Antispam-Report": "CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com;\n PTR:InfoDomainNonexistent; CAT:NONE;\n SFS:(13230040)(35042699022)(1800799024)(82310400026)(376014)(14060799003)(36860700013)(13003099007);\n DIR:OUT; SFP:1101;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n vX/OLrTI2Swv/y98gkt3beeRAPxZeqGf2rWROLnJov9L/hiouOPEHhURpJ9p1nhpnLLMPK/Aq97RD0xafWYhVZm2TTbtnEXHOVRQ4Z4I9LWunw1VOZqZnjOmRTb9aHNiGbidzNK4bkkrz7lBdM7SKBsJtLfMXpuGZ0h0AkkXoiBpf2uySb3x811Bqvky9JE6sc6ZE6yP2iik7hE1nrP6CIQvjZen3saFTVXJ1fNnYWxaj+SMUdEiUnewwb5dfDeQXSrCXow41guNqeRAVweHGlQ+2vV2k7sduZ5bC1jF4qpaEeU9AkTgK6KisMEfaC05o9A1uJfnoUQ2RYxGu7DL8rmx2j5+1XHwmhFnZPZcAgeGvfCNZowWOL1aSEYAhAOKAW8wfsmsvqBtSqJlZfSwFEaZPMfsrlpUor3L+KHqohGPMB0oTCSgKrG5rwYH9ZpN",
        "X-OriginatorOrg": "arm.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "16 Feb 2026 17:27:03.6953 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n df1e1b44-14b8-4e1e-da8b-08de6d8099de",
        "X-MS-Exchange-CrossTenant-Id": "f34e5979-57d9-4aaa-ad4d-b122a662184d",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129];\n Helo=[outbound-uk1.az.dlp.m.darktrace.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n AMS1EPF00000090.eurprd05.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-BeenThere": "libc-alpha@sourceware.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Libc-alpha mailing list <libc-alpha.sourceware.org>",
        "List-Unsubscribe": "<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>",
        "List-Archive": "<https://sourceware.org/pipermail/libc-alpha/>",
        "List-Post": "<mailto:libc-alpha@sourceware.org>",
        "List-Help": "<mailto:libc-alpha-request@sourceware.org?subject=help>",
        "List-Subscribe": "<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>",
        "Errors-To": "libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org"
    },
    "content": "Check that GCS is locked properly based on the value of the\nglibc.cpu.aarch64_gcs tunable.\n\nTest tst-gcs-execv checks that a child process can be spawned correctly\nwhen GCS is locked for the parent process.\n\nTest tst-gcs-fork checks that if GCS is not locked for the parent\nprocess, the forked child can disable GCS.\n\nTests tst-gcs-lock and tst-gcs-lock-static check that GCS is locked\nfor dynamic and static executables when run with aarch64_gcs=1.\n\nTests tst-gcs-unlock and tst-gcs-unlock-static check that GCS is not\nlocked for dynamic and static executables when run with aarch64_gcs=0.\n\nTest tst-gcs-lock-ptrace checks via ptrace that when GCS is locked,\nall GCS features are locked.\n---\n sysdeps/unix/sysv/linux/aarch64/Makefile      |  25 +++\n .../unix/sysv/linux/aarch64/tst-gcs-execv.c   |  91 ++++++++++\n .../unix/sysv/linux/aarch64/tst-gcs-fork.c    |  75 ++++++++\n .../unix/sysv/linux/aarch64/tst-gcs-helper.h  |   5 +\n .../sysv/linux/aarch64/tst-gcs-lock-ptrace.c  | 166 ++++++++++++++++++\n .../sysv/linux/aarch64/tst-gcs-lock-static.c  |   1 +\n .../unix/sysv/linux/aarch64/tst-gcs-lock.c    |  58 ++++++\n .../linux/aarch64/tst-gcs-unlock-static.c     |   2 +\n .../unix/sysv/linux/aarch64/tst-gcs-unlock.c  |   2 +\n 9 files changed, 425 insertions(+)\n create mode 100644 sysdeps/unix/sysv/linux/aarch64/tst-gcs-execv.c\n create mode 100644 sysdeps/unix/sysv/linux/aarch64/tst-gcs-fork.c\n create mode 100644 sysdeps/unix/sysv/linux/aarch64/tst-gcs-lock-ptrace.c\n create mode 100644 sysdeps/unix/sysv/linux/aarch64/tst-gcs-lock-static.c\n create mode 100644 sysdeps/unix/sysv/linux/aarch64/tst-gcs-lock.c\n create mode 100644 sysdeps/unix/sysv/linux/aarch64/tst-gcs-unlock-static.c\n create mode 100644 sysdeps/unix/sysv/linux/aarch64/tst-gcs-unlock.c",
    "diff": "diff --git a/sysdeps/unix/sysv/linux/aarch64/Makefile b/sysdeps/unix/sysv/linux/aarch64/Makefile\nindex 2b8401f42e..58bc119ace 100644\n--- a/sysdeps/unix/sysv/linux/aarch64/Makefile\n+++ b/sysdeps/unix/sysv/linux/aarch64/Makefile\n@@ -151,10 +151,14 @@ gcs-tests-dynamic = \\\n   tst-gcs-dlopen-override \\\n   tst-gcs-enforced \\\n   tst-gcs-enforced-abort \\\n+  tst-gcs-execv \\\n+  tst-gcs-fork \\\n   tst-gcs-ld-debug-both \\\n   tst-gcs-ld-debug-dlopen \\\n   tst-gcs-ld-debug-exe \\\n   tst-gcs-ld-debug-shared \\\n+  tst-gcs-lock \\\n+  tst-gcs-lock-ptrace \\\n   tst-gcs-noreturn \\\n   tst-gcs-optional-off \\\n   tst-gcs-optional-on \\\n@@ -167,15 +171,18 @@ gcs-tests-dynamic = \\\n   tst-gcs-shared-enforced-abort \\\n   tst-gcs-shared-optional \\\n   tst-gcs-shared-override \\\n+  tst-gcs-unlock \\\n   # gcs-tests-dynamic\n \n gcs-tests-static = \\\n   tst-gcs-disabled-static \\\n   tst-gcs-enforced-static \\\n   tst-gcs-enforced-static-abort \\\n+  tst-gcs-lock-static \\\n   tst-gcs-optional-static-off \\\n   tst-gcs-optional-static-on \\\n   tst-gcs-override-static \\\n+  tst-gcs-unlock-static \\\n   # gcs-tests-static\n \n tests += \\\n@@ -225,6 +232,24 @@ tst-gcs-optional-static-on-ENV = GLIBC_TUNABLES=glibc.cpu.aarch64_gcs=2\n tst-gcs-optional-static-off-ENV = GLIBC_TUNABLES=glibc.cpu.aarch64_gcs=2\n tst-gcs-override-static-ENV = GLIBC_TUNABLES=glibc.cpu.aarch64_gcs=3\n \n+LDFLAGS-tst-gcs-execv += -Wl,-z,gcs=always\n+tst-gcs-execv-ENV = GLIBC_TUNABLES=glibc.cpu.aarch64_gcs=1\n+tst-gcs-execv-ARGS = -- $(host-test-program-cmd)\n+LDFLAGS-tst-gcs-fork += -Wl,-z,gcs=always\n+tst-gcs-fork-ENV = GLIBC_TUNABLES=glibc.cpu.aarch64_gcs=2\n+\n+LDFLAGS-tst-gcs-lock += -Wl,-z,gcs=always\n+tst-gcs-lock-ENV = GLIBC_TUNABLES=glibc.cpu.aarch64_gcs=1\n+LDFLAGS-tst-gcs-lock-ptrace += -Wl,-z,gcs=always\n+tst-gcs-lock-ptrace-ENV = GLIBC_TUNABLES=glibc.cpu.aarch64_gcs=1\n+tst-gcs-lock-ptrace-ARGS = -- $(host-test-program-cmd)\n+LDFLAGS-tst-gcs-lock-static += -Wl,-z,gcs=always\n+tst-gcs-lock-static-ENV = GLIBC_TUNABLES=glibc.cpu.aarch64_gcs=1\n+LDFLAGS-tst-gcs-unlock += -Wl,-z,gcs=always\n+tst-gcs-unlock-ENV = GLIBC_TUNABLES=glibc.cpu.aarch64_gcs=2\n+LDFLAGS-tst-gcs-unlock-static += -Wl,-z,gcs=always\n+tst-gcs-unlock-static-ENV = GLIBC_TUNABLES=glibc.cpu.aarch64_gcs=2\n+\n # force one of the dependencies to be unmarked\n LDFLAGS-tst-gcs-mod2.so += -Wl,-z,gcs=never\n \ndiff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-execv.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-execv.c\nnew file mode 100644\nindex 0000000000..91053a4726\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-execv.c\n@@ -0,0 +1,91 @@\n+/* AArch64 test for GCS for creating child process.\n+   Copyright (C) 2026 Free Software Foundation, Inc.\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library; if not, see\n+   <https://www.gnu.org/licenses/>.  */\n+\n+#include \"tst-gcs-helper.h\"\n+\n+#include <sys/prctl.h>\n+#include <unistd.h>\n+#include <errno.h>\n+#include <string.h>\n+\n+static int\n+target (void)\n+{\n+  /* In child.  */\n+  printf (\"in child: %u\\n\", getpid ());\n+  TEST_VERIFY (__check_gcs_status ());\n+\n+  /* Try disabling GCS (should fail with EBUSY).  */\n+  int res = prctl (PR_SET_SHADOW_STACK_STATUS, 0, 0, 0, 0);\n+  TEST_COMPARE (res, -1);\n+  TEST_COMPARE (errno, EBUSY);\n+  return 0;\n+}\n+\n+int main(int argc, char *argv[])\n+{\n+  /* Check if GCS could possible by enabled.  */\n+  if (!(getauxval (AT_HWCAP) & HWCAP_GCS))\n+    FAIL_UNSUPPORTED (\"kernel or CPU does not support GCS\");\n+\n+  /* GCS should be enabled for this test at the start.  */\n+  TEST_VERIFY (__check_gcs_status ());\n+\n+  /* If last argument is 'target', we just run target code.  */\n+  if (strcmp (argv[argc - 1], \"target\") == 0)\n+    return target ();\n+\n+  /* In parent, we should at least have 3 arguments.  */\n+  if (argc < 3)\n+    FAIL_EXIT1 (\"wrong number of arguments: %d\", argc);\n+\n+  char *child_args[] = { NULL, NULL, NULL, NULL, NULL, NULL };\n+\n+  /* Check command line arguments to construct child command.  */\n+  if (strcmp (argv[0], argv[2]) == 0)\n+    {\n+      /* Command looks like\n+\t /path/to/test -- /path/to/test  */\n+      /* /path/to/test  */\n+      child_args[0] = argv[0];\n+      /* Extra argument for the child process.  */\n+      child_args[1] = (char *)\"target\";\n+    }\n+  else\n+    {\n+      /* Command looks like\n+\t /path/to/test -- /path/to/ld.so ...  */\n+      TEST_VERIFY_EXIT (argc > 5);\n+      TEST_COMPARE_STRING (argv[3], \"--library-path\");\n+      /* /path/to/ld-linux-aarch64.so.1  */\n+      child_args[0] = argv[2];\n+      /* --library-path  */\n+      child_args[1] = argv[3];\n+      /* Library path...  */\n+      child_args[2] = argv[4];\n+      /* /path/to/test  */\n+      child_args[3] = argv[5];\n+      /* Extra argument for the child process.  */\n+      child_args[4] = (char *)\"target\";\n+    }\n+\n+  printf (\"in parent: %u\\n\", getpid ());\n+  /* Spawn child process.  */\n+  execv (child_args[0], child_args);\n+  FAIL_EXIT1 (\"execv: %m\");\n+}\ndiff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-fork.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-fork.c\nnew file mode 100644\nindex 0000000000..365807a562\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-fork.c\n@@ -0,0 +1,75 @@\n+/* AArch64 test for GCS for creating child process using fork.\n+   Copyright (C) 2026 Free Software Foundation, Inc.\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library; if not, see\n+   <https://www.gnu.org/licenses/>.  */\n+\n+#include \"tst-gcs-helper.h\"\n+\n+#include <support/xunistd.h>\n+#include <sys/ptrace.h>\n+#include <sys/prctl.h>\n+#include <sys/wait.h>\n+#include <sys/uio.h>\n+#include <unistd.h>\n+#include <errno.h>\n+\n+static int\n+do_test (void)\n+{\n+  /* Check if GCS could possible by enabled.  */\n+  if (!(getauxval (AT_HWCAP) & HWCAP_GCS))\n+    FAIL_UNSUPPORTED (\"kernel or CPU does not support GCS\");\n+\n+  /* GCS should be enabled for this test at the start.  */\n+  TEST_VERIFY (__check_gcs_status ());\n+\n+  pid_t pid = xfork ();\n+  const char *name;\n+  if (pid == 0)\n+    name = \"child\";\n+  else\n+    name = \"parent\";\n+\n+  /* Both parent and child should initially have GCS enabled.  */\n+  TEST_VERIFY (__check_gcs_status ());\n+  uint64_t data;\n+  if (prctl (PR_GET_SHADOW_STACK_STATUS, &data, 0, 0, 0))\n+    FAIL_EXIT1 (\"prctl: %m\");\n+  printf (\"in %s: gcs status: %016lx\\n\", name, data);\n+\n+  if (pid)\n+    {\n+      int status;\n+      xwaitpid (pid, &status, 0);\n+      printf (\"in %s: child exited with code %u\\n\", name, WEXITSTATUS(status));\n+    }\n+  else\n+    {\n+      /* Try disabling GCS for the child\n+\t (should succeed because of the tunable).  */\n+      if (prctl (PR_SET_SHADOW_STACK_STATUS, 0, 0, 0, 0))\n+\tFAIL_EXIT1 (\"prctl: %m\");\n+      /* GCS should be disabled.  */\n+      TEST_VERIFY (!__check_gcs_status ());\n+      if (prctl (PR_GET_SHADOW_STACK_STATUS, &data, 0, 0, 0))\n+\tFAIL_EXIT1 (\"prctl: %m\");\n+      printf (\"in %s: gcs status: %016lx\\n\", name, data);\n+    }\n+\n+  return 0;\n+}\n+\n+#include <support/test-driver.c>\ndiff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-helper.h b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-helper.h\nindex 493f65b3cc..c075fdc205 100644\n--- a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-helper.h\n+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-helper.h\n@@ -26,6 +26,11 @@\n #include <stdio.h>\n #include <sys/auxv.h>\n \n+#ifndef PR_SET_SHADOW_STACK_STATUS\n+# define PR_GET_SHADOW_STACK_STATUS 74\n+# define PR_SET_SHADOW_STACK_STATUS 75\n+#endif\n+\n static bool\n __check_gcs_status (void)\n {\ndiff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-lock-ptrace.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-lock-ptrace.c\nnew file mode 100644\nindex 0000000000..9ca7b07eaf\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-lock-ptrace.c\n@@ -0,0 +1,166 @@\n+/* AArch64 test for GCS for creating child process using fork\n+   with ptrace to check locked GCS operations.\n+   Copyright (C) 2026 Free Software Foundation, Inc.\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library; if not, see\n+   <https://www.gnu.org/licenses/>.  */\n+\n+#include \"tst-gcs-helper.h\"\n+\n+#include <support/xunistd.h>\n+#include <support/xsignal.h>\n+#include <sys/ptrace.h>\n+#include <sys/prctl.h>\n+#include <sys/wait.h>\n+#include <sys/uio.h>\n+#include <unistd.h>\n+#include <string.h>\n+#include <errno.h>\n+\n+/* Uapi struct for PTRACE_GETREGSET with NT_ARM_GCS.  */\n+struct user_gcs\n+{\n+  uint64_t enabled;\n+  uint64_t locked;\n+  uint64_t gcspr_el0;\n+};\n+\n+static int\n+target (void)\n+{\n+  /* This signal is raised after the process has started\n+     and has been initialised so we can ptrace it at this\n+     point and obtain GCS locked features.  */\n+  xraise (SIGUSR1);\n+  return 0;\n+}\n+\n+static void\n+fork_target (char *args[], uint64_t aarch64_gcs)\n+{\n+  /* Currently kernel returns only lower 32 bits of locked\n+     features so we only compare them.  */\n+  bool lock_gcs = aarch64_gcs != 0 && aarch64_gcs != 2;\n+  uint64_t expected_locked = lock_gcs ? 0xfffffffful : 0ul;\n+  pid_t pid = xfork ();\n+  if (pid == 0)\n+    {\n+      char tunables[90];\n+      snprintf (tunables, sizeof (tunables), \"GLIBC_TUNABLES=\"\n+\t\t\"glibc.cpu.aarch64_gcs=0x%016lx\", aarch64_gcs);\n+      char *envp[] = { tunables, NULL };\n+      /* We need to ptrace child process to use PTRACE_GETREGSET\n+\t with NT_ARM_GCS after it has started.  */\n+      int res = ptrace (PTRACE_TRACEME, 0, NULL, NULL);\n+      if (res)\n+\tFAIL_EXIT1 (\"ptrace: %m\");\n+      execve (args[0], args, envp);\n+      FAIL_EXIT1 (\"execve: %m\");\n+    }\n+  bool checked = false;\n+  while (true)\n+    {\n+      int status;\n+      xwaitpid (pid, &status, 0);\n+      if (WIFSTOPPED (status))\n+\t{\n+\t  /* Child stopped by signal.  */\n+\t  int sig = WSTOPSIG (status);\n+\t  if (sig == SIGUSR1)\n+\t    {\n+\t      struct user_gcs ugcs = {};\n+\t      struct iovec io;\n+\t      io.iov_base = &ugcs;\n+\t      io.iov_len = sizeof (struct user_gcs);\n+\t      if (ptrace (PTRACE_GETREGSET, pid, NT_ARM_GCS, &io))\n+\t\tFAIL_EXIT1 (\"ptrace (PTRACE_GETREGSET): %m\");\n+\t      printf (\"expected vs locked: %016lx %016lx\\n\",\n+\t\t      expected_locked, ugcs.locked);\n+\t      if (lock_gcs)\n+\t\tTEST_VERIFY_EXIT (ugcs.enabled);\n+\t      TEST_VERIFY_EXIT (ugcs.locked == expected_locked);\n+\t      if (aarch64_gcs != 0)\n+\t\tTEST_VERIFY_EXIT ((void *) ugcs.gcspr_el0 != NULL);\n+\t      checked = true;\n+\t    }\n+        }\n+      else if (WIFSIGNALED (status))\n+\t{\n+\t  /* Child terminated by signal.  */\n+\t  break;\n+\t}\n+      else if (WIFEXITED (status))\n+\t{\n+          /* Child terminated by normally.  */\n+\t  break;\n+\t}\n+      ptrace (PTRACE_CONT, pid, 0, 0);\n+    }\n+  /* If child process hasn't run correctly, this will remain false.  */\n+  TEST_VERIFY_EXIT (checked);\n+}\n+\n+int main(int argc, char *argv[])\n+{\n+  /* Check if GCS could possible by enabled.  */\n+  if (!(getauxval (AT_HWCAP) & HWCAP_GCS))\n+    FAIL_UNSUPPORTED (\"kernel or CPU does not support GCS\");\n+\n+  /* GCS should be enabled for this test.  */\n+  TEST_VERIFY (__check_gcs_status ());\n+\n+  /* If last argument is 'target', we just run target code.  */\n+  if (strcmp (argv[argc - 1], \"target\") == 0)\n+    return target ();\n+\n+  /* In parent, we should at least have 3 arguments.  */\n+  if (argc < 3)\n+    FAIL_EXIT1 (\"wrong number of arguments: %d\", argc);\n+\n+  char *child_args[] = { NULL, NULL, NULL, NULL, NULL , NULL };\n+\n+  /* Check command line arguments to construct child command.  */\n+  if (strcmp (argv[0], argv[2]) == 0)\n+    {\n+      /* Command looks like\n+\t /path/to/test -- /path/to/test  */\n+      /* /path/to/test  */\n+      child_args[0] = argv[0];\n+      /* Extra argument for the child process.  */\n+      child_args[1] = (char *)\"target\";\n+    }\n+  else\n+    {\n+      /* Command looks like\n+\t /path/to/test -- /path/to/ld.so ...  */\n+      TEST_VERIFY_EXIT (argc > 5);\n+      TEST_COMPARE_STRING (argv[3], \"--library-path\");\n+      /* /path/to/ld-linux-aarch64.so.1  */\n+      child_args[0] = argv[2];\n+      /* --library-path  */\n+      child_args[1] = argv[3];\n+      /* Library path...  */\n+      child_args[2] = argv[4];\n+      /* /path/to/test  */\n+      child_args[3] = argv[5];\n+      /* Extra argument for the child process.  */\n+      child_args[4] = (char *)\"target\";\n+    }\n+\n+  /* Check all 4 values for the aarch64_gcs tunable.  */\n+  for (uint64_t aarch64_gcs = 0; aarch64_gcs < 4; aarch64_gcs++)\n+    fork_target (child_args, aarch64_gcs);\n+  return 0;\n+}\ndiff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-lock-static.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-lock-static.c\nnew file mode 100644\nindex 0000000000..b80e2f70e8\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-lock-static.c\n@@ -0,0 +1 @@\n+#include \"tst-gcs-lock.c\"\ndiff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-lock.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-lock.c\nnew file mode 100644\nindex 0000000000..9a17ef514d\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-lock.c\n@@ -0,0 +1,58 @@\n+/* AArch64 test for GCS locking.\n+   Copyright (C) 2026 Free Software Foundation, Inc.\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library; if not, see\n+   <https://www.gnu.org/licenses/>.  */\n+\n+#include \"tst-gcs-helper.h\"\n+\n+#include <linux/prctl.h>\n+#include <sys/prctl.h>\n+#include <errno.h>\n+\n+static int\n+do_test (void)\n+{\n+  /* Check if GCS could possible by enabled.  */\n+  if (!(getauxval (AT_HWCAP) & HWCAP_GCS))\n+    FAIL_UNSUPPORTED (\"kernel or CPU does not support GCS\");\n+\n+  TEST_VERIFY (__check_gcs_status ());\n+\n+  /* Try disabling GCS.  */\n+  int res = prctl (PR_SET_SHADOW_STACK_STATUS, 0, 0, 0, 0);\n+  if (res)\n+    {\n+      TEST_COMPARE (errno, EBUSY);\n+#ifdef GCS_SHOULD_UNLOCK\n+      FAIL_EXIT1 (\"GCS was not unlocked (was supposed to): %m\");\n+#else\n+      TEST_VERIFY (__check_gcs_status ());\n+#endif\n+    }\n+  else\n+    {\n+#ifdef GCS_SHOULD_UNLOCK\n+      TEST_VERIFY (!__check_gcs_status ());\n+      puts (\"GCS unlocked successfully\");\n+#else\n+      FAIL_EXIT1 (\"GCS was unlocked (was not supposed to)\");\n+#endif\n+    }\n+\n+  return 0;\n+}\n+\n+#include <support/test-driver.c>\ndiff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-unlock-static.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-unlock-static.c\nnew file mode 100644\nindex 0000000000..7e02820031\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-unlock-static.c\n@@ -0,0 +1,2 @@\n+#define GCS_SHOULD_UNLOCK\n+#include \"tst-gcs-lock.c\"\ndiff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-unlock.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-unlock.c\nnew file mode 100644\nindex 0000000000..7e02820031\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-unlock.c\n@@ -0,0 +1,2 @@\n+#define GCS_SHOULD_UNLOCK\n+#include \"tst-gcs-lock.c\"\n",
    "prefixes": [
        "v4",
        "2/2"
    ]
}