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] [day] [month] [year] [list]
Date:	Wed, 16 Apr 2014 13:25:54 -0700
From:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
To:	Thomas Pfaff <tpfaff@....com>
Cc:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
	"jslaby@...e.cz" <jslaby@...e.cz>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] serial_core: fix uart PORT_UNKNOWN handling

On Wed, Apr 09, 2014 at 05:06:24PM +0200, Thomas Pfaff wrote:
> 
> On Wed, 9 Apr 2014, One Thousand Gnomes wrote:
> 
> > On Wed, 9 Apr 2014 13:22:14 +0200
> > Thomas Pfaff <tpfaff@....com> wrote:
> > 
> > > 1. uart_change_pm ist called during uart_open and calls the uart pm function
> > >    without checking for PORT_UNKNOWN.
> > 
> > Removing this breaks other parts of the code assume that the port will be
> > powered up (notably setserial paths). So it makes sense that
> > uart_change_pm for a "none" port is a no-op but needs logic in the
> > setserial path to power up a port when we move none->known and power it
> > down on known->none
> > 
> 
> Then why not move uart_change_pm into uart_port_startup, where it will be called 
> when needed ?
> A reworked patch is below.
> 
> > > 2. uart_shutdown is called from uart_set_info and does not check it either.
> > 
> > I don't see why this one matters. We would have done
> > 
> > 	uart_startup
> > 		uart_port_startup
> > 			uport->type == PORT_UNKNOWN
> > 			return 1;
> > 		ASYNCB_INITIALIZED is not set
> > 
> > 	uart_shutdown
> > 		ASYNCB_INITIALISED is not set
> > 			Skip call to uart_port_shutdown
> > 
> > So that code looks correct to me.
> 
> I agree, i have overlooked this.
> 
> Signed-off-by: Thomas Pfaff <tpfaff@....com>

Can you resend this in a format that I can apply this in?

thanks,

greg k-h
--
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