cannot open cuad* with a shared lock in todays kernel

From: othermark <atkin901_at_yahoo.com>
Date: Fri, 18 Mar 2005 13:57:18 -0800
I have two kernels, one build from 3/16 and one from this morning 3/18 built
with the exact same kernel config.

If I boot the 3/16 kernel, I can open /dev/cuad0, if I boot
the 3/18 kernel...

$ ls -l /dev/cuad0
crw-------  1 root  wheel   13,  64 Mar 18 09:19 /dev/cuad0

$ whoami
root

$ ktrace minicom
minicom: cannot open /dev/cuad0: Permission denied

$ kdump -f ktrace.out

[...]

   821 minicom  CALL  sigprocmask(0x1,0,0x807097c)
   821 minicom  RET   sigprocmask 0
   821 minicom  CALL  sigaction(0xe,0xbfbfe6c0,0xbfbfe6a0)
   821 minicom  RET   sigaction 0
   821 minicom  CALL  setitimer(0,0xbfbfe6d0,0xbfbfe6c0)
   821 minicom  RET   setitimer 0
   821 minicom  CALL  open(0x806f0c0,0x8006,0x18)
   821 minicom  NAMI  "/dev/cuad0"
   821 minicom  RET   open -1 errno 13 Permission denied
   821 minicom  CALL  setitimer(0,0xbfbfe6d0,0xbfbfe6c0)
   821 minicom  RET   setitimer 0
   821 minicom  CALL  sigaction(0xe,0xbfbfe6c0,0xbfbfe6a0)
   821 minicom  RET   sigaction 0
   821 minicom  CALL  getuid
   821 minicom  RET   getuid 0
   821 minicom  CALL  geteuid
   821 minicom  RET   geteuid 66/0x42
   821 minicom  CALL  write(0x2,0xbfbfdfa0,0x33)
   821 minicom  GIO   fd 2 wrote 51 bytes
       "minicom: cannot open /dev/cuad0: Permission denied

[...]


0x18 appears to be O_SHLOCK | O_APPEND.

A simple .c program with O_SHLOCK | O_APPEND on cuad0 returns 
"operation not permitted"

-- 
othermark
atkin901 at nospam dot yahoo dot com
(!wired)?(coffee++):(wired);
Received on Fri Mar 18 2005 - 20:59:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:30 UTC