Re: Register a task's exception port from a kext
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Pk7a3zwckOA7SqfWjgz4VahhuvglM5T7j4yPNzrkEls=; b=BZHsfsLNntfCKGiFaBl3x/v2VPSMwHOXA2s7xtiU++A7XKUAkIEINBzPHnkb/bKYcp 98G27tKBB2PkwCdPxrsKsS/taCbdwU9JE7kk3HnNp0ypRfVoV3L6AOHyBLD157kl03tz 6FuQqfu1ZsjvKqGATIKqkLpY72bHPncROpE6k= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=GX75lYf70H7zrmwW+rqgooPKCN+uKtygp9Z6HzwbklNhO+mlU7BX50LFzlOX7GaWt3 12/0vfOhqeZuKDrBoyYAXPef9s2Y8xIPOyUtNlX9KNGKM5780CIukwzOVRL0kKUo95hm GCJ6AZIHn0xyoVcyBitIHiAnj+/qHZINQDFM0= On Sat, Oct 4, 2008 at 2:52 AM, Quinn <eskimo1@apple.com> wrote:
If you don't care about creating a real product, you have more options. Specifically, if you link against the entire kernel you should have access to task_set_special_port, which is a necessary first step. You will also need to use MIG (in kernel mode!) to generate a demux routine. Make sure you don't export your catch_xxx routines, lest they collide with the kernel routines of the same name.
Hello guys, I am definitely stuck with this. Basically, I just tried to set the exception port of a specific task with a fresh new created port (inside my kext). Here is my code: kern_return_t ret = KERN_SUCCESS; ret = ipc_port_alloc(get_task_ipcspace(current_task()), &exception_port_name, &exception_port); IOLog("ipc_port_alloc() ret=%d", ret); if (ret) return kIOReturnError; ret = task_set_exception_ports(target, EXC_MASK_ALL, ipc_port_make_send(exception_port), EXCEPTION_DEFAULT, THREAD_STATE_NONE); IOLog("task_set_exception_ports() ret=%d", ret); if (ret) return kIOReturnError; /* create exception handler thread */ (void) kernel_thread(kernel_task, exception_handler); Unfortunately, this code freeze inside the task_set_exception_ports call. I have no idea on what's going on... Thank you in advance for your help, Nicolas _______________________________________________ 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
participants (1)
-
nicolas vide