Problem with C4B on FreeBSD-Stable

Cian Hughes cian at cian.ws
Fri Jun 17 10:35:18 GMT 2005


(I know I shouldn't reply to my own posts)

I traced my last problem to kcapi_ctlr.c
here are my changes starting at line 845
   /* check if operation is allowed by owner of the current process /  
thread */
    if (! curthread ||
        curthread->td_ucred == NOCRED || curthread->td_ucred ==  
FSCRED ||
        suser (curthread) != 0)
    {
       mtx_unlock (&g_mtxCtlrData);
       DBG (LOG_ERROR, "ERROR: Root permission required to reset  
controller %u",
            uCtlr);
       DBG (LOG_ERROR, "ERROR: CIANHHH: User is: %u",
            suser (curthread));
        if (! curthread) {
                  DBG (LOG_ERROR, "ERROR: CIANHHH: curthread");
         }
         if (curthread->td_ucred == NOCRED) {
                  DBG (LOG_ERROR, "ERROR: CIANHHH: NOCRED");
         }
        if (curthread->td_ucred == FSCRED ) {
                  DBG (LOG_ERROR, "ERROR: CIANHHH: FSCRED");
         }
       uRes = CRE_NO_RIGHTS_TO_RESET;
       kcapitrace_appl_reset_ctlr (uCtlr, nNumDataBlocks,  
paDataBlocks, uRes);
       return (uRes);
    }


on boot I got:
kcapimgr: E kcapi_reset_ctlr: ERROR: CIANHHH: User is: 0
kcapimgr: E kcapi_reset_ctlr: ERROR: CIANHHH: NOCRED


Then I removed " curthread->td_ucred == NOCRED || " test, i'm the  
only one with access to this box so i'm not to worried about  
security, i'll look into why it's failing later.

______
Now we kernel panic when running capitest:

# capitest -s -tx 014900248
capidev: T capidev_open: CAPI device is beeing opened
capidev: D capidev_open: new temp fd 4 allocated
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x6c
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc050b6d1
stack pointer           = 0x10:0xc7dddbd8
frame pointer           = 0x10:0xc7dddbdc
code segment            = base 0x0, limit 0xfffff, type 0x1b
                         = DPL 0, pres 1, def32 1, gran 1
processor eflags        = resume, IOPL = 0
current process         = 558 (capitest)
trap number             = 12
panic: page fault
Uptime: 54s
Cannot dump. No dump device defined.
Automatic reboot in 15 seconds - press a key on the console to abort

and again when starting asterisk:

oppy:root:/usr/local/etc/asterisk:0# capidev: T capidev_open: CAPI  
device is beeing opened
capidev: D capidev_open: new temp fd 25 allocated
capidev: D capidev_ioctl: CAPI_GET_PROFILE: Result 0x0000, controller 0
capidev: D capidev_close: Application not registered, only close file  
descriptor
capidev: T capidev_open: CAPI device is beeing opened
capidev: D capidev_open: new temp fd 25 allocated
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x6c
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc050b6d1
stack pointer           = 0x10:0xcc445bd8
frame pointer           = 0x10:0xcc445bdc
code segment            = base 0x0, limit 0xfffff, type 0x1b
                         = DPL 0, pres 1, def32 1, gran 1
processor eflags        = resume, IOPL = 0
current process         = 599 (asterisk)
trap number             = 12
panic: page fault
Uptime: 5m14s
Cannot dump. No dump device defined.

Regards, Cian

On 17 Meith 2005, at 09:26, Cian Hughes wrote:

> I get this error on boot:
> CAPI subsystem startup: kcapimgr capidev
> avmaic avmaic0: <AVM B1 PCI v4> port 0xec80-0xec9f,0xecc0-0xecff  
> mem 0xfdfffc00-0xfdfffc3f irq 10 at device 8.0 on pci1
> avmaic0: "AVMB1-1" successfully attached as CAPI controller 1
> kcapimgr: E kcapi_reset_ctlr: ERROR: Root permission required to  
> reset controller 1
> Error in download operation for board "AVMB1-1", number 1:  
> Insufficient rights, must have root privileges
> /etc/rc: WARNING: Download command for avmaic failed.
>
> if you have any suggestions I would be most obliged.
>
> also if I type this from a command line:
> oppy# avmaicctl -q -f /etc/avmaic.cfg
> Error in download operation for board "AVMB1-1", number 1:  
> Insufficient rights, must have root privileges
> (and on console: kcapimgr: E kcapi_reset_ctlr: ERROR: Root  
> permission required to reset controller 1)
>
> Regards,
>                        Cian Hughes



More information about the freebsd-isdn mailing list