site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=SrdS/qPhRrshrHyG0sm73pj8r2ZbP4zItHfYtsZU+Ax4MGX3PngyzGgSLfOljF6XcXxzPKAc+12xPoO/6mffoZap9pwSWBR79hgiVHtA2RV1T3adAzrgpY50IwANp3YtX/befUCFviQUJBrCBLkKn8M6SaJ8QZgq9ux/JpmShJE= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=YhMZnZ602DOC55im7QfcbXHcxrllK4cKP117ys0mzIyjc3ZyhSNDo7IhNYJ497VGwvi3BasNevpQ8rd5zcG7EnvIHi8tIS0i9ygo+wUXX5WKbEMIa2la2mOPaB77HNK8nCrtE3KvsiTmsvWWko6i1HIhUCRuoJIxXOCl+oPTKiE= Hi ALL, I'm doing maintainance of one application which has user space daemon and kernel extension. The User daemon sends the command to kernel extension using ioctl command. I've a application specific structure which is being passed as a parameter. This structure object is available in kernel extension in ioctl function pointer registered in kext start function. My Custom Structure looks like this. typedef struct { /* input */ long version; long b; long c; long d; long e; long f; long g; long bytes; char * dptr; /* points to the data field */ long filler[4]; } IOCTL_Struct_t; The problem is the kernel panic is comming up when i try to access the data in kernel function. int ioctl_functionpointer(dev_t dev, u_long cmd, caddr_t arg,int fflag, struct proc *p) { IOCTL_Struct_t*ctl = (PF_Ctl_t*)arg; char data[2048]; if (!ctl) { return -1; } if ((ctl->dptr) ) { int res = copyin((void *)ctl->dptr, (void *)data, ctl->bytes); if (res != 0) printf ("error in copyin"); } return 0; } If i comment the line copyin function call , then its working fine. I've tried to use the copyinstr instead of copyin , then also its showing panic screen. Please help me to solve this. Thanks in Advance. -JanakiRam. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com