From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38695 invoked by alias); 19 May 2015 14:09:58 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 37789 invoked by uid 89); 19 May 2015 14:09:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ie0-f172.google.com Received: from mail-ie0-f172.google.com (HELO mail-ie0-f172.google.com) (209.85.223.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 19 May 2015 14:09:47 +0000 Received: by iesa3 with SMTP id a3so14520144ies.2 for ; Tue, 19 May 2015 07:09:44 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.79.167 with SMTP id k7mr21477987igx.32.1432044584831; Tue, 19 May 2015 07:09:44 -0700 (PDT) Received: by 10.36.32.139 with HTTP; Tue, 19 May 2015 07:09:44 -0700 (PDT) In-Reply-To: References: <5559FB9E.3040200@cygwin.com> Date: Tue, 19 May 2015 15:37:00 -0000 Message-ID: Subject: Re: File operations on a Windows Driver (character device) From: Alessio Faina To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00240.txt.bz2 Well.....I wrote and answered myself the question you pointed out that is residing on stackoverflow.... It was my first option I thought of to pass the pointer to the virtual address to the userland application but I've been asked to mantain the architecture using open(), ioctl(), mmap() etc.... so I don't know, it's a kind of jolly to be played in case I won't be able to use the posix architecture....but reading on forums/mailing lists... I think I will be forced to use the kind of implementation I've described in the SO question. It seems that no-one ever have got the need to do something like I'm trying to do. 2015-05-19 9:52 GMT+02:00 Mark Geisert : > Alessio Faina writes: >> Ok thanks, I've been able to find the character device under >> "/proc/sys/DosDevices/Global/deviceName"; now I'm stuck with the mmap >> implementation; when I do mmap in the userland program it returns me >> errno 19 (#define ENODEV 19 /* No such device */) obviously because >> I haven't set anything in the kernel module; there's a way to make visible a >> portion of memory to be used by the mmap in the kernel? The memory is Non > Paged >> and allocated with a ExAllocatePoolWithTag in 'win terms'. > > Does > http://stackoverflow.com/questions/29938573/accessing-kernel-memory-from-user-mode-windows > help to answer your question? If it does, you'll still have to decide > whether to translate the Windows calls there into Cygwin calls or instead > just localize the Windows calls in one user-level module and leave > everything else to Cygwin. > > ..mark > > > -- > Problem reports: http://cygwin.com/problems.html > FAQ: http://cygwin.com/faq/ > Documentation: http://cygwin.com/docs.html > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple