[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9a81979b-2b9d-4bf6-88a0-5803483f802c@sirena.org.uk>
Date: Wed, 11 Jun 2025 13:25:23 +0100
From: Mark Brown <broonie@...nel.org>
To: Yeoreum Yun <yeoreum.yun@....com>
Cc: catalin.marinas@....com, pcc@...gle.com, will@...nel.org,
anshuman.khandual@....com, joey.gouly@....com,
yury.khrustalev@....com, maz@...nel.org, oliver.upton@...ux.dev,
frederic@...nel.org, akpm@...ux-foundation.org, surenb@...gle.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH v6 9/9] kselftest/arm64/mte: add mtefar tests on
check_mmap_options
On Wed, Jun 11, 2025 at 10:41:07AM +0100, Yeoreum Yun wrote:
> +static int check_anonymous_memory_mapping(int mem_type, int mode, int mapping, int tag_check, int atag_check)
> {
> char *ptr, *map_ptr;
> int run, result, map_size;
> @@ -97,16 +106,16 @@ static int check_anonymous_memory_mapping(int mem_type, int mode, int mapping, i
> munmap((void *)map_ptr, map_size);
> return KSFT_FAIL;
> }
> - result = check_mte_memory(ptr, sizes[run], mode, tag_check);
> + result = check_mte_memory(ptr, sizes[run], mode, tag_check, atag_check);
> mte_clear_tags((void *)ptr, sizes[run]);
> mte_free_memory((void *)map_ptr, map_size, mem_type, false);
> - if (result == KSFT_FAIL)
> - return KSFT_FAIL;
> + if (result != KSFT_SKIP)
> + return result;
> }
This changes the logic to exit the loop immediately if the check passes
which doesn't seem like what we want, should we instead change the test
to be:
if (result != KSFT_PASS)
which I think is more the intent?
> + result = check_mte_memory(ptr, sizes[run], mode, TAG_CHECK_ON, atag_check);
> mte_free_memory_tag_range((void *)ptr, sizes[run], mem_type, UNDERFLOW, OVERFLOW);
> if (result != KSFT_PASS)
> return KSFT_FAIL;
> @@ -192,7 +201,7 @@ static int check_clear_prot_mte_flag(int mem_type, int mode, int mapping)
> close(fd);
> return KSFT_FAIL;
> }
Won't this upgrade any skips to fails?
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists