Regarding ProbeForRead

Hello Frnds,

We have a pci express card and 64 bit driver for it. We use ProbeFor Read to verify the data buffer. When we are compiling 32 bit application with LARGEADDRESSAWARE we are getting address above 2GB as we want. But ProbeForRead is failing. Any workaround.

Regards
Ravi

Check out the all-new Messenger 9.0! Go to http://in.messenger.yahoo.com/

Did you actually read documentation - it clearly states that ProbeForRead() will fail on any address in the
kernel address space. LARGEADDRESSAWARE is just a compiler option.Therefore, your code is going to fail on any system that is configured with 2G of kernel address space -VirtualAlloc()and friends will simply refuse to handle the address in this range even if you specify it as a desired base address for your buffer.

In any case, I just love the statement “when we are compiling 32 bit application with LARGEADDRESSAWARE we are getting address above 2GB as we want”. Are you defining the address right at the compile time, i.e. hardcoding it, or what??? After all, the fact that the app is able to handle addresses above 2G does not necessarily mean that the system will allow allocation of UM addresses in this range - it depends on kernel configuration…

Anton Bassov

> kernel address space. LARGEADDRESSAWARE is just a compiler option.Therefore, your code is

going to fail on any system that is configured with 2G of kernel address space

How is this related to 64bit systems?


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

>When we are compiling 32 bit application with LARGEADDRESSAWARE we are getting address

above 2GB as we want. But ProbeForRead is failing

For me, this looks like MS’s bug.

Try using IoAllocateMdl+MmProbeAndLockPages under the __try/__except instead just to probe, with MmUnlockPages/IoFreeMdl after this.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

What are you actually trying to test here? If you want to validate operation
of the pci card for PAs above 4gb there are other ways to do that, for
example using /nolowmem in boot.ini.

Mark Roddy

On Wed, Jan 14, 2009 at 2:29 AM, Ravi Agrawal
wrote:

> Hello Frnds,
>
> We have a pci express card and 64 bit driver for it. We use ProbeFor
> Read to verify the data buffer. When we are compiling 32 bit application
> with LARGEADDRESSAWARE we are getting address above 2GB as we want. But
> ProbeForRead is failing. Any workaround.
>
> Regards
> Ravi
>
>
> Check out the all-new Messenger 9.0! Go to
> http://in.messenger.yahoo.com/
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Helo Maxim,

I tried that i get successful mdl but when i try to copy memory using RtlMoveMemory it crashes and give me PAGE_FAULT_ON_NONPAGED_AREA

Regards
Ravi

— On Wed, 14/1/09, Maxim S. Shatskih wrote:

> From: Maxim S. Shatskih
> Subject: Re:[ntdev] Regarding ProbeForRead
> To: “Windows System Software Devs Interest List”
> Date: Wednesday, 14 January, 2009, 2:58 PM
> >When we are compiling 32 bit application with
> LARGEADDRESSAWARE we are getting address
> >above 2GB as we want. But ProbeForRead is failing
>
> For me, this looks like MS’s bug.
>
> Try using IoAllocateMdl+MmProbeAndLockPages under the
> try/ except instead just to probe, with
> MmUnlockPages/IoFreeMdl after this.
>
> –
> Maxim S. Shatskih
> Windows DDK MVP
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars
> visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online
> at http://www.osronline.com/page.cfm?name=ListServer

Did you know? You can CHAT without downloading messenger. Go to http://in.webmessenger.yahoo.com/

Hello Mark

I am trying to Test User data buffer pointer i.e i am getting through ioctl… I mean in application we allocate memory in which we have data which is to be compressed. We pass that pointer through sturcture in ioctl.

Regards
Ravi

— On Wed, 14/1/09, Mark Roddy wrote:

> From: Mark Roddy
> Subject: Re: [ntdev] Regarding ProbeForRead
> To: “Windows System Software Devs Interest List”
> Date: Wednesday, 14 January, 2009, 7:25 PM
> What are you actually trying to test here? If you want to
> validate operation
> of the pci card for PAs above 4gb there are other ways to
> do that, for
> example using /nolowmem in boot.ini.
>
> Mark Roddy
>
>
> On Wed, Jan 14, 2009 at 2:29 AM, Ravi Agrawal
> wrote:
>
> > Hello Frnds,
> >
> > We have a pci express card and 64 bit driver for
> it. We use ProbeFor
> > Read to verify the data buffer. When we are compiling
> 32 bit application
> > with LARGEADDRESSAWARE we are getting address above
> 2GB as we want. But
> > ProbeForRead is failing. Any workaround.
> >
> > Regards
> > Ravi
> >
> >
> > Check out the all-new Messenger 9.0! Go to
> > http://in.messenger.yahoo.com/
> >
> >
> > —
> > NTDEV is sponsored by OSR
> >
> > For our schedule of WDF, WDM, debugging and other
> seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR
> Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars
> visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online
> at http://www.osronline.com/page.cfm?name=ListServer

Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/

LARGEADDRESSAWARE merely means that if you are running in a configuration
that allows more than 2GB of user-mode address space, that your program will
be granted more than 2GB of user-mode address space. A program which is not
so marked will be limited to 2GB of user-mode address space independent of
what the OS is *capable* of giving.

In Win64, this means you will get nearly 4GB of user-mode address space; in
Win32, you will get nearly 3GB if booted in a 3GB configuration (/3GB prior
to Vista), otherwise you get nearly 2GB.
joe

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Wednesday, January 14, 2009 3:48 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Regarding ProbeForRead

Did you actually read documentation - it clearly states that ProbeForRead()
will fail on any address in the kernel address space. LARGEADDRESSAWARE is
just a compiler option.Therefore, your code is going to fail on any system
that is configured with 2G of kernel address space -VirtualAlloc()and
friends will simply refuse to handle the address in this range even if you
specify it as a desired base address for your buffer.

In any case, I just love the statement “when we are compiling 32 bit
application with LARGEADDRESSAWARE we are getting address above 2GB as we
want”. Are you defining the address right at the compile time, i.e.
hardcoding it, or what??? After all, the fact that the app is able to handle
addresses above 2G does not necessarily mean that the system will allow
allocation of UM addresses in this range - it depends on kernel
configuration…

Anton Bassov


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

I doubt this is an OS bug. The disassembly in ProbeForXxx is pretty straightforward and from it one can easily figure that the probe address is parameterized.

Anton is correct in that unless the kernel is 64-bit, booted with /3GB, or booted with /userva, Mm won’t return a >2gb based allocation to PreviousMode==UserMode callers.

The above mentioned boot options also update the probe address accordingly, at least the last time that I checked.

(Resend due to Lyris failure breakageness again for the third time. Gave up trying to form a reply that Lyris wouldn’t reject via OWA && tmail on account of utf8/base64 stupidity and started a new thread just so I could get the reply out. There went 45 minutes of my life…)

? S

> I tried that i get successful mdl but when i try to copy memory using RtlMoveMemory it crashes and

give me PAGE_FAULT_ON_NONPAGED_AREA

Then maybe you have some other bug?


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Hi Skywing,

I think those switch is applied to 32 bit O.S http://support.microsoft.com/kb/316739. Have you tried on 64 bit O.S

Regards
Ravi
— On Wed, 14/1/09, Skywing wrote:

> From: Skywing
> Subject: Re: [ntdev] Regarding ProbeForRead
> To: “Windows System Software Devs Interest List”
> Date: Wednesday, 14 January, 2009, 11:11 PM
> I doubt this is an OS bug. The disassembly in ProbeForXxx is
> pretty straightforward and from it one can easily figure
> that the probe address is parameterized.
>
> Anton is correct in that unless the kernel is 64-bit,
> booted with /3GB, or booted with /userva, Mm won’t
> return a >2gb based allocation to PreviousMode==UserMode
> callers.
>
> The above mentioned boot options also update the probe
> address accordingly, at least the last time that I checked.
>
> (Resend due to Lyris failure breakageness again for the
> third time. Gave up trying to form a reply that Lyris
> wouldn’t reject via OWA && tmail on account of
> utf8/base64 stupidity and started a new thread just so I
> could get the reply out. There went 45 minutes of my
> life…)
>
> – S
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars
> visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online
> at http://www.osronline.com/page.cfm?name=ListServer

Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/

They are definitely 32-bit only options.

  • S

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Ravi Agrawal
Sent: Thursday, January 15, 2009 2:27 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Regarding ProbeForRead

Hi Skywing,

I think those switch is applied to 32 bit O.S http://support.microsoft.com/kb/316739. Have you tried on 64 bit O.S

Regards
Ravi
— On Wed, 14/1/09, Skywing wrote:

> From: Skywing
> Subject: Re: [ntdev] Regarding ProbeForRead
> To: “Windows System Software Devs Interest List”
> Date: Wednesday, 14 January, 2009, 11:11 PM
> I doubt this is an OS bug. The disassembly in ProbeForXxx is
> pretty straightforward and from it one can easily figure
> that the probe address is parameterized.
>
> Anton is correct in that unless the kernel is 64-bit,
> booted with /3GB, or booted with /userva, Mm won’t
> return a >2gb based allocation to PreviousMode==UserMode
> callers.
>
> The above mentioned boot options also update the probe
> address accordingly, at least the last time that I checked.
>
> (Resend due to Lyris failure breakageness again for the
> third time. Gave up trying to form a reply that Lyris
> wouldn’t reject via OWA && tmail on account of
> utf8/base64 stupidity and started a new thread just so I
> could get the reply out. There went 45 minutes of my
> life…)
>
> - S
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars
> visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online
> at http://www.osronline.com/page.cfm?name=ListServer

Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer