From: Alessio Faina <alessiofaina@gmail.com>
To: cygwin@cygwin.com
Subject: Re: File operations on a Windows Driver (character device)
Date: Tue, 19 May 2015 15:37:00 -0000 [thread overview]
Message-ID: <CACs=mWBEe2CqkN=tizTMcCXLxvbkwNat8Uch_CTPSaDgFCUmYQ@mail.gmail.com> (raw)
In-Reply-To: <loom.20150519T094146-560@post.gmane.org>
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@maxrnd.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
next prev parent reply other threads:[~2015-05-19 14:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 12:34 Alessio Faina
2015-05-18 15:30 ` Larry Hall (Cygwin)
2015-05-18 16:19 ` Alessio Faina
2015-05-19 8:52 ` Mark Geisert
2015-05-19 15:37 ` Alessio Faina [this message]
2015-05-20 5:18 ` Mark Geisert
2015-05-21 11:14 ` Alessio Faina
2015-05-21 18:20 ` Mark Geisert
2015-05-27 12:23 ` Corinna Vinschen
2015-05-27 15:59 ` Alessio Faina
2015-05-27 17:22 ` Eric Blake
2015-05-28 10:55 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACs=mWBEe2CqkN=tizTMcCXLxvbkwNat8Uch_CTPSaDgFCUmYQ@mail.gmail.com' \
--to=alessiofaina@gmail.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).