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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 14 Jan 2008 10:04:15 +0000
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	nigel@...el.suspend2.net
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>, Pavel Machek <pavel@....cz>,
	Linux Kernel List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH: 2/2] [SERIAL] avoid stalling suspend if serial port won't drain

On Mon, Jan 14, 2008 at 01:40:16PM +1100, nigel@...pend2.net wrote:
> Hi.
> 
> Alan Cox wrote:
> >>> Is printk() enough for 'we've just lost your data' condition? Maybe we
> >>> should abort suspend if we can't drain fifo?
> >> No way. Think about this from a users' perspective. No one wants suspend
> >> to ram or hibernate functionality that works sometimes and not others.
> >> They want it to work reliably so they don't have to worry about their
> >> laptop overheating while they're getting on the bus or airplane.
> >> Aborting isn't an option.
> > 
> > Dumb question on the printk however - what if the port that is sticking
> > is the console - don't we recurse and die ?
> 
> I don't know, but I'd argue that we shouldn't die. Things should be as
> robust as possible.

Of course we should never die.  That's precisely what I'm trying to work
towards here.

Currently without this patch, various platforms I have here do precisely
that - you ask them to suspend and they shut down the majority of devices
and then die.  The recovery is either system reboot or a power cycle -
especially when the port in question is connected to something other than
an external serial port (eg, a serial port for connection to a non-existent
bluetooth module.)

While we're talking about robustness, since the serial wakeup support has
gone in, another couple of issues have appeared:

1. We no longer suspend ports marked as wakeup sources.  That means we
   never place them into a low power state (which might be required by
   hardware) - we need a flag from the driver or something to indicate
   that.

2. As a direct consequence, we no longer re-initialise the port at resume
   time, resulting in a completely deconfigured but open port.  Such a
   port may be the system console, which will cause any printks may be
   damned slow and the output will be garbage.

(2) is quite a serious problem for ARM platforms - you lose the console
entirely and you also lose control of the system.  Again, recovery from
such events is by either a power cycle or system reboot.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
--
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