lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0hcwgmddSN=0eM+PxTNuE1dm=iRLBbYWF7PFcB8H2ztDA@mail.gmail.com>
Date: Thu, 28 Aug 2025 21:34:14 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc: rafael@...nel.org, daniel.lezcano@...aro.org, lukasz.luba@....com, 
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests/thermel/intel/workload_hint: Mask unsupported types

On Thu, Aug 28, 2025 at 9:23 PM Srinivas Pandruvada
<srinivas.pandruvada@...ux.intel.com> wrote:
>
> The workload hint may contain some other hints which are not defined.
> So mask out unsupported types. Currently only lower 4 bits of workload
> type hints are defined.
>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
> ---
>  .../selftests/thermal/intel/workload_hint/workload_hint_test.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c b/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
> index ba58589a1145..3ee018bca899 100644
> --- a/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
> +++ b/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
> @@ -133,6 +133,7 @@ int main(int argc, char **argv)
>                 } else if (ret == 0) {
>                         printf("Poll Timeout\n");
>                 } else {
> +

Is this change intentional?  Looks like it is not needed.

>                         if ((lseek(fd, 0L, SEEK_SET)) < 0) {
>                                 fprintf(stderr, "Failed to set pointer to beginning\n");
>                                 exit(1);
> @@ -144,6 +145,8 @@ int main(int argc, char **argv)
>                         ret = sscanf(index_str, "%d", &index);
>                         if (ret < 0)
>                                 break;
> +
> +                       index &= 0x0f;
>                         if (index > WORKLOAD_TYPE_MAX_INDEX)
>                                 printf("Invalid workload type index\n");
>                         else
> --
> 2.50.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ