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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 4 Mar 2022 00:57:21 +0000
From:   "Williams, Dan J" <dan.j.williams@...el.com>
To:     "hdegoede@...hat.com" <hdegoede@...hat.com>,
        "markgross@...nel.org" <markgross@...nel.org>,
        "Joseph, Jithu" <jithu.joseph@...el.com>
CC:     "corbet@....net" <corbet@....net>,
        "Raj, Ashok" <ashok.raj@...el.com>,
        "Luck, Tony" <tony.luck@...el.com>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "patches@...ts.linux.dev" <patches@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "Shankar, Ravi V" <ravi.v.shankar@...el.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "platform-driver-x86@...r.kernel.org" 
        <platform-driver-x86@...r.kernel.org>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
        "hpa@...or.com" <hpa@...or.com>, "bp@...en8.de" <bp@...en8.de>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "andriy.shevchenko@...ux.intel.com" 
        <andriy.shevchenko@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [RFC 09/10] platform/x86/intel/ifs: add ABI documentation for IFS

On Tue, 2022-03-01 at 11:54 -0800, Jithu Joseph wrote:
> Add the sysfs attributes in ABI/stable for In-Field Scan.
> 
> Originally-by: Kyung Min Park <kyung.min.park@...el.com>
> Signed-off-by: Jithu Joseph <jithu.joseph@...el.com>
> Reviewed-by: Ashok Raj <ashok.raj@...el.com>
> Reviewed-by: Tony Luck <tony.luck@...el.com>
> ---
>  Documentation/ABI/stable/sysfs-driver-ifs | 85 +++++++++++++++++++++++

If you end up keeping this functionality under /sys/device/system/cpu
then I think this documentation belongs in:

Documentation/ABI/testing/sysfs-devices-system-cpu

...otherwise, I think it is better off in:

Documentation/ABI/testing/sysfs-devices-platform-ifs


>  1 file changed, 85 insertions(+)
>  create mode 100644 Documentation/ABI/stable/sysfs-driver-ifs
> 
> diff --git a/Documentation/ABI/stable/sysfs-driver-ifs b/Documentation/ABI/stable/sysfs-driver-ifs
> new file mode 100644
> index 000000000000..8b6b9472f57e
> --- /dev/null
> +++ b/Documentation/ABI/stable/sysfs-driver-ifs
> @@ -0,0 +1,85 @@
> +What:          /sys/devices/system/cpu/ifs/run_test
> +Date:          Feb 28, 2022
> +KernelVersion: 5.18.0
> +Contact:       linux-kernel@...r.kernel.org
> +Description:   echo 1 to trigger ifs test for all online cores.

Somewhere in this file is would be good to reference back to the core
documentation, because if this is the first place somebody lands, this
description is not that useful.

> +
> +What:          /sys/devices/system/cpu/ifs/status
> +Date:          Feb 28, 2022
> +KernelVersion: 5.18.0
> +Contact:       linux-kernel@...r.kernel.org
> +Description:   Global status. Shows the most serious status across
> +               all cores (fail > untested > pass)

Rather than this lossy interface you might want to emit uevents on test
completion as a way to notify the results. That can add parameters to
an environment when calling a helper to process the event. See how NVME
takes advantage of this in nvme_aen_uevent() and nvme_class_uevent().

> +
> +What:          /sys/devices/system/cpu/ifs/image_version
> +Date:          Feb 28, 2022
> +KernelVersion: 5.18.0
> +Contact:       linux-kernel@...r.kernel.org
> +Description:   Version of loaded IFS binary image.
> +
> +What:          /sys/devices/system/cpu/ifs/reload
> +Date:          Feb 28, 2022
> +KernelVersion: 5.18.0
> +Contact:       linux-kernel@...r.kernel.org
> +Description:   echo 1 to reload IFS image.
> +
> +What:          /sys/devices/system/cpu/ifs/cpu_pass_list
> +Date:          Feb 28, 2022
> +KernelVersion: 5.18.0
> +Contact:       linux-kernel@...r.kernel.org
> +Description:   List of cpus which passed the IFS test.

Format of this field? Is it even necessary if the user tooling can just
capture the per-core uevents associated with a test run?

> +
> +What:          /sys/devices/system/cpu/ifs/cpu_fail_list
> +Date:          Feb 28, 2022
> +KernelVersion: 5.18.0
> +Contact:       linux-kernel@...r.kernel.org
> +Description:   List of cpus which failed the IFS test.
> +
> +What:          /sys/devices/system/cpu/ifs/cpu_untested_list
> +Date:          Feb 28, 2022
> +KernelVersion: 5.18.0
> +Contact:       linux-kernel@...r.kernel.org
> +Description:   List of cpus which could not be tested.
> +
> +What:          /sys/module/intel_ifs/parameters/noint
> +Date:          Feb 28, 2022
> +KernelVersion: 5.18.0
> +Contact:       linux-kernel@...r.kernel.org
> +Description:   SAF tunable parameter that user can modify before

"SAF" is never defined.

> +               the scan run if they wish to override default value.
> +
> +               When set, system interrupts are not allowed to interrupt an IFS. The
> +               default state for this parameter is set.

User implications of this setting? Like:

"Note: this setting may causes applications to miss latency / quality
of service deadlines, use with care."



> +
> +What:          /sys/module/intel_ifs/parameters/retry
> +Date:          Feb 28, 2022
> +KernelVersion: 5.18.0
> +Contact:       linux-kernel@...r.kernel.org
> +Description:   SAF tunable parameter that user can modify at
> +               load time if they wish to override default value.
> +
> +               Maximum retry counter when the test is not executed due to an
> +               event such as interrupt. The default value is 5, it can be set to any
> +               value from 1 to 20.

Just seems like this is something the test tool can trivially handle
itself to just retry the test if it wants upon a failure.

> +
> +What:          /sys/devices/system/cpu/cpu#/ifs/run_test
> +Date:          Feb 28, 2022
> +KernelVersion: 5.18.0
> +Contact:       linux-kernel@...r.kernel.org
> +Description:   IFS target core testing. echo 1 to trigger scan test on cpu#.

As mentioned on the last patch, if a CPU mask was an input parameter
then this would not need to be a per-CPU file.

> +
> +What:          /sys/devices/system/cpu/cpu#/ifs/status
> +Date:          Feb 28, 2022
> +KernelVersion: 5.18.0
> +Contact:       linux-kernel@...r.kernel.org
> +Description:   The status of IFS test on a specific cpu#. It can be one of "pass", "fail"
> +               or "untested".
> +
> +What:          /sys/devices/system/cpu/cpu#/ifs/details
> +Date:          Feb 28, 2022
> +KernelVersion: 5.18.0
> +Contact:       linux-kernel@...r.kernel.org
> +Description:   The details file reports the hex value of the SCAN_STATUS MSR. Note that
> +               the error_code field may contain driver defined software code not defined
> +               in the Intel SDM.

'status' and 'details' could be uevent output variables per cpu.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ