cannot open cuad* with a shared lock in todays kernel

othermark atkin901 at yahoo.com
Mon Mar 21 08:09:31 PST 2005


othermark wrote:

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

Apparently there was some ABI change since the 16th in this area, since
recompiling minicom fixes the problem.

-- 
othermark
atkin901 at nospam dot yahoo dot com
(!wired)?(coffee++):(wired);



More information about the freebsd-current mailing list