Re: cannot open cuad* with a shared lock in todays kernel

From: othermark <atkin901_at_yahoo.com>
Date: Mon, 21 Mar 2005 07:49:06 -0800
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);
Received on Mon Mar 21 2005 - 15:09:31 UTC

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