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-next>] [day] [month] [year] [list]
Message-Id: <20230530080425.18612-1-alexghiti@rivosinc.com>
Date:   Tue, 30 May 2023 10:04:24 +0200
From:   Alexandre Ghiti <alexghiti@...osinc.com>
To:     "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Pavel Machek <pavel@....cz>, linux-pm@...r.kernel.org,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        Atish Patra <atishp@...shpatra.org>,
        Anup Patel <anup@...infault.org>,
        Björn Töpel <bjorn@...osinc.com>,
        Conor Dooley <conor.dooley@...rochip.com>,
        linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org
Cc:     Alexandre Ghiti <alexghiti@...osinc.com>
Subject: [RFC PATCH 0/1] fdt: Mark "/reserved-memory" nodes as nosave if !reusable

In the RISC-V kernel, the firmware does not mark the region it uses as
"no-map" so that the kernel can avoid having holes in the linear mapping
and then use larger pages.

But with the recent support of hibernation on RISC-V, we noticed that
the hibernation process was trying to access those firmware regions
which are protected from *all* accesses (using PMP). So the hibernation
process fails.

We still don't have any "specification" regarding the naming of those
firmware regions, so we can't currently target those specific regions
(they are described as subnodes of "/reserved-memory").

I think we should actually mark all those "/reserved-memory" regions as
"nosave" since they should not be used by the kernel (see the
documentation pointed in the patch), hence the RFC since I may be
missing something here (legacy, other usage...etc).

Please let me know what you think!

Alexandre Ghiti (1):
  fdt: Mark "/reserved-memory" nodes as nosave if !reusable

 arch/riscv/kernel/setup.c |  2 +
 drivers/of/fdt.c          | 77 +++++++++++++++++++++++++++++++++++++++
 include/linux/of_fdt.h    |  1 +
 3 files changed, 80 insertions(+)

-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ