* 2.6.8.1-mm1 Tty problems?
@ 2004-08-17 14:08 ismail dönmez
2004-08-17 18:01 ` Paul Fulghum
2004-08-17 21:00 ` Paul Fulghum
0 siblings, 2 replies; 26+ messages in thread
From: ismail dönmez @ 2004-08-17 14:08 UTC (permalink / raw)
To: Linux Kernel Mailing List
Hi all,
Watch this sequence :
cartman@southpark:~$ echo "foo" > foo
cartman@southpark:~$ cat foo
foo
cartman@southpark:~$ less foo
cartman@southpark:~$
As you see less doesn't show up anything. Strace shows this piece of info :
<snip>
open("/dev/tty", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbffff430) = -1 ENOTTY
(Inappropriate ioctl for device)
</snip>
Any ideas whats going on?
P.S : 2.6.8 was working just fine.
--
Time is what you make of it
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 14:08 2.6.8.1-mm1 Tty problems? ismail dönmez @ 2004-08-17 18:01 ` Paul Fulghum [not found] ` <2a4f155d0408171116688a87f1@mail.gmail.com> 2004-08-17 21:00 ` Paul Fulghum 1 sibling, 1 reply; 26+ messages in thread From: Paul Fulghum @ 2004-08-17 18:01 UTC (permalink / raw) To: ismail dönmez; +Cc: Linux Kernel Mailing List ismail dönmez wrote: > cartman@southpark:~$ echo "foo" > foo > cartman@southpark:~$ cat foo > foo > cartman@southpark:~$ less foo > cartman@southpark:~$ > > As you see less doesn't show up anything. Strace shows this piece of info : > > <snip> > > open("/dev/tty", O_RDONLY|O_LARGEFILE) = 3 > ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbffff430) = -1 ENOTTY > (Inappropriate ioctl for device) > > </snip> > > Any ideas whats going on? > > P.S : 2.6.8 was working just fine. Since this involves the controlling tty, try backing out selinux-revalidate-access-to-controlling-tty.patch (available in the broken-out mm patches) -- Paul Fulghum paulkf@microgate.com ^ permalink raw reply [flat|nested] 26+ messages in thread
[parent not found: <2a4f155d0408171116688a87f1@mail.gmail.com>]
[parent not found: <4122501B.7000106@microgate.com>]
* Re: 2.6.8.1-mm1 Tty problems? [not found] ` <4122501B.7000106@microgate.com> @ 2004-08-17 19:00 ` ismail dönmez 2004-08-17 19:31 ` Paul Fulghum 2004-08-17 21:04 ` Paul Fulghum 0 siblings, 2 replies; 26+ messages in thread From: ismail dönmez @ 2004-08-17 19:00 UTC (permalink / raw) To: Paul Fulghum; +Cc: Linux Kernel Mailing List On Tue, 17 Aug 2004 13:36:11 -0500, Paul Fulghum <paulkf@microgate.com> wrote: > Even if a feature is not be enabled, > backing out a patch can verify it does not > touch code outside of the feature. > Indeed backing up selinux-revalidate-access-to-controlling-tty.patch fixed "less" problem. But some other problems remain and the real issue is /dev/tty is a directory now! : cartman@southpark:~$ ls -al /dev/tty total 0 drwxr-xr-x 2 root root 0 2004-08-18 00:52 ./ drwxr-xr-x 15 root root 0 2004-08-17 21:53 ../ crw------- 1 root root 3, 10 2004-08-18 00:52 s crw------- 1 root root 3, 0 2004-08-18 00:52 s0 crw------- 1 root root 3, 1 2004-08-18 00:52 s1 crw------- 1 root root 3, 2 2004-08-18 00:52 s2 crw------- 1 root root 3, 3 2004-08-18 00:52 s3 crw------- 1 root root 3, 4 2004-08-18 00:52 s4 crw------- 1 root root 3, 5 2004-08-18 00:52 s5 crw------- 1 root root 3, 6 2004-08-18 00:52 s6 crw------- 1 root root 3, 7 2004-08-18 00:52 s7 crw------- 1 root root 3, 8 2004-08-18 00:52 s8 crw------- 1 root root 3, 9 2004-08-18 00:52 s9 And this breaks many applications. Any idea why /dev/tty is a directory now? Cheers, ismail -- Time is what you make of it ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 19:00 ` ismail dönmez @ 2004-08-17 19:31 ` Paul Fulghum 2004-08-17 19:37 ` ismail dönmez 2004-08-17 19:43 ` ismail dönmez 2004-08-17 21:04 ` Paul Fulghum 1 sibling, 2 replies; 26+ messages in thread From: Paul Fulghum @ 2004-08-17 19:31 UTC (permalink / raw) To: ismail dönmez; +Cc: Linux Kernel Mailing List ismail dönmez wrote: > But some other problems remain and the real > issue is /dev/tty is a directory now! : > > > cartman@southpark:~$ ls -al /dev/tty > total 0 > drwxr-xr-x 2 root root 0 2004-08-18 00:52 ./ > drwxr-xr-x 15 root root 0 2004-08-17 21:53 ../ > crw------- 1 root root 3, 10 2004-08-18 00:52 s > crw------- 1 root root 3, 0 2004-08-18 00:52 s0 > crw------- 1 root root 3, 1 2004-08-18 00:52 s1 > crw------- 1 root root 3, 2 2004-08-18 00:52 s2 > crw------- 1 root root 3, 3 2004-08-18 00:52 s3 > crw------- 1 root root 3, 4 2004-08-18 00:52 s4 > crw------- 1 root root 3, 5 2004-08-18 00:52 s5 > crw------- 1 root root 3, 6 2004-08-18 00:52 s6 > crw------- 1 root root 3, 7 2004-08-18 00:52 s7 > crw------- 1 root root 3, 8 2004-08-18 00:52 s8 > crw------- 1 root root 3, 9 2004-08-18 00:52 s9 > > > And this breaks many applications. Any idea why /dev/tty is a directory now? That does not look right. Char dev 3 is the pty major. This could be left over from running with the controlling-tty patch. Try recreating /dev/tty as a char special file: mknod -m 666 /dev/tty c 5 0 -- Paul Fulghum paulkf@microgate.com ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 19:31 ` Paul Fulghum @ 2004-08-17 19:37 ` ismail dönmez 2004-08-17 19:43 ` ismail dönmez 1 sibling, 0 replies; 26+ messages in thread From: ismail dönmez @ 2004-08-17 19:37 UTC (permalink / raw) To: Paul Fulghum; +Cc: Linux Kernel Mailing List On Tue, 17 Aug 2004 14:31:34 -0500, Paul Fulghum <paulkf@microgate.com> wrote: > > Try recreating /dev/tty as a char special file: > mknod -m 666 /dev/tty c 5 0 > Yes totally works! Cheers, ismail -- Time is what you make of ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 19:31 ` Paul Fulghum 2004-08-17 19:37 ` ismail dönmez @ 2004-08-17 19:43 ` ismail dönmez 2004-08-17 20:05 ` Paul Fulghum 2004-08-17 21:30 ` Martin Schlemmer 1 sibling, 2 replies; 26+ messages in thread From: ismail dönmez @ 2004-08-17 19:43 UTC (permalink / raw) To: Paul Fulghum; +Cc: Linux Kernel Mailing List > That does not look right. > Char dev 3 is the pty major. > This could be left over from running with the controlling-tty patch. > > Try recreating /dev/tty as a char special file: > mknod -m 666 /dev/tty c 5 0 Hmm I use udev and /dev/tty dir is created again at startup. So something else is broken too I think. Cheers, ismail -- Time is what you make of it ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 19:43 ` ismail dönmez @ 2004-08-17 20:05 ` Paul Fulghum 2004-08-17 20:52 ` ismail dönmez 2004-08-18 6:22 ` Olaf Hering 2004-08-17 21:30 ` Martin Schlemmer 1 sibling, 2 replies; 26+ messages in thread From: Paul Fulghum @ 2004-08-17 20:05 UTC (permalink / raw) To: ismail dönmez; +Cc: Linux Kernel Mailing List, olh ismail dönmez wrote: >>That does not look right. >>Char dev 3 is the pty major. >>This could be left over from running with the controlling-tty patch. >> >>Try recreating /dev/tty as a char special file: >>mknod -m 666 /dev/tty c 5 0 > > > Hmm I use udev and /dev/tty dir is created again at startup. So > something else is broken too I think. This is almost certainly related to the addition of pty devices to devfs in bk-driver-core.patch Change is by olh@suse.de This explains why you are seein pty major devices created in a /dev/tty directory. Specifically the changes in drivers/char/tty_io.c in function tty_register_device() Try backing out that specific portion of bk-driver-core.patch -- Paul Fulghum paulkf@microgate.com ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 20:05 ` Paul Fulghum @ 2004-08-17 20:52 ` ismail dönmez 2004-08-18 6:22 ` Olaf Hering 1 sibling, 0 replies; 26+ messages in thread From: ismail dönmez @ 2004-08-17 20:52 UTC (permalink / raw) To: Paul Fulghum, Andrew Morton; +Cc: Linux Kernel Mailing List, olh CC'ing Andrew too. On Tue, 17 Aug 2004 15:05:38 -0500, Paul Fulghum <paulkf@microgate.com> wrote: > This is almost certainly related to the addition > of pty devices to devfs in bk-driver-core.patch > Change is by olh@suse.de > > This explains why you are seein pty major devices > created in a /dev/tty directory. > > Specifically the changes in drivers/char/tty_io.c > in function tty_register_device() > > Try backing out that specific portion of bk-driver-core.patch Backed out whole bk-driver-core.patch and everything works as expected. Thanks for help. Cheers, ismail -- Time is what you make of it ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 20:05 ` Paul Fulghum 2004-08-17 20:52 ` ismail dönmez @ 2004-08-18 6:22 ` Olaf Hering 2004-08-18 6:34 ` ismail dönmez 1 sibling, 1 reply; 26+ messages in thread From: Olaf Hering @ 2004-08-18 6:22 UTC (permalink / raw) To: Paul Fulghum; +Cc: ismail dönmez, Linux Kernel Mailing List On Tue, Aug 17, Paul Fulghum wrote: > ismail dönmez wrote: > > >>That does not look right. > >>Char dev 3 is the pty major. > >>This could be left over from running with the controlling-tty patch. > >> > >>Try recreating /dev/tty as a char special file: > >>mknod -m 666 /dev/tty c 5 0 > > > > > >Hmm I use udev and /dev/tty dir is created again at startup. So > >something else is broken too I think. > > This is almost certainly related to the addition > of pty devices to devfs in bk-driver-core.patch > Change is by olh@suse.de > > This explains why you are seein pty major devices > created in a /dev/tty directory. /dev/tty is supposed to be char c 5 0, /class/tty/tty/dev will tell udev how to create it, see man 4 tty. No idea who came up with the bright idea to put legacy bsd devices in a subdir. Documentation/devices.txt shows that my patch is ok, it handles up to 256 device nodes. If you are using udev, file a bugreport for your distros package. In the meantime, remove the offending line from your udev.rules file. -- USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-18 6:22 ` Olaf Hering @ 2004-08-18 6:34 ` ismail dönmez 2004-08-18 6:42 ` Olaf Hering 0 siblings, 1 reply; 26+ messages in thread From: ismail dönmez @ 2004-08-18 6:34 UTC (permalink / raw) To: Olaf Hering; +Cc: Paul Fulghum, Linux Kernel Mailing List On Wed, 18 Aug 2004 08:22:10 +0200, Olaf Hering <olh@suse.de> wrote: > /dev/tty is supposed to be char c 5 0, /class/tty/tty/dev will tell udev > how to create it, see man 4 tty. > No idea who came up with the bright idea to put legacy bsd devices in a > subdir. Documentation/devices.txt shows that my patch is ok, it handles > up to 256 device nodes. > If you are using udev, file a bugreport for your distros package. In the > meantime, remove the offending line from your udev.rules file. I don't think you understood me. /dev/tty is created as a char device in 2.6.8.1 kernel. So I am sure udev is fine but it shows up as a directory in 2.6.8.1-mm1 kernel and if I backup bk-driver-core.patch its all normal again. Cheers, ismail -- Time is what you make of it ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-18 6:34 ` ismail dönmez @ 2004-08-18 6:42 ` Olaf Hering 2004-08-18 18:58 ` Martin Schlemmer 0 siblings, 1 reply; 26+ messages in thread From: Olaf Hering @ 2004-08-18 6:42 UTC (permalink / raw) To: ismail dönmez; +Cc: Paul Fulghum, Linux Kernel Mailing List On Wed, Aug 18, ismail dönmez wrote: > On Wed, 18 Aug 2004 08:22:10 +0200, Olaf Hering <olh@suse.de> wrote: > > /dev/tty is supposed to be char c 5 0, /class/tty/tty/dev will tell udev > > how to create it, see man 4 tty. > > No idea who came up with the bright idea to put legacy bsd devices in a > > subdir. Documentation/devices.txt shows that my patch is ok, it handles > > up to 256 device nodes. > > If you are using udev, file a bugreport for your distros package. In the > > meantime, remove the offending line from your udev.rules file. > > I don't think you understood me. /dev/tty is created as a char device > in 2.6.8.1 kernel. So I am sure udev is fine but it shows up as a > directory in 2.6.8.1-mm1 kernel and if I backup bk-driver-core.patch > its all normal again. Works fine here. Check you udev.rules file if some rule matches the pattern ptyp0. -- USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-18 6:42 ` Olaf Hering @ 2004-08-18 18:58 ` Martin Schlemmer 2004-08-19 17:28 ` Tonnerre 0 siblings, 1 reply; 26+ messages in thread From: Martin Schlemmer @ 2004-08-18 18:58 UTC (permalink / raw) To: Olaf Hering; +Cc: ismail dönmez, Paul Fulghum, Linux Kernel Mailing List [-- Attachment #1: Type: text/plain, Size: 1104 bytes --] On Wed, 2004-08-18 at 08:42, Olaf Hering wrote: > On Wed, Aug 18, ismail dönmez wrote: > > > On Wed, 18 Aug 2004 08:22:10 +0200, Olaf Hering <olh@suse.de> wrote: > > > /dev/tty is supposed to be char c 5 0, /class/tty/tty/dev will tell udev > > > how to create it, see man 4 tty. > > > No idea who came up with the bright idea to put legacy bsd devices in a > > > subdir. Documentation/devices.txt shows that my patch is ok, it handles > > > up to 256 device nodes. > > > If you are using udev, file a bugreport for your distros package. In the > > > meantime, remove the offending line from your udev.rules file. > > > > I don't think you understood me. /dev/tty is created as a char device > > in 2.6.8.1 kernel. So I am sure udev is fine but it shows up as a > > directory in 2.6.8.1-mm1 kernel and if I backup bk-driver-core.patch > > its all normal again. > > Works fine here. > Check you udev.rules file if some rule matches the pattern ptyp0. Hmm, Ok, so I see we have pty devices in there as well. Ismail, what tries to use /dev/tty anyhow? -- Martin Schlemmer [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-18 18:58 ` Martin Schlemmer @ 2004-08-19 17:28 ` Tonnerre 2004-08-19 19:24 ` Martin Schlemmer 0 siblings, 1 reply; 26+ messages in thread From: Tonnerre @ 2004-08-19 17:28 UTC (permalink / raw) To: Martin Schlemmer Cc: Olaf Hering, ismail d?nmez, Paul Fulghum, Linux Kernel Mailing List [-- Attachment #1: Type: text/plain, Size: 302 bytes --] Saut, On Wed, Aug 18, 2004 at 08:58:37PM +0200, Martin Schlemmer wrote: > Ismail, what tries to use /dev/tty anyhow? It's the standard UN*X way of finding your controlling TTY: open /dev/tty and do an isatty on it. So I'd suppose around 90% of the console software does that. Tonnerre [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-19 17:28 ` Tonnerre @ 2004-08-19 19:24 ` Martin Schlemmer 2004-08-19 19:24 ` Olaf Hering 0 siblings, 1 reply; 26+ messages in thread From: Martin Schlemmer @ 2004-08-19 19:24 UTC (permalink / raw) To: Greg KH Cc: Tonnerre, Olaf Hering, ismail d?nmez, Paul Fulghum, Linux Kernel Mailing List [-- Attachment #1: Type: text/plain, Size: 927 bytes --] On Thu, 2004-08-19 at 19:28, Tonnerre wrote: > Saut, > > On Wed, Aug 18, 2004 at 08:58:37PM +0200, Martin Schlemmer wrote: > > Ismail, what tries to use /dev/tty anyhow? > > It's the standard UN*X way of finding your controlling TTY: open > /dev/tty and do an isatty on it. So I'd suppose around 90% of the > console software does that. > Yes sorry, I was on drugs. Greg, below patch should be in order. --- --- /etc/udev/rules.d/50-udev.rules.orig 2004-08-19 21:17:08.947911536 +0200 +++ /etc/udev/rules.d/50-udev.rules 2004-08-19 21:22:48.804245520 +0200 @@ -65,7 +65,7 @@ # pty devices KERNEL="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k" -KERNEL="tty[p-za-e][0-9a-f]*", NAME="tty/s%n", SYMLINK="%k" +KERNEL="tty[p-za-e][0-9a-f]*", NAME="pty/s%n", SYMLINK="%k" # ramdisk devices KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k" --- -- Martin Schlemmer [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-19 19:24 ` Martin Schlemmer @ 2004-08-19 19:24 ` Olaf Hering 2004-08-19 19:46 ` Martin Schlemmer 0 siblings, 1 reply; 26+ messages in thread From: Olaf Hering @ 2004-08-19 19:24 UTC (permalink / raw) To: Martin Schlemmer Cc: Greg KH, Tonnerre, ismail d?nmez, Paul Fulghum, Linux Kernel Mailing List On Thu, Aug 19, Martin Schlemmer wrote: > Greg, below patch should be in order. > > --- > --- /etc/udev/rules.d/50-udev.rules.orig 2004-08-19 21:17:08.947911536 +0200 > +++ /etc/udev/rules.d/50-udev.rules 2004-08-19 21:22:48.804245520 +0200 > @@ -65,7 +65,7 @@ > > # pty devices > KERNEL="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k" > -KERNEL="tty[p-za-e][0-9a-f]*", NAME="tty/s%n", SYMLINK="%k" > +KERNEL="tty[p-za-e][0-9a-f]*", NAME="pty/s%n", SYMLINK="%k" Dont forget to update Documentation/devices.txt -- USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-19 19:24 ` Olaf Hering @ 2004-08-19 19:46 ` Martin Schlemmer 0 siblings, 0 replies; 26+ messages in thread From: Martin Schlemmer @ 2004-08-19 19:46 UTC (permalink / raw) To: Olaf Hering Cc: Greg KH, Tonnerre, ismail d?nmez, Paul Fulghum, Linux Kernel Mailing List [-- Attachment #1: Type: text/plain, Size: 933 bytes --] On Thu, 2004-08-19 at 21:24, Olaf Hering wrote: > On Thu, Aug 19, Martin Schlemmer wrote: > > > Greg, below patch should be in order. > > > > --- > > --- /etc/udev/rules.d/50-udev.rules.orig 2004-08-19 21:17:08.947911536 +0200 > > +++ /etc/udev/rules.d/50-udev.rules 2004-08-19 21:22:48.804245520 +0200 > > @@ -65,7 +65,7 @@ > > > > # pty devices > > KERNEL="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k" > > -KERNEL="tty[p-za-e][0-9a-f]*", NAME="tty/s%n", SYMLINK="%k" > > +KERNEL="tty[p-za-e][0-9a-f]*", NAME="pty/s%n", SYMLINK="%k" > > Dont forget to update Documentation/devices.txt Its part of the udev 'devfs compat' ruleset, so not what would have been created standard. I checked the code again and devfs use /dev/pty/s# and not /dev/tty/s#, so it somewhere that either I or one of the others made a boo-boo that did the original of that rule file ... -- Martin Schlemmer [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 19:43 ` ismail dönmez 2004-08-17 20:05 ` Paul Fulghum @ 2004-08-17 21:30 ` Martin Schlemmer 1 sibling, 0 replies; 26+ messages in thread From: Martin Schlemmer @ 2004-08-17 21:30 UTC (permalink / raw) To: ismail dönmez; +Cc: Paul Fulghum, Linux Kernel Mailing List [-- Attachment #1: Type: text/plain, Size: 566 bytes --] On Tue, 2004-08-17 at 21:43, ismail dönmez wrote: > > That does not look right. > > Char dev 3 is the pty major. > > This could be left over from running with the controlling-tty patch. > > > > Try recreating /dev/tty as a char special file: > > mknod -m 666 /dev/tty c 5 0 > > Hmm I use udev and /dev/tty dir is created again at startup. So > something else is broken too I think. > Just fix the permissions in /etc/udev/permissions.d/50-udev.permissions, and file a bug with your distribution if its not self-compiled. -- Martin Schlemmer [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 19:00 ` ismail dönmez 2004-08-17 19:31 ` Paul Fulghum @ 2004-08-17 21:04 ` Paul Fulghum 2004-08-17 21:36 ` Martin Schlemmer 1 sibling, 1 reply; 26+ messages in thread From: Paul Fulghum @ 2004-08-17 21:04 UTC (permalink / raw) To: ismail dönmez; +Cc: Linux Kernel Mailing List, olh, greg ismail dönmez wrote: > On Tue, 17 Aug 2004 13:36:11 -0500, Paul Fulghum <paulkf@microgate.com> wrote: > >>Even if a feature is not be enabled, >>backing out a patch can verify it does not >>touch code outside of the feature. >> > > > Indeed backing up selinux-revalidate-access-to-controlling-tty.patch > fixed "less" problem. But some other problems remain and the real > issue is /dev/tty is a directory now! : > > > cartman@southpark:~$ ls -al /dev/tty > total 0 > drwxr-xr-x 2 root root 0 2004-08-18 00:52 ./ > drwxr-xr-x 15 root root 0 2004-08-17 21:53 ../ > crw------- 1 root root 3, 10 2004-08-18 00:52 s > crw------- 1 root root 3, 0 2004-08-18 00:52 s0 > crw------- 1 root root 3, 1 2004-08-18 00:52 s1 > crw------- 1 root root 3, 2 2004-08-18 00:52 s2 > crw------- 1 root root 3, 3 2004-08-18 00:52 s3 > crw------- 1 root root 3, 4 2004-08-18 00:52 s4 > crw------- 1 root root 3, 5 2004-08-18 00:52 s5 > crw------- 1 root root 3, 6 2004-08-18 00:52 s6 > crw------- 1 root root 3, 7 2004-08-18 00:52 s7 > crw------- 1 root root 3, 8 2004-08-18 00:52 s8 > crw------- 1 root root 3, 9 2004-08-18 00:52 s9 > > > And this breaks many applications. Any idea why /dev/tty is a directory now? Olaf, Greg: The addition of pty devices to sysfs in bk-driver-core.patch of 2.6.8.1-mm1 seems to be causing the problem described above. See the rest of this thread for more details. -- Paul Fulghum paulkf@microgate.com ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 21:04 ` Paul Fulghum @ 2004-08-17 21:36 ` Martin Schlemmer 2004-08-18 5:44 ` ismail dönmez 0 siblings, 1 reply; 26+ messages in thread From: Martin Schlemmer @ 2004-08-17 21:36 UTC (permalink / raw) To: Paul Fulghum; +Cc: ismail dönmez, Linux Kernel Mailing List, olh, Greg KH [-- Attachment #1: Type: text/plain, Size: 2206 bytes --] On Tue, 2004-08-17 at 23:04, Paul Fulghum wrote: > ismail dönmez wrote: > > > On Tue, 17 Aug 2004 13:36:11 -0500, Paul Fulghum <paulkf@microgate.com> wrote: > > > >>Even if a feature is not be enabled, > >>backing out a patch can verify it does not > >>touch code outside of the feature. > >> > > > > > > Indeed backing up selinux-revalidate-access-to-controlling-tty.patch > > fixed "less" problem. But some other problems remain and the real > > issue is /dev/tty is a directory now! : > > > > > > cartman@southpark:~$ ls -al /dev/tty > > total 0 > > drwxr-xr-x 2 root root 0 2004-08-18 00:52 ./ > > drwxr-xr-x 15 root root 0 2004-08-17 21:53 ../ > > crw------- 1 root root 3, 10 2004-08-18 00:52 s > > crw------- 1 root root 3, 0 2004-08-18 00:52 s0 > > crw------- 1 root root 3, 1 2004-08-18 00:52 s1 > > crw------- 1 root root 3, 2 2004-08-18 00:52 s2 > > crw------- 1 root root 3, 3 2004-08-18 00:52 s3 > > crw------- 1 root root 3, 4 2004-08-18 00:52 s4 > > crw------- 1 root root 3, 5 2004-08-18 00:52 s5 > > crw------- 1 root root 3, 6 2004-08-18 00:52 s6 > > crw------- 1 root root 3, 7 2004-08-18 00:52 s7 > > crw------- 1 root root 3, 8 2004-08-18 00:52 s8 > > crw------- 1 root root 3, 9 2004-08-18 00:52 s9 > > > > > > And this breaks many applications. Any idea why /dev/tty is a directory now? > > Olaf, Greg: > > The addition of pty devices to sysfs in bk-driver-core.patch > of 2.6.8.1-mm1 seems to be causing the problem described above. > See the rest of this thread for more details. > He has the wrong permissions in /etc/udev/permissions.d/50-udev.permissions (or whatever), or no entry for it, and his default_mode (in /etc/udev/udev.conf) is very restrictive, or he does not use pam_console (or using it with a display manager?), or add some other explanation. Personally I would just say that he/his_distribution should fix the shipped udev.permissions. Apart from above, I cannot say anything is wrong with the addition of tty's to sysfs, and if its the same in functionality as the old patch from Greg, then I ran it for months no problem. -- Martin Schlemmer [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 21:36 ` Martin Schlemmer @ 2004-08-18 5:44 ` ismail dönmez 2004-08-18 18:43 ` Martin Schlemmer 2004-08-26 23:02 ` Greg KH 0 siblings, 2 replies; 26+ messages in thread From: ismail dönmez @ 2004-08-18 5:44 UTC (permalink / raw) To: Martin Schlemmer; +Cc: Paul Fulghum, Linux Kernel Mailing List, olh, Greg KH On Tue, 17 Aug 2004 23:36:02 +0200, Martin Schlemmer <azarah@nosferatu.za.org> > He has the wrong permissions in > /etc/udev/permissions.d/50-udev.permissions (or whatever), or no > entry for it, and his default_mode (in /etc/udev/udev.conf) is very > restrictive, or he does not use pam_console (or using it with a > display manager?), or add some other explanation. Personally I would > just say that he/his_distribution should fix the shipped > udev.permissions. I run Slackware 10 and got this in /etc/udev/permissions.d/udev.permissions : # console devices console:root:tty:0600 tty:root:tty:0666 tty[0-9][0-9]*:root:tty:0660 vc/[0-9]*:root:tty:0660 But the real problem is not permissions but the fact that /dev/tty is a directory now not a character device. Is this intended? If yes this will break many userspace applications which will assume /dev/tty is a character device. Greg can you please comment? Cheers, ismail -- Time is what you make of it ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-18 5:44 ` ismail dönmez @ 2004-08-18 18:43 ` Martin Schlemmer 2004-08-26 23:02 ` Greg KH 1 sibling, 0 replies; 26+ messages in thread From: Martin Schlemmer @ 2004-08-18 18:43 UTC (permalink / raw) To: ismail dönmez; +Cc: Paul Fulghum, Linux Kernel Mailing List, olh, Greg KH [-- Attachment #1: Type: text/plain, Size: 1319 bytes --] On Wed, 2004-08-18 at 07:44, ismail dönmez wrote: > On Tue, 17 Aug 2004 23:36:02 +0200, Martin Schlemmer <azarah@nosferatu.za.org> > > He has the wrong permissions in > > /etc/udev/permissions.d/50-udev.permissions (or whatever), or no > > entry for it, and his default_mode (in /etc/udev/udev.conf) is very > > restrictive, or he does not use pam_console (or using it with a > > display manager?), or add some other explanation. Personally I would > > just say that he/his_distribution should fix the shipped > > udev.permissions. > > I run Slackware 10 and got this in /etc/udev/permissions.d/udev.permissions : > > # console devices > console:root:tty:0600 > tty:root:tty:0666 > tty[0-9][0-9]*:root:tty:0660 > vc/[0-9]*:root:tty:0660 > > > But the real problem is not permissions but the fact that /dev/tty is > a directory now not a character device. Is this intended? If yes this > will break many userspace applications which will assume /dev/tty is a > character device. Greg can you please comment? > --- # ls -l /dev/tty crw-rw-rw- 1 root tty 5, 0 Aug 16 20:25 /dev/tty --- I think its something else - most likely a rule in /etc/udev/rules.d/50-udev.rules ? Could you post that (or /etc/udev/rules.conf or whatever file is applicable) ? -- Martin Schlemmer [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-18 5:44 ` ismail dönmez 2004-08-18 18:43 ` Martin Schlemmer @ 2004-08-26 23:02 ` Greg KH 1 sibling, 0 replies; 26+ messages in thread From: Greg KH @ 2004-08-26 23:02 UTC (permalink / raw) To: ismail d?nmez Cc: Martin Schlemmer, Paul Fulghum, Linux Kernel Mailing List, olh On Wed, Aug 18, 2004 at 08:44:28AM +0300, ismail d?nmez wrote: > On Tue, 17 Aug 2004 23:36:02 +0200, Martin Schlemmer <azarah@nosferatu.za.org> > > He has the wrong permissions in > > /etc/udev/permissions.d/50-udev.permissions (or whatever), or no > > entry for it, and his default_mode (in /etc/udev/udev.conf) is very > > restrictive, or he does not use pam_console (or using it with a > > display manager?), or add some other explanation. Personally I would > > just say that he/his_distribution should fix the shipped > > udev.permissions. > > I run Slackware 10 and got this in /etc/udev/permissions.d/udev.permissions : > > # console devices > console:root:tty:0600 > tty:root:tty:0666 > tty[0-9][0-9]*:root:tty:0660 > vc/[0-9]*:root:tty:0660 > > > But the real problem is not permissions but the fact that /dev/tty is > a directory now not a character device. Is this intended? If yes this > will break many userspace applications which will assume /dev/tty is a > character device. Greg can you please comment? /dev/tty is a char device on my system. Perhaps your rules files are making that not happen properly. thanks, greg k-h ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 14:08 2.6.8.1-mm1 Tty problems? ismail dönmez 2004-08-17 18:01 ` Paul Fulghum @ 2004-08-17 21:00 ` Paul Fulghum 2004-08-18 12:22 ` Stephen Smalley 1 sibling, 1 reply; 26+ messages in thread From: Paul Fulghum @ 2004-08-17 21:00 UTC (permalink / raw) To: ismail dönmez; +Cc: Linux Kernel Mailing List, sds, jmorris, akpm ismail dönmez wrote: > Hi all, > > Watch this sequence : > > > cartman@southpark:~$ echo "foo" > foo > cartman@southpark:~$ cat foo > foo > cartman@southpark:~$ less foo > cartman@southpark:~$ > > As you see less doesn't show up anything. Strace shows this piece of info : > > <snip> > > open("/dev/tty", O_RDONLY|O_LARGEFILE) = 3 > ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbffff430) = -1 ENOTTY > (Inappropriate ioctl for device) > > </snip> > > Any ideas whats going on? > > P.S : 2.6.8 was working just fine. Stephen, James, Andrew: the selinux-revalidate-access-to-controlling-tty patch seems to be causing the problem with less program as shown above. See the rest of this thread for more details. -- Paul Fulghum paulkf@microgate.com ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-17 21:00 ` Paul Fulghum @ 2004-08-18 12:22 ` Stephen Smalley 2004-08-18 13:05 ` Paul Fulghum 0 siblings, 1 reply; 26+ messages in thread From: Stephen Smalley @ 2004-08-18 12:22 UTC (permalink / raw) To: Paul Fulghum Cc: ismail dönmez, Linux Kernel Mailing List, James Morris, Andrew Morton On Tue, 2004-08-17 at 17:00, Paul Fulghum wrote: > Stephen, James, Andrew: > > the selinux-revalidate-access-to-controlling-tty patch > seems to be causing the problem with less program as > shown above. See the rest of this thread for more details. I find that puzzling, given that flush_unauthorized_files is only called if the process is changing SIDs on exec, and running less certainly doesn't involve a SID transition (at least for any policy that I have seen). I tried the sequence shown with 2.6.8.1-mm1 with SELinux enabled and disabled, and did not see the behavior he describes. Is the bug reproducible? Was he running with SELinux enabled or disabled? What policy did he have loaded? -- Stephen Smalley <sds@epoch.ncsc.mil> National Security Agency ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-18 12:22 ` Stephen Smalley @ 2004-08-18 13:05 ` Paul Fulghum 2004-08-18 13:27 ` ismail dönmez 0 siblings, 1 reply; 26+ messages in thread From: Paul Fulghum @ 2004-08-18 13:05 UTC (permalink / raw) To: Stephen Smalley Cc: ismail dönmez, Linux Kernel Mailing List, James Morris, Andrew Morton Stephen Smalley wrote: > I find that puzzling, given that flush_unauthorized_files is only called > if the process is changing SIDs on exec, and running less certainly > doesn't involve a SID transition (at least for any policy that I have > seen). I tried the sequence shown with 2.6.8.1-mm1 with SELinux enabled > and disabled, and did not see the behavior he describes. Is the bug > reproducible? Was he running with SELinux enabled or disabled? What > policy did he have loaded? According to Ismail: * The problem is reproducible. * SELinux is disabled. * With the patch the problem occurs. * With the patch reversed, the problem went away. Unfortunately, this appears to be mixed up with another 2.6.8.1-mm1 change causing udev to garble the creation of /dev/tty and pty devices. Applying/reversing the controlling-tty patch in isolation creates/corrects the symptom with the less program, so there seems to be some relation. -- Paul Fulghum paulkf@microgate.com ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: 2.6.8.1-mm1 Tty problems? 2004-08-18 13:05 ` Paul Fulghum @ 2004-08-18 13:27 ` ismail dönmez 0 siblings, 0 replies; 26+ messages in thread From: ismail dönmez @ 2004-08-18 13:27 UTC (permalink / raw) To: Paul Fulghum Cc: Stephen Smalley, Linux Kernel Mailing List, James Morris, Andrew Morton On Wed, 18 Aug 2004 08:05:27 -0500, Paul Fulghum <paulkf@microgate.com> wrote: > Stephen Smalley wrote: > > I find that puzzling, given that flush_unauthorized_files is only called > > if the process is changing SIDs on exec, and running less certainly > > doesn't involve a SID transition (at least for any policy that I have > > seen). I tried the sequence shown with 2.6.8.1-mm1 with SELinux enabled > > and disabled, and did not see the behavior he describes. Is the bug > > reproducible? Was he running with SELinux enabled or disabled? What > > policy did he have loaded? > > According to Ismail: > * The problem is reproducible. > * SELinux is disabled. > * With the patch the problem occurs. > * With the patch reversed, the problem went away. > > Unfortunately, this appears to be mixed up with > another 2.6.8.1-mm1 change causing udev to garble > the creation of /dev/tty and pty devices. > > Applying/reversing the controlling-tty patch in isolation > creates/corrects the symptom with the less program, > so there seems to be some relation. > > -- > Paul Fulghum > paulkf@microgate.com > The problem ended up as a problem in Slackware's default udev.rules file. Now I'm running vanilla -mm1 and everything works. Thank you all for your attention! Cheers, ismail -- Time is what you make of it ^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2004-08-26 23:09 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-17 14:08 2.6.8.1-mm1 Tty problems? ismail dönmez
2004-08-17 18:01 ` Paul Fulghum
[not found] ` <2a4f155d0408171116688a87f1@mail.gmail.com>
[not found] ` <4122501B.7000106@microgate.com>
2004-08-17 19:00 ` ismail dönmez
2004-08-17 19:31 ` Paul Fulghum
2004-08-17 19:37 ` ismail dönmez
2004-08-17 19:43 ` ismail dönmez
2004-08-17 20:05 ` Paul Fulghum
2004-08-17 20:52 ` ismail dönmez
2004-08-18 6:22 ` Olaf Hering
2004-08-18 6:34 ` ismail dönmez
2004-08-18 6:42 ` Olaf Hering
2004-08-18 18:58 ` Martin Schlemmer
2004-08-19 17:28 ` Tonnerre
2004-08-19 19:24 ` Martin Schlemmer
2004-08-19 19:24 ` Olaf Hering
2004-08-19 19:46 ` Martin Schlemmer
2004-08-17 21:30 ` Martin Schlemmer
2004-08-17 21:04 ` Paul Fulghum
2004-08-17 21:36 ` Martin Schlemmer
2004-08-18 5:44 ` ismail dönmez
2004-08-18 18:43 ` Martin Schlemmer
2004-08-26 23:02 ` Greg KH
2004-08-17 21:00 ` Paul Fulghum
2004-08-18 12:22 ` Stephen Smalley
2004-08-18 13:05 ` Paul Fulghum
2004-08-18 13:27 ` ismail dönmez
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox