delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/05/19/10:10:35

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; q=dns; s=default; b=D7
4k7jran4xvZq66RzheW6eUsHAaiWLA7ijqr5M5+ndfUVAvkOESodzjttEv+QU0fD
cB56wJ7pP1myfmjYZfRRGirKCp7TuCDe/z0Psbsk/dxK/p+VLsv7h7bTrlzEfcbw
NCnfbfs015n0ODRtomYD6SFeLUvt+5FeFwysFayLA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; s=default; bh=y2oKZS+o
404D97VtScD4V4a+CGQ=; b=dAq53AJyOC5S36b6Ti7nikHZV9AAXRGZIxGlgMCo
EJF8526p9JhUMQPB7Mwrmi4TyOwNM4ulE6AByl+e0+SJOodKL7wq3A/4f0QkZMTJ
mDST4qo5/+2mfp7HHraNrCyq4YimdZ8kE2UF1j3nS0xHUp3HDPCExouv4uLOCv+x
fQc=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
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)
In-Reply-To: <loom.20150519T094146-560@post.gmane.org>
References: <CACs=mWDRGh9KZBT45=8yy4J6h62v0RNYxczV91qRhhb8LcfY4Q AT mail DOT gmail DOT com> <5559FB9E DOT 3040200 AT cygwin DOT com> <CACs=mWCO8ejvsufP3C_HFAiKDrcsanGZ+J_EuQQGOm+u30T_zg AT mail DOT gmail DOT com> <loom DOT 20150519T094146-560 AT post DOT gmane DOT org>
Date: Tue, 19 May 2015 16:09:44 +0200
Message-ID: <CACs=mWBEe2CqkN=tizTMcCXLxvbkwNat8Uch_CTPSaDgFCUmYQ@mail.gmail.com>
Subject: Re: File operations on a Windows Driver (character device)
From: Alessio Faina <alessiofaina AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

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 <mark AT maxrnd DOT com>:
> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019