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: <20090930141255.49b6caa0.akpm@linux-foundation.org>
Date:	Wed, 30 Sep 2009 14:12:55 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Stanislav Brabec <utx@...guin.cz>
Cc:	linux@....linux.org.uk, linux-kernel@...r.kernel.org,
	gregkh@...e.de, alan@...rguk.ukuu.org.uk
Subject: Re: [PATCH] serial-core: resume serial hardware with
 no_console_suspend

On Fri, 25 Sep 2009 11:55:47 +0200
Stanislav Brabec <utx@...guin.cz> wrote:

> Russell King - ARM Linux wrote:
> > On Thu, Sep 24, 2009 at 05:05:03PM -0700, Andrew Morton wrote:
> > > On Tue, 15 Sep 2009 15:38:58 +0200
> > > Stanislav Brabec <utx@...guin.cz> wrote:
> > > 
> > > > Hardware may need re-initialization to get serial port working after
> > > > resume. It does not happen with no_console_suspend. Attached patch
> > > > attempts to fix it.
> > > > 
> > > > The patch attempts to keep hardware running before suspend and run
> > > > hardware re-initialization after resume. Maybe simpler approach is
> > > > possible.
> > > 
> > > The patch doesn't apply any more and seems like a rather hacky thing to do.
> 
> Yes, but no_console_suspend itself is a bit hacky. You need to save
> console state but keep it running as long as possible afterwards and
> resume it after return from the sleep.
> 
> I was not sure, what exactly should be skipped and what must be run, so
> I experimented a bit.
> 
> Not calling hardware suspend/resume (current implementation) breaks
> serial port in hardware that need resume.
> 
> Calling of resume without suspend seems to be dangerous. Not calling
> suspend at all and standard initialization on resume would probably
> reset the port setting and maybe cause memory leak.
> 
> > > It appears that you have specific serial hardware which doesn't resume
> > > correctly?  If so, that's a bug, so how about we start with a bug
> > > report/description?
> 
> The hardware resumes correctly. But no_console_suspend breaks its
> resume.
> 
> > It's something that I did point out when the no_console_suspend patch
> > appeared, but I was overruled/ignored.
> > 
> > The problem is that on ARM hardware, there is no BIOS to re-initialize
> > hardware.  The kernel has to do restore the entire system hardware
> > state upon resume.  Unfortunately, no_console_suspend not only prevents
> > the console from being suspended but _also_ resumed.
> > 
> > The result of that is the console UART is left in a totally uninitialized
> > state.
> 
> Exactly, my ARM hardware is PXA270 on Zaurus SL-C3200.

hm, ho hum.

Could you please redo/retest/resend the patch against the current
kernel?  Someone went and renamed everything and it doesn't apply at
all any more.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ