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:   Fri, 8 Mar 2019 10:13:58 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Tom Li <tomli@...li.me>
Cc:     Jani Nikula <jani.nikula@...ux.intel.com>,
        Linux Fbdev development list <linux-fbdev@...r.kernel.org>,
        DRI Development <dri-devel@...ts.freedesktop.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Sudip Mukherjee <sudipm.mukherjee@...il.com>,
        Teddy Wang <teddy.wang@...iconmotion.com>
Subject: Re: Is it possible to reset graphics controller on reboot in a
 framebuffer driver?

Hi Tom,

On Thu, Mar 7, 2019 at 10:38 PM Tom Li <tomli@...li.me> wrote:
> On Thu, Mar 07, 2019 at 10:39:23AM +0100, Geert Uytterhoeven wrote:
> > On Thu, Mar 7, 2019 at 10:00 AM Jani Nikula <jani.nikula@...ux.intel.com> wrote:
> > > It's possible to do this using a reboot notifier. I am not sure if there
> > > are better ways to achieve the same, but there's at least one example of
> > > using reboot notifiers to achieve the exact same goal.
> > >
> > > See drivers/video/fbdev/aty/atyfb_base.c, look for
> > > register_reboot_notifier().
> >
> > Or a shutdown handler, which is more device-centric?
> > (cfr. "[3/4] fbdev: atafb: Fix broken frame buffer after kexec",
> >  https://patchwork.kernel.org/patch/10814381/).
> >
> > Gr{oetje,eeting}s,
>
> Thanks, I knew reboot_notifier but I thought it feels "hacky" to use it in a
> device driver, shutdown() handler looks better.
>
> Nevertheless, does it mean there's no way to prevent it from happening if the
> user issues a emergency reboot? Like an automatic reboot after a kernel panic,
> or a SysRq-B reboot.

If Linux performs a reboot, it calls the shutdown handlers.
I think that includes reboot on panic, or SysRq-B, but I'd have to check to
be 100% sure.

If the kernel just crashes, of course all of that doesn't happen.
Is your graphics card reset when the reset button is pressed, or only on
cold power on?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ