commit | 85ff4d291558f9e0c78809885924e273bfc2e2c7 | [log] [tgz] |
---|---|---|
author | David Vincze <david.vincze@arm.com> | Fri Sep 08 08:00:01 2023 +0200 |
committer | Manish V Badarkhe <Manish.Badarkhe@arm.com> | Tue Feb 13 15:03:01 2024 +0000 |
tree | 86d3a893d7ecc6636ecb525138e179ebd943576f | |
parent | c140f5fb26ae49f2464eb0975c79386d75185438 [diff] [blame] |
feat(rss): add defines for 'type' range and use them in psa_call() Update the 'type' parameter checking according to changes on RSS's (TF-M) side: 40b09ba1 [1] [1]: https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/commit/?id=40b09ba1e4a7a4f726f98700eab7e4e4d8e95dcf Change-Id: I8487e8ab24aa2dd080b5bb8f2f5c7e8fc15cf211 Signed-off-by: David Vincze <david.vincze@arm.com>
diff --git a/drivers/arm/rss/rss_comms.c b/drivers/arm/rss/rss_comms.c index a905b88..332105f 100644 --- a/drivers/arm/rss/rss_comms.c +++ b/drivers/arm/rss/rss_comms.c
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Arm Limited. All rights reserved. + * Copyright (c) 2022-2024, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -84,8 +84,8 @@ psa_status_t return_val; size_t idx; - if (type > INT16_MAX || type < INT16_MIN || in_len > PSA_MAX_IOVEC - || out_len > PSA_MAX_IOVEC) { + if (type > PSA_CALL_TYPE_MAX || type < PSA_CALL_TYPE_MIN || + in_len > PSA_MAX_IOVEC || out_len > PSA_MAX_IOVEC) { return PSA_ERROR_INVALID_ARGUMENT; }