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]
Message-ID: <Pine.LNX.4.64.0902042200340.25136@anakin>
Date:	Wed, 4 Feb 2009 22:00:58 +0100 (CET)
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Lennart Sorensen <lsorense@...lub.uwaterloo.ca>
cc:	Linux Kernel Development <linux-kernel@...r.kernel.org>,
	linux-m68k@...r.kernel.org, uClinux list <uclinux-dev@...inux.org>
Subject: Re: Fix support for console port other than ttyS0 on mcf.c

On Wed, 4 Feb 2009, Lennart Sorensen wrote:
> Perhaps CCing linux-m68k@...ts.linux-m68k.org would be a good idea.

Thanks, but this is a uClinux driver.

> On Wed, Feb 04, 2009 at 03:15:18PM -0500, Lennart Sorensen wrote:
> > Due to a case of backwards logic, mfc.c always makes the console port be
> > ttyS0 even when you ask for another port.
> > 
> > This patch fixes this issue.
> > 
> > Only when the requested port is NOT in the range 0 to MAXPORTS-1 do we
> > force it to be treated as if port 0 was requested.  Forcing the port to
> > 0 when it is in fact in the range 0 to MAXPORTS is not helpful.
> > 
> > Tested with working console on ttyS2 on a 5271evb.
> > 
> > Signed-off-by: Len Sorensen <lsorense@...lub.uwaterloo.ca>
> > 
> > diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c
> > index 56841fe..0eefb07 100644
> > --- a/drivers/serial/mcf.c
> > +++ b/drivers/serial/mcf.c
> > @@ -513,7 +513,7 @@ static int __init mcf_console_setup(struct console *co, char *options)
> >         int parity = 'n';
> >         int flow = 'n';
> > 
> > -       if ((co->index >= 0) && (co->index <= MCF_MAXPORTS))
> > +       if ((co->index < 0) || (co->index >= MCF_MAXPORTS))
> >                 co->index = 0;
> >         port = &mcf_ports[co->index].port;
> >         if (port->membase == 0)

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
--
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