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: <CAAhSdy0_XqiB=1w3hnYkipPj1aF_D=z=MD2fKLxk6rb_iDdBow@mail.gmail.com>
Date:   Fri, 26 May 2023 20:47:46 +0530
From:   Anup Patel <anup@...infault.org>
To:     Alexandre Ghiti <alex@...ti.fr>
Cc:     Conor Dooley <conor@...nel.org>,
        Alexandre Ghiti <alexghiti@...osinc.com>,
        Björn Töpel <bjorn@...osinc.com>,
        Atish Patra <atishp@...shpatra.org>,
        Conor Dooley <conor.dooley@...rochip.com>,
        Anup Patel <apatel@...tanamicro.com>, robh@...nel.org,
        jeeheng.sia@...rfivetech.com, linux-kernel@...r.kernel.org,
        palmer@...osinc.com, leyfoon.tan@...rfivetech.com,
        mason.huo@...rfivetech.com, Guo Ren <guoren@...nel.org>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Song Shuai <suagrfillet@...il.com>,
        linux-riscv@...ts.infradead.org,
        Andrew Jones <ajones@...tanamicro.com>
Subject: Re: Bug report: kernel paniced when system hibernates

On Fri, May 26, 2023 at 8:42 PM Alexandre Ghiti <alex@...ti.fr> wrote:
>
>
> On 26/05/2023 16:59, Conor Dooley wrote:
> > On Fri, May 26, 2023 at 03:14:33PM +0200, Alexandre Ghiti wrote:
> >> Hi everyone,
> >>
> >> On Thu, May 25, 2023 at 11:24 PM Conor Dooley <conor@...nel.org> wrote:
> >>> On Thu, May 25, 2023 at 01:06:04PM -0700, Atish Patra wrote:
> >>>> On Thu, May 25, 2023 at 11:39 AM Conor Dooley <conor@...nel.org> wrote:
> >>>>> On Thu, May 25, 2023 at 11:37:40AM -0700, Atish Patra wrote:
> >>>>>
> >>>>>> Any testing of hibernation still needs to revert the patch until we
> >>>>>> have the proper fix.
> >>>>> "the patch" is what exactly? I assume you don't mean depending on
> >>>>> NONPORTABLE, since that is a Kconfig option.
> >>>> Nope. Sorry I meant the commit
> >>>>
> >>>> 3335068 ("riscv: Use PUD/P4D/PGD pages for the linear mapping")
> >>> Ah, if your SBI implementation is one of the affected ones, yeah.
> >>> If not, you can just set NONPORTABLE :)
> >> @Björn Töpel emitted the idea of excluding from the hibernation all
> >> the memory nodes in the "/reserved-memory" node
> >> (https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml):
> >> I have to admit that I don't see why it is not done by default by the
> >> kernel.
> > My understanding was that it was perfectly fine to use reserved memory
> > nodes to fence off some memory to use in device drivers etc, which then
> > may need to be saved/restored.
>
>
> Agreed, but I would say that it's up to the driver then to take care of
> that, see https://docs.kernel.org/driver-api/pm/notifiers.html

I agree, it should be drivers responsibility to save/restore the dedicated
reserved memory used by itself.

Although, I think we should at least save/restore reserved memory
regions having "reusable" property set.

Regards,
Anup

>
>
> >> Unless there is stuff in this node that needs to be "hibernated", I
> >> think that would be a very good solution since we would not rely on
> >> the name of the "internal" nodes of "/reserved-memory" (i.e.
> >> "mmode_resv").
> >>
> >> I'm digging into why it is not done by default, just wanted to have
> >> your feedback before the week-end :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ