From owner-freebsd-current@FreeBSD.ORG Mon Mar 21 16:09:31 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2FD8D16A4CE for ; Mon, 21 Mar 2005 16:09:31 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 165B343D2D for ; Mon, 21 Mar 2005 16:09:30 +0000 (GMT) (envelope-from freebsd-current@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DDPH2-0004GB-2q for freebsd-current@freebsd.org; Mon, 21 Mar 2005 16:57:01 +0100 Received: from mulder.f5.com ([205.229.151.150]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Mar 2005 16:57:00 +0100 Received: from atkin901 by mulder.f5.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Mar 2005 16:57:00 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: othermark Date: Mon, 21 Mar 2005 07:49:06 -0800 Lines: 58 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: mulder.f5.com User-Agent: KNode/0.8.2 Sender: news X-Gmane-MailScanner: Found to be clean X-Gmane-MailScanner: Found to be clean X-MailScanner-From: freebsd-current@m.gmane.org X-MailScanner-To: freebsd-current@freebsd.org Subject: Re: cannot open cuad* with a shared lock in todays kernel X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2005 16:09:31 -0000 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);