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 78D74C433FE for ; Tue, 8 Feb 2022 18:51:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=c6eW5vlUrCHQfLUUhVKSw2rPDjqkZh/6kTJ45zBYV/k=; b=pwKqffsCmgMTkdr4er3uW7eFyZ n72SYB1kLxrNENe7frm6gCsl9VgyFM1Vipwo2nV2P6rpCPu5EcQcAEBGZrOeajJ66BJ5elnYWrbyk 56ivNG/sW5urg8G/Q2CmBScbabGoYaNImVWV+FmbcR2utC+OWoV8Xs+YdgLyWrB0pQo5P1aY1Naa5 mItebI1bNy071mc4p7OLELrxYhIsZiSjqh9XEJrsO5+WFCSV8r/+AZD9E9HeGH5UeiaFe91UVkcCG zpiUu0Vap5KFL8bPh5xQ7gNBklLyC4cYX6wfMppNxFD+pMoMhGSi13p2JndNayhUvcCi+mMb6/WWC ex01ba+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHVZ1-00FGWs-S8; Tue, 08 Feb 2022 18:50:08 +0000 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHVYy-00FGVg-1A for linux-arm-kernel@lists.infradead.org; Tue, 08 Feb 2022 18:50:05 +0000 Received: by mail-io1-xd2c.google.com with SMTP id y84so324098iof.0 for ; Tue, 08 Feb 2022 10:50:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Up9s3VVyRq3gUPhujQummCRkFjt5TIPVI87trpcElzg=; b=BGKJpotKRvg9wbEaGyU52UDLSBHBOdnH0ozTUDjnP5Llw3UWs+GztkRlCP3t0AqK2W 00Tb2TU8KE6B5rASBMivmtLcxUCDUVv1S8Ct6p97DJlUNdW8L+aMDP8ycjq8tFuoiqZE bquMmHDbTIS4UEk9DDqMDwR+EEzOTfHX59l7I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Up9s3VVyRq3gUPhujQummCRkFjt5TIPVI87trpcElzg=; b=Y1cxTQ+h+iyixuuLyJhS20MYwJXvlSQGEGT+6QcLCw0jy1rjBaSBJTeQUhC4sEc5f+ ecvf8TcPy5+QszA6UOh5pgU9RlkIGOcXSd+isx3fvWIib3jbwlNGJ4OJoQ/+L+bZfJpj l+bsmXayVe32Nt6fvSwVqHbN99w3YQUFKJWVlEDeAVGYSIariZL8VlJJR07wiwfPAmYI AjMXHvQQkePe8GmjOO8i3Vej3hzABIMrZYzTlNawZzuifmk777G7NqE85rwSuIaINaOt PYNldJSqMfklKNw9llCUlGvt5r2VqsbqVMOk5DNJVXp9exl6k0LgRJWYJxOTVsuA0EUm HHiA== X-Gm-Message-State: AOAM530jIzFvZrumE3SlOnODJ3Xsp8CvANoVCWe6rNpbDyCBfHXS0Ie1 y3fjPzM6aJ/qNXy74Gve3n4Qfw== X-Google-Smtp-Source: ABdhPJwftdpUC+GK+1Mlp6jRp8pl74aOJ+aLuxMv4f6itmu9L1GMVyRPhLCD9Etj1CtWGgoqIV22sA== X-Received: by 2002:a05:6638:329a:: with SMTP id f26mr2675913jav.28.1644346202072; Tue, 08 Feb 2022 10:50:02 -0800 (PST) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id e17sm7625070ilm.67.2022.02.08.10.50.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Feb 2022 10:50:01 -0800 (PST) Subject: Re: [PATCH v11 40/40] kselftest/arm64: Add SME support to syscall ABI test To: Mark Brown Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Shuah Khan , Alan Hayward , Luis Machado , Salil Akerkar , Basant Kumar Dwivedi , Szabolcs Nagy , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Shuah Khan References: <20220207152109.197566-1-broonie@kernel.org> <20220207152109.197566-41-broonie@kernel.org> <676aa270-7801-9689-7c88-27368f32a532@linuxfoundation.org> From: Shuah Khan Message-ID: <5ab8ec1b-c978-3eed-9e32-3d99d7cba4e3@linuxfoundation.org> Date: Tue, 8 Feb 2022 11:50:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220208_105004_116598_9293D09E X-CRM114-Status: GOOD ( 28.95 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/8/22 11:15 AM, Mark Brown wrote: > On Mon, Feb 07, 2022 at 06:52:06PM -0700, Shuah Khan wrote: >> On 2/7/22 8:21 AM, Mark Brown wrote: > >>> +static int check_za(struct syscall_cfg *cfg, int sve_vl, int sme_vl, >>> + uint64_t svcr) >>> +{ >>> + size_t reg_size = sme_vl * sme_vl; > >> Is there possibilty of size_t overfolow here? > > No, if the size of a vector were anywhere near to being able to being > able to do that I think we'd have serious design issues with the ABI - > the size being calculated here is the size of a single register. The > current architectural maximum vector length is 2048 bits, which would > give a size of 64K for ZA if implemented. > >>> + if (memcmp(za_in, za_out, reg_size) != 0) { >>> + ksft_print_msg("SME VL %d ZA does not match\n", sme_vl); > >> Print the expected value in addition to the sme_val. > > This is not comparing the vector length, this is comparing the contents > of the ZA register which may be up to 64K in size. There are serious > presentational issues with displaying any errors in a useful fashion for > such a large register which IME needs custom display code adding by > whoever is debugging the issue that takes account of what the pattern > being observed is. > >>> @@ -265,8 +357,36 @@ static void test_one_syscall(struct syscall_cfg *cfg) >>> if (sve_vq != sve_vq_from_vl(sve_vl)) >>> sve_vq = sve_vq_from_vl(sve_vl); >>> - ksft_test_result(do_test(cfg, sve_vl), >>> + ksft_test_result(do_test(cfg, sve_vl, default_sme_vl, 0), >>> "%s SVE VL %d\n", cfg->name, sve_vl); > >> Print default_sme_vl as well. > > default_sme_vl is just being passed in as a dummy value here since the > function takes a fixed number of arguments, this is testing the case > where SME is not used or enabled and will be run on systems which do not > have SME at all so there won't be any defined vector length for SME. I > fear that it would cause confusion to display a SME VL here, and > do_test() won't actually pay any attention to that argument in this > case. We will individually step through all possible combinations of > SVE and SME vector lengths in separate tests. > Sounds good. thanks, -- Shuah _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel