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]
Date:   Wed, 1 Feb 2023 17:15:26 +0100
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Frieder Schrempf <frieder@...s.de>
Cc:     devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-rtc@...r.kernel.org,
        Frieder Schrempf <frieder.schrempf@...tron.de>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Shawn Guo <shawnguo@...nel.org>
Subject: Re: [PATCH 0/7] Enable backup switch mode on RTCs via devicetree

Hello,

You can't do that, this breaks an important use case and it is the
reason why I didn't use device tree in the beginning. What is wrong with
setting BSM from userspace? You will anyway have to set the time and
date from userspace for it to be saved.

On 01/02/2023 15:34:22+0100, Frieder Schrempf wrote:
> From: Frieder Schrempf <frieder.schrempf@...tron.de>
> 
> Some RTC devices like the RV3028 have BSM disabled as factory default.
> This makes the RTC quite useless if it is expected to preserve the
> time on hardware that has a battery-buffered supply for the RTC.
> 
> Let boards that have a buffered supply for the RTC force the BSM to the
> desired value via devicetree by setting the 'backup-switch-mode' property.
> 
> That way the RTC on the boards work as one would expect them to do without
> any per-board intervention through userspace tools to enable BSM.
> 
> Frieder Schrempf (7):
>   dt-bindings: rtc: Move RV3028 to separate binding file
>   dt-bindings: rtc: Add backup-switch-mode property
>   dt-bindings: rtc: microcrystal,rv3032: Add backup-switch-mode property
>   rtc: Move BSM defines to separate header for DT usage
>   rtc: class: Support setting backup switch mode from devicetree
>   arm64: dts: imx8mm-kontron: Remove useless trickle-diode-disable from
>     RTC node
>   arm64: dts: imx8mm-kontron: Enable backup switch mode for RTC on OSM-S
>     module
> 
>  .../bindings/rtc/microcrystal,rv3028.yaml     | 60 +++++++++++++++++++
>  .../devicetree/bindings/rtc/rtc.yaml          |  7 +++
>  .../devicetree/bindings/rtc/trivial-rtc.yaml  |  2 -
>  .../dts/freescale/imx8mm-kontron-osm-s.dtsi   |  3 +-
>  drivers/rtc/class.c                           | 14 +++++
>  include/dt-bindings/rtc/rtc.h                 | 11 ++++
>  include/uapi/linux/rtc.h                      |  6 +-
>  7 files changed, 95 insertions(+), 8 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml
>  create mode 100644 include/dt-bindings/rtc/rtc.h
> 
> -- 
> 2.39.1

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ