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: <20240709170248.GA3803124-robh@kernel.org>
Date: Tue, 9 Jul 2024 11:02:48 -0600
From: Rob Herring <robh@...nel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, Marek Vasut <marex@...x.de>,
	Jonathan Cameron <jic23@...nel.org>,
	Sebastian Reichel <sebastian.reichel@...labora.com>
Subject: Re: [PATCH] dt-bindings: non-dt-devices: document ltr,ltrf216a used
 via ACPI PRP0001

On Tue, Jul 09, 2024 at 10:44:01AM +0200, Krzysztof Kozlowski wrote:
> There is a device in the wild with non-updatable firmware coming with
> ACPI tables with rejected "ltr,ltrf216a" compatible.  Linux kernel still
> supports this device via ACPI PRP0001, however the compatible was never
> accepted to bindings.  Lack of bindings causes checkpatch.pl warning
> about undocumented compatible.

Why do we care? For checkpatch.pl I really don't. That hack check I 
wrote makes any string in binding docs a documented compatible. I have a 
better check using the schema written, but that would make checkpatch 
dependent on dtschema tools. So maybe just time to drop this check from 
checkpatch as we have other ways to check and track this.

However, I do care about 'make dt_compatible_check'. Besides these ACPI 
cases, there's a bunch of cases that we'll never have schemas for. Like 
everything from Sparc... Old PowerMac stuff... So I would like to 
'document' them just to exclude from dt_compatible_check. So perhaps 
this should be generalized.

> 
> Add a schema for such ACPI PRP0001 devices purely to satisfy
> checkpatch.pl and document consensus: ltr,ltrf216a compatible is allowed
> only via ACPI PRP0001, but not bindings.
> 
> Link: https://lore.kernel.org/all/20240705095047.90558-1-marex@denx.de/
> Link: https://lore.kernel.org/lkml/20220731173446.7400bfa8@jic23-huawei/T/#me55be502302d70424a85368c2645c89f860b7b40
> Cc: Marek Vasut <marex@...x.de>
> Cc: Jonathan Cameron <jic23@...nel.org>
> Cc: Sebastian Reichel <sebastian.reichel@...labora.com>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
>  .../devicetree/bindings/non-dt-devices.yaml   | 35 +++++++++++++++++++
>  1 file changed, 35 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/non-dt-devices.yaml
> 
> diff --git a/Documentation/devicetree/bindings/non-dt-devices.yaml b/Documentation/devicetree/bindings/non-dt-devices.yaml
> new file mode 100644
> index 000000000000..206334693c7b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/non-dt-devices.yaml
> @@ -0,0 +1,35 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/non-dt-devices.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Non-devicetree Devices - Exception List
> +
> +maintainers:
> +  - Rob Herring <robh@...nel.org>
> +
> +description:
> +  Some devices using ACPI with non-updatable firmware/ACPI tables use
> +  incorrect Devicetree compatibles via ACPI PRP0001.  Developers want to
> +  support these devices, thus use such compatibles in Linux drivers, however
> +  usage of these within Devicetree sources was rejected.
> +
> +  Following list of devices is an incomplete schema with a goal to pass Linux
> +  kernel scripts/checkpatch.pl checks about undocumented compatibles but also
> +  reject any DTS file using such un-approved compatible.
> +
> +  Usage of any of following compatibles is not allowed in Devicetree sources,
> +  even if they come from immutable firmware.  New entries can be added
> +  only on the basis of non-updatable ACPI firmware on the device.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ltr,ltrf216a
> +
> +required:
> +  - compatible
> +  - broken-usage-of-incorrect-compatible

That's a neat trick...

> +
> +additionalProperties: false
> -- 
> 2.43.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ