Bug 438316 - Various bugs in check_console.c
Various bugs in check_console.c
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-20 07:20 EDT by David Woodhouse
Modified: 2014-03-16 23:13 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-20 10:47:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch (1.41 KB, patch)
2008-03-20 07:20 EDT, David Woodhouse
no flags Details | Diff

  None (edit)
Description David Woodhouse 2008-03-20 07:20:29 EDT
We don't use O_NONBLOCK when opening the serial port to check termios.

We don't zero the serial_structs in check_serial_console(), which we should
because the structs have padding in them, which the kernel won't touch during
the TIOCGSERIAL ioctl -- and which might then cause a compare failure.

We assume <"ttyS%d",si.line> and ignore the si.type field.

The attached patch addresses all three. It's not massively pretty having to have
a hardcoded list of si.type -> "ttyXXX" strings, but it's not really any worse
than just hard-coding ttyS%d. We should fix the kernel to expose this properly.
(cf. http://lkml.org/lkml/2008/2/27/213)
Comment 1 David Woodhouse 2008-03-20 07:20:29 EDT
Created attachment 298683 [details]
patch
Comment 2 David Woodhouse 2008-03-20 07:24:51 EDT
We have a list of 'other' console types in 10-console.rules. Each of these
should probably be filed as a kernel bug, for the kernel to support TIOCGSERIAL
on those ports with an appropriate si.type and si.line. That includes ttySG*,
which currently (ab)uses PORT_16550A afaict. 
Comment 3 Bill Nottingham 2008-03-20 10:47:35 EDT
The 'other' types aren't necessarily /dev/console, though; they are 'other
console-like devices'.

http://git.fedorahosted.org/git/?p=initscripts.git;a=commit;h=f892674d525dde82da15ff1beb38e8e1e448e1d1
and
http://git.fedorahosted.org/git/?p=initscripts.git;a=commit;h=1b13b011cf799297fbd42e0378ec6f8cd99d5644

Will show up in rawhide post-beta.
Comment 4 David Woodhouse 2008-03-26 19:20:38 EDT
Doesn't seem to be there yet...

Note You need to log in before you can comment on or make changes to this bug.