Operatings with 64-bit integers in a kernel driver

Hello,

I am developing a kernel driver that needs to use some cryptographic
functions (encryption, authentication…). Since the crytpo-related code
needs to be shared accoss multiple platforms I decided to port the
libsodium cryptographic library to the kernel world.

I successfully managed to compile a test driver that uses the library.
Unfortunately, the library performs some 64-bit integer operations which
are translated into function calls. The problem is that the kernel
(namely, ntoskrnl.exe) does not export them (on Windows 8.1 at least),
so the driver does not load. Precisely, the following routines cause the
trouble: _aullshr, _allmul, _allshl, _allshr, _aullrem, _alldiv.

Is there a way around this (e.g. changing some compiler settings etc.)?
I will try to compile the driver with WDK7 but I am not sure whether it
really helps.

Best regards

Martin Dr8b

Dne 1/26/2017 v 5:24 AM Jan Bottorff napsal(a):

If you use the enterprise WDK, I believe you can specify which win 10
WDK environment you build against.

Jan


*From:* xxxxx@lists.osr.com
on behalf of
> xxxxx@gmail.com
> Sent: Wednesday, January 25, 2017 4:29:13 PM
> To: Windows System Software Devs Interest List
> Subject: RE:[ntdev] Are Side-by-Side WDK 10 Versions Necessary?
>
> So I’ve largely answered my own question. I went back and diffed the
> WDK source, and there are clearly differences that would cause
> compilation/build errors if coding to the new WDK and then compiled
> for the previous.
>
> Anyone know of any run time concerns running 1607 drivers on 1511 or 1507?
>
> It’s looking like I should try to get the 1507 wdk but I can’t find an
> installer. Anyone have one? I’ve reached out to Microsoft at least
> twice about this, but never talk to the right person. Really looking
> forward to supporting the new Creator version around the corner…
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at:
> http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at
> http:
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at:
> http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at
> http:</http:></http:></http:></http:></http:></http:>

Microsoft compilers perform 64 operations natively.

Hello,

just after I sent my question to this list, I realised I linked the
driver to a bad (usermode) static library. So, the problem was not
related to 64-bit integers in any way. 32-bit kernels export the
routines I mentioned, 64-bit ones do not since there is no need.

Martin Dráb

Dne 26. 1. 2017 v 17:32 xxxxx@broadcom.com napsal(a):

Microsoft compilers perform 64 operations natively.


NTDEV is sponsored by OSR

Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:
></http:></http:></http:>