Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp537779rdh; Wed, 14 Feb 2024 04:42:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWjlS/9VAZ8aauL+QJGoaTrB6lBbB5dZgW/Ojfp7tWxkl/HJCoUKH+J4VdhzByxNjTlD4f+2r2Kb8MtPsIurCZdkaT+56EKv7PAQYhBMg== X-Google-Smtp-Source: AGHT+IGHWu0wpgyPG2cueOPAflY3iUQULT7we/wJb0Wv4Od3KnPGnyck5fTz/hyoLu1mYNfetFRU X-Received: by 2002:a05:6808:2088:b0:3bf:e3ab:f5c8 with SMTP id s8-20020a056808208800b003bfe3abf5c8mr2400179oiw.44.1707914522395; Wed, 14 Feb 2024 04:42:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707914522; cv=pass; d=google.com; s=arc-20160816; b=IUm78AhPaFQ9xcEbg62aPgmbelwitSGGVas07digRfTj2NXynPVo7Fde+ejNf1EE3E yP1oqIGkMniYLf7ZhvpXMDpt3iCf+NE6KKk5hMDh+qTOb7Bvw2HdRnOoTBWTDy3jB7Mf yQnPehHUjDSSosiAR6YnBtOaS5RdErxwO0G9walGnTG4w6/B1nRDY2AKeYWOQVSHBoVz dqEQgNcrN3xRXKSKdqerbYEzU+304zxGjVJmOma9OxS7xb5E9xptAPTuWFKnAKmDcBa6 zNr4dsBjhDFuIzdWHyLyX/M99NnxID/tlzkzXkYk7mGv9N6qEjllPBav7zBCzb/T2/qu tSww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=cubOLyS8Uoy1YRtsHWtNJQ7olE/m7at3gcNjYKzhEzI=; fh=Xd6JWmyAk44IsqULWQ3Efoujtzc+ApeDZJpZg+4gpm0=; b=jyye1ISc7dvMmtdm6fzpmvIhUzNobSpBswZEwAZSZ2q6V8fHJOJkPkeDmHOBxoPyy2 n5B4TSpwuXsNTFDDsOXBTrEdsCf6gOwczfF4q28DMUuxZR1LAyI8A42RqY9VsPLlttHN +W019GVuYMKQlGjfjiJi3Ir4H53gitm7zZtJ3K7C7IZFDAfIqtvt5VkScDbj29jTfn6u tlWqt1NgenABGYlgMtL+0YJeq/DYxJLlh3FJqlWNfjy/T+jyhVagFfMyH4gChDwEeLxL TGA5nX8YYGIKoljEYyg6KMoq0tU8Js/alZD2kZrm+qgnQcLuXgI/yJMVp/CkvrNUXrJK EuuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tum.de header.s=tu-postout21 header.b=jCkm6hBA; arc=pass (i=1 spf=pass spfdomain=tum.de dkim=pass dkdomain=tum.de dmarc=pass fromdomain=tum.de); spf=pass (google.com: domain of linux-kernel+bounces-65207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65207-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tum.de X-Forwarded-Encrypted: i=2; AJvYcCV8sZN40Yi2JJtGgAffPv3duCrGAsynU9PtraV9KJMQ8bkzMWUvz26W7hbxLopct16uONn1on8XmHfxS7LKOt+1EnueMuwrQOtJ3gLHEw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v22-20020ac85796000000b0042c06c69168si5679661qta.622.2024.02.14.04.42.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 04:42:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tum.de header.s=tu-postout21 header.b=jCkm6hBA; arc=pass (i=1 spf=pass spfdomain=tum.de dkim=pass dkdomain=tum.de dmarc=pass fromdomain=tum.de); spf=pass (google.com: domain of linux-kernel+bounces-65207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65207-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tum.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 29B571C21490 for ; Wed, 14 Feb 2024 12:42:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 10FFB524DF; Wed, 14 Feb 2024 12:41:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tum.de header.i=@tum.de header.b="jCkm6hBA" Received: from postout2.mail.lrz.de (postout2.mail.lrz.de [129.187.255.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA0BD22626; Wed, 14 Feb 2024 12:41:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=129.187.255.138 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707914515; cv=none; b=EB4fT8dWtBcFCQq0rE2IpwulrcBlCAVZQib9JhRCVORlbycp6MsYFznlApvvVLSyAkiVRRxbmyUcu9kMiLT02gj7YH40koTRrKX7V3SFQzQGRIeprdxjJ31Sne08VOKMK5nVbOUhqAG/Mhyf03Jx/Vjt3CLRat7i/0gHuYUowf4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707914515; c=relaxed/simple; bh=+EUUACJwNj0bXAgQ+8GQThIgivD8jBsEM0i2kqiLRwY=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=l+qDiNajiaMVY37ftQj5F5MrRJmIsK+IraIF36ruIKKRaBdCygNs9bb0bsHOuiEiTjz4nmTB39Y3BufMj66ItJmhE+ivrjjQ45cCjs9/R5LGvanm3wUbNAH4Q2no4qNSqGM460gc4yTlabW19OzEUoE//qWEy//h7sz/UtR0Etk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=tum.de; spf=pass smtp.mailfrom=tum.de; dkim=pass (2048-bit key) header.d=tum.de header.i=@tum.de header.b=jCkm6hBA; arc=none smtp.client-ip=129.187.255.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=tum.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tum.de Received: from lxmhs52.srv.lrz.de (localhost [127.0.0.1]) by postout2.mail.lrz.de (Postfix) with ESMTP id 4TZd9b6ncSzyQl; Wed, 14 Feb 2024 13:41:39 +0100 (CET) Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=tum.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h= content-transfer-encoding:content-type:content-type:mime-version :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=tu-postout21; t=1707914499; bh=+EUUACJwNj0 bXAgQ+8GQThIgivD8jBsEM0i2kqiLRwY=; b=jCkm6hBAGikTb7WTBbUgWqzy6+n MsU6lh8LMf1BCN9aH1xVbcH/sFPSBiQop0SsmjtM5kaa2KtqVuTdQzaH7+UKcBti UYgXAEs4yn6t7PtVqE2DyL3Hgeb95O9WASOIqeH2sCluXDjHGV8cZcFS0OtaYEfR 1QuI+8UfinrKRCbac2fhqtE98tV5zC7cfRETITUmcBNzMAybCcT5jpH+I7Ayh1y9 igQsXtpwQh8aZtD2t8f+HkIyROc7yn9VCgnG+2pxhSxBJ76t4Kj15khxwPxVcS5q fzBll2eylnTAsjnBgn/r5Hy0qk1jkQARZ0Ngh0PqocArdBiY0+/v+KRAVjA== X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs52.srv.lrz.de X-Spam-Flag: NO X-Spam-Score: -2.885 X-Spam-Level: Received: from postout2.mail.lrz.de ([127.0.0.1]) by lxmhs52.srv.lrz.de (lxmhs52.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id RoFk6-aGmlmz; Wed, 14 Feb 2024 13:41:39 +0100 (CET) Received: from sienna.fritz.box (ppp-93-104-85-184.dynamic.mnet-online.de [93.104.85.184]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by postout2.mail.lrz.de (Postfix) with ESMTPSA id 4TZd9Z5vmmzyRs; Wed, 14 Feb 2024 13:41:38 +0100 (CET) From: =?UTF-8?q?Paul=20Heidekr=C3=BCger?= To: Brendan Higgins , David Gow , Mark Brown , Shuah Khan , =?UTF-8?q?Paul=20Heidekr=C3=BCger?= , linux-kselftest@vger.kernel.org (open list:KERNEL UNIT TESTING FRAMEWORK (KUnit)), kunit-dev@googlegroups.com (open list:KERNEL UNIT TESTING FRAMEWORK (KUnit)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH RFC] kunit: tool: add 'mte=on' qemu arg on arm64 Date: Wed, 14 Feb 2024 12:41:30 +0000 Message-Id: <20240214124131.990872-1-paul.heidekrueger@tum.de> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi! I was running some KASan tests with kunit.py recently and noticed that when KASan is run in hw tags mode, we manually have to add the required `mte=on` option to kunit_tool's qemu invocation, as the tests will otherwise crash. To make life easier, I was looking into ways for kunit.py to recognise when MTE support was required and set the option automatically. All solutions I could come up with for having kunit_tool conditionally pass `mte=on` to qemu, either entailed duplicate code or required parsing of kernel's config file again. I was working under the assumption that only after configuring the kernel we would know whether the 'mte=on' option was necessary, as CONFIG_ARM64_MTE is not visible before. Only afterwads did I realise that the qemu arm64 config that kunit_tool falls back on, uses the `virt` machine, which supports MTE in any case. So, could it be as easy as just adding the `mte=on` option to kunit_tool's arm64 config? Would this be a welcome addition? What do you think? Many thanks, Paul Signed-off-by: Paul Heidekrüger --- tools/testing/kunit/qemu_configs/arm64.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/kunit/qemu_configs/arm64.py b/tools/testing/kunit/qemu_configs/arm64.py index d3ff27024755..a525f7e1093b 100644 --- a/tools/testing/kunit/qemu_configs/arm64.py +++ b/tools/testing/kunit/qemu_configs/arm64.py @@ -9,4 +9,4 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y''', qemu_arch='aarch64', kernel_path='arch/arm64/boot/Image.gz', kernel_command_line='console=ttyAMA0', - extra_qemu_params=['-machine', 'virt', '-cpu', 'max,pauth-impdef=on']) + extra_qemu_params=['-machine', 'virt,mte=on', '-cpu', 'max,pauth-impdef=on']) -- 2.40.1