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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21245C47DD9 for ; Fri, 23 Feb 2024 02:25:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7BD256B00AB; Thu, 22 Feb 2024 21:25:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 76D0F6B00AC; Thu, 22 Feb 2024 21:25:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 60D7F6B00CE; Thu, 22 Feb 2024 21:25:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 50BAD6B00AB for ; Thu, 22 Feb 2024 21:25:06 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id EC347140FE8 for ; Fri, 23 Feb 2024 02:25:05 +0000 (UTC) X-FDA: 81821476170.14.1E35578 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by imf27.hostedemail.com (Postfix) with ESMTP id 00C3B40020 for ; Fri, 23 Feb 2024 02:25:03 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=WZ3cz7mo; spf=pass (imf27.hostedemail.com: domain of thiago.bauermann@linaro.org designates 209.85.215.174 as permitted sender) smtp.mailfrom=thiago.bauermann@linaro.org; dmarc=pass (policy=none) header.from=linaro.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708655104; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yvpsMbjqPU4UR9+5wWiHmUmCTwM1PMtLjxdFJ8jAgDo=; b=jnEBdSDI5oWG8fzIDaG3XJ910F06IM+u8e5F3jD5CP7L9lkQAtU2/TtauI6+ks7XhF4JcB nKHB6MFnOYOsE6YuUcMjwGKKuB4q/t9U/6j+Tv7kLktiNgO9wEwrJTdbMK+wulPBMuLewk 5ZuXYeDj3wW2S6YbTlUdBik8xqlFEPw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708655104; a=rsa-sha256; cv=none; b=nCwJFiYDFgDrsIICeQTsaw1REymb+Szg2Egd30z2sJMTwCqqI60s33ChimX+anaXhHy1eE VGiREBKSuxnKZt+MEfzlmyHKn2u7nznmb97twqdE0nFSd7da+G7Uns3pp+NAJCQoLDj06C N3TuD5dZ8Q2CrCm84rwLSACZdTBnzjw= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=WZ3cz7mo; spf=pass (imf27.hostedemail.com: domain of thiago.bauermann@linaro.org designates 209.85.215.174 as permitted sender) smtp.mailfrom=thiago.bauermann@linaro.org; dmarc=pass (policy=none) header.from=linaro.org Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-5dbcfa0eb5dso270399a12.3 for ; Thu, 22 Feb 2024 18:25:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708655103; x=1709259903; darn=kvack.org; h=content-transfer-encoding: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=yvpsMbjqPU4UR9+5wWiHmUmCTwM1PMtLjxdFJ8jAgDo=; b=WZ3cz7moP3ruowqKwGtLYi8SiKVPx/KV80IYt65O25w2P1xq0R2wlKcqIIn8W3DZKR dK7txLREGvE4Ho6heSCaoGiLbTp3zcdFk7slOPX9TQSFkbSd2BuAJWRzQNzL8Tyha5+3 TggdM64G30jP6vtnzljr72bPTXHXXUH3m5AoVQ+39m3ikEDY9WX5hiV1l2QXR4W0XWQ0 zJ+0iAK4bD7hFxpF2W7fGkptemrmivhSrXMQWPGJztWzgehQoSlpgvcgYTrJPwGJ2wvH 4TKi8sucRSJwgnmJ3SmnEbKH3lo09+XvoJzY/GYeTNQjhfYYQrJLY5kXpRzEi8McZHvb OyXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708655103; x=1709259903; h=content-transfer-encoding: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=yvpsMbjqPU4UR9+5wWiHmUmCTwM1PMtLjxdFJ8jAgDo=; b=cu4gjHvB3vsiq1kGFfJrMFgh7KSz29Gev3tlZe7+C0pyPdR934KVZ4RpugAuVDThn7 9LHKSw+TqZiEiAC/qCwe/3KTv1SbpQdco9giGgCmZxv4K6DS8Dan8l1FqBlZ60yzNWRD c2+6x/95yjP8hn0Vzoh98tGfUbk0jOPejGsnzcyqNmBpKW2ykQ3/l0r5VXUgkiZ/ogZ/ Q03CpJzgpc8lTO28y+vKFpT6cUnHTJo5+GLwHXCck5xe7L4gMUsFKRL1NYyDk1fmH/TR eE9et+NGfdmyQPQKDysA6Zt16aXDfC7XQrdHU91PSfmtaDk05gyVAvoXwNgWXTSG9WUi m3fw== X-Forwarded-Encrypted: i=1; AJvYcCWBmmJEQ6H2ePeoWqV7XZzjWp4VuTEIuhVz/n4K3/6D6LD9u9ZrdXV/hIycxYpSTINzf+F+nyhPAizaT4n7mmU2yAg= X-Gm-Message-State: AOJu0YwKHCuHXSZKUFKmgEkRg+IzAyj7E8b1c2E+s0ZtKfGlOTRaDZLl LZWT6n5PWXTplvQ92cEvL0+4arFjTY7ZWJTr9SvsDUErunPSjrv2MKxF00EIO8g= X-Google-Smtp-Source: AGHT+IGXzUvLuIBqAH6IpfTDaGkH8Ve8NCjMdXcR7MwfrFmhzj20/am5IT7QTj11UMAitUQcB9a5gw== X-Received: by 2002:a05:6a20:e607:b0:19e:a353:81b0 with SMTP id my7-20020a056a20e60700b0019ea35381b0mr734946pzb.11.1708655102714; Thu, 22 Feb 2024 18:25:02 -0800 (PST) Received: from localhost ([2804:14d:7e39:8470:902e:6d00:6c11:e63b]) by smtp.gmail.com with ESMTPSA id mf8-20020a170902fc8800b001d9fc6cb5f2sm10645873plb.203.2024.02.22.18.25.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 18:25:02 -0800 (PST) References: <20240203-arm64-gcs-v8-0-c9fec77673ef@kernel.org> <20240203-arm64-gcs-v8-33-c9fec77673ef@kernel.org> <87sf1n7uea.fsf@linaro.org> <9b899b4e-7410-4c3b-967b-7794dac742e4@sirena.org.uk> User-agent: mu4e 1.10.8; emacs 29.1 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 , Kees Cook , Shuah Khan , "Rick P. Edgecombe" , Deepak Gupta , Ard Biesheuvel , Szabolcs Nagy , "H.J. Lu" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Florian Weimer , Christian Brauner , 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 v8 33/38] kselftest/arm64: Add a GCS test program built with the system libc In-reply-to: <9b899b4e-7410-4c3b-967b-7794dac742e4@sirena.org.uk> Date: Thu, 22 Feb 2024 23:24:59 -0300 Message-ID: <87ttlzsyro.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 00C3B40020 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 66t5cmbkp1yiyph1zj5bh3mu73tau571 X-HE-Tag: 1708655103-563362 X-HE-Meta: U2FsdGVkX182Kko6QYvwEQJOKrWphvBCMYuLskfaa6BnytIYqxsNPXHhEI+BrfmDLSjf5DBe2TggjVCrhRpNvhu9jp8YxzfNEHi99G5Ho9KNcxr1YOdck5EK0E/zLTfoDrZl0XbxBKpE6hNq05I5D1cRKmNLJF2glIJ1jySUVH6imN7kIBjefUeSj7NDKwVnvpPY0ShLyglNIjIpD4ErvkciBvBkkVBbx7tRuw0TyssbmQ9xO8un3e6U3TjGXr2r88pKZwuBSCKwk6l3rihdlZH24PXbEokzq2us+yBEGOya4BKNLI3z0h/BxvEUS2HBEpHPNcWYGvwC3fiVesXmB24kMwW2OJdv/N3ciAs54Q0az01paBuhX3rx0NeCZxyf/cyti7y9dzz2APEP+v7ALAoHSBUomdwiL5Vv5ahTQ0+Nz2vqN4UAT7fjdudVeMoxPRpPapuYKi8RUc8IcVty7/zqTRwl86CeXliCwhwgY2UlBEiwvwOD73W0W24OqzCKoR/rjKHIiRw0keYWjeHbS54bSe7YO5E7BNZyzVjEF9UkPhpSG+g3tZRUdmntTbe1cedom1A2DIes8GtzOYmGBNuZcaMisBnE3+RLyC8/R8CfXejJXttfbTXtQWXkZ3jemuH/NVXzAx6zSNyaysRBWU881vlcC6QnAeFsaFqZ8zHf7/cLct19dyngfzfhUhtAZBH8Vpn36PmX3gQFz4Wkw4FkPSZB+Y4gbFOW4qG8FqEi04k54kLZ9zM4IGP5aLG4WgO6cmNBlBtGObW0CV7jXLeB1U5084jnvgVg5tLysyUW2YnK+Mahyc12uKRA3bu0MeDYVvO9JErT5/9rcj2609FwosXTKMRjnAXIt2epOJ7rRJI4oLOK9O5rFZ5RsDzRDlB3MQt/HOKpXWyI9EFYGXkJcWeI1dWkhlqvdAokOvhIpFhkFhvyXbbZ42ib2lw7CM+VkaUqsBY9f48ZFkl DTeI2iph WOToYq8LH3FZPCZrN5sncXfGIjctkX6qhAuI4OgCp8eX4pFIFICxbFqZJg0K7xXYxCdd/+Fky+e80qG9QIXCZxnhqy4TCG+HHXzP9VAPPU4fihGAG5W1l8spyEjcR1k2VZfi9D63cSWmfkTytzQX9Wo8Rrg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Mark Brown writes: > On Mon, Feb 19, 2024 at 11:15:57PM -0300, Thiago Jung Bauermann wrote: > >> The only issue as can be seen above is that the can_call_function test >> is failing. The child is getting a GCS Segmentation fault when returning >> from fork(). > >> I tried debugging it with GDB, but I don't see what's wrong since the >> address in LR matches the first entry in GCSPR. Here is the >> debug session: > > I believe based on prior discussions that you're running this using > shrinkwrap - can you confirm exactly how please, including things like > which firmware configuration you're using? I'm using current git with > > shrinkwrap run \ > --rtvar KERNEL=3Darch/arm64/boot/Image \ > --rtvar ROOTFS=3D${ROOTFS} \ > --rtvar CMDLINE=3D"${CMDLINE}" \ > --overlay=3Darch/v9.4.yaml ns-edk2.yaml > > and a locally built yocto and everything seems perfectly happy. Yes, this is how I'm running it: CMDLINE=3D"Image dtb=3Dfdt.dtb console=3DttyAMA0 earlycon=3Dpl011,0x1c090= 000 root=3D/dev/vda2 ip=3Ddhcp maxcpus=3D1" shrinkwrap run \ --rtvar=3DKERNEL=3DImage-gcs-v8-v6.7-rc4-14743-ga551a7d7af93 \ --rtvar=3DROOTFS=3D$HOME/VMs/ubuntu-aarch64.img \ --rtvar=3DCMDLINE=3D"$CMDLINE" \ ns-edk2.yaml I ran the following to set up the FVP VM: $ shrinkwrap build --overlay=3Darch/v9.4.yaml ns-edk2.yaml My rootfs is Ubuntu 22.04.3. In case it's useful, my kernel config is here: https://people.linaro.org/~thiago.bauermann/gcs/config-v6.8.0-rc2 I tried removing "maxcpus=3D1" from the kernel command line, but it made no difference. I also tried resetting my Shrinkwrap setup and starting from scratch, but it also made no difference: I just pulled from the current main branch and removed Shrinkwrap's build and package directories, and also removed all Docker images and the one container I had. Here are some firmware versions from early boot: NOTICE: Booting Trusted Firmware NOTICE: BL1: v2.10.0 (release):v2.10.0 NOTICE: BL1: Built : 00:07:29, Feb 23 2024 =E2=8B=AE NOTICE: BL2: v2.10.0 (release):v2.10.0 NOTICE: BL2: Built : 00:07:29, Feb 23 2024 =E2=8B=AE NOTICE: BL31: v2.10.0 (release):v2.10.0 NOTICE: BL31: Built : 00:07:29, Feb 23 2024 =E2=8B=AE [ edk2 ] UEFI firmware (version built at 00:06:55 on Feb 23 2024) Press ESCAPE for boot options ...........UEFI Interactive Shell v2.2 EDK II UEFI v2.70 (EDK II, 0x00010000) It looks like our main differences are the kernel config and the distro. --=20 Thiago