- From a14ef98b4e9fe38e4554368bad3515f81af98765 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Tue, 30 Jan 2024 14:53:27 +0100
- Subject: [PATCH 1/3] bintarball: Add "Download" section to README
- Add "Download" section to README and fix URL (s/alpha/testing/)
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/README.bintarball.txt | 20 ++++++++++++--------
- 1 file changed, 12 insertions(+), 8 deletions(-)
- diff --git a/cygwin/README.bintarball.txt b/cygwin/README.bintarball.txt
- index 4e65279..7241d35 100644
- --- a/cygwin/README.bintarball.txt
- +++ b/cygwin/README.bintarball.txt
- @@ -82,25 +82,29 @@ NFSv4.1 client and filesystem driver for Windows 10/11
- util-linux
- wget
- -
- #
- -# 4. Installation (as "Administrator"):
- +# 4. Download:
- #
- $ mkdir -p ~/download
- $ cd ~/download
- -$ wget 'http://www.nrubsig.org/people/gisburn/work/msnfs41client/releases/alpha/msnfs41client_cygwin_binaries_git148e927_20231214_12h31m.tar.bz2'
- +$ wget 'http://www.nrubsig.org/people/gisburn/work/msnfs41client/releases/testing/msnfs41client_cygwin_binaries_git148e927_20231214_12h31m.tar.bz2'
- +
- +
- +#
- +# 5. Installation (as "Administrator"):
- +#
- $ (cd / && tar -xf ~/download/msnfs41client_cygwin_binaries_git148e927_20231214_12h31m.tar.bz2 )
- $ /sbin/msnfs41client install
- #
- -# 5. Deinstallation:
- +# 6. Deinstallation:
- #
- $ (set -x ; cd / && tar -tf ~/download/msnfs41client_cygwin_binaries_git148e927_20231214_12h31m.tar.bz2 | while read i ; do [[ -f "$i" ]] && rm "$i" ; done)
- #
- -# 6. Usage:
- +# 7. Usage:
- #
- # Run the NFSv4 client daemon:
- @@ -135,7 +139,7 @@ $ /sbin/nfs_mount
- #
- -# 7. Notes:
- +# 8. Notes:
- #
- - Idmapping (including uid/gid mapping) between NFSv4 client and
- NFSv4 server works via /lib/msnfs41client/cygwin_idmapper.ksh,
- @@ -204,7 +208,7 @@ $ /sbin/nfs_mount
- #
- -# 8. Known issues:
- +# 9. Known issues:
- #
- - The kernel driver ("nfs41_driver.sys") does not yet have a
- cryptographic signature for SecureBoot - which means it will only
- @@ -251,7 +255,7 @@ $ /sbin/nfs_mount
- #
- -# 9. Notes for troubleshooting && finding bugs/debugging:
- +# 10. Notes for troubleshooting && finding bugs/debugging:
- #
- - nfsd_debug.exe has the -d option to set a level for debug
- output.
- --
- 2.43.0
- From 7a8dcccf973518dc012813b91921f7ec66857232 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Tue, 30 Jan 2024 14:56:19 +0100
- Subject: [PATCH 2/3] daemon: Always flush debug output
- Always flush debug output, to make sure the ordering of debug, error
- and log messages are correct.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/daemon_debug.c | 37 +++++++++++++++++--------------------
- 1 file changed, 17 insertions(+), 20 deletions(-)
- diff --git a/daemon/daemon_debug.c b/daemon/daemon_debug.c
- index ba6fb10..3f0bc54 100644
- --- a/daemon/daemon_debug.c
- +++ b/daemon/daemon_debug.c
- @@ -35,7 +35,8 @@ static int g_debug_level = DEFAULT_DEBUG_LEVEL;
- void set_debug_level(int level) { g_debug_level = level; }
- -FILE *dlog_file, *elog_file;
- +static FILE *dlog_file;
- +static FILE *elog_file;
- #ifndef STANDALONE_NFSD
- void open_log_files()
- @@ -72,36 +73,34 @@ void open_log_files()
- void dprintf(int level, LPCSTR format, ...)
- {
- - if (level <= g_debug_level) {
- - va_list args;
- - va_start(args, format);
- - fprintf(dlog_file, "%04x: ", GetCurrentThreadId());
- - vfprintf(dlog_file, format, args);
- -#ifndef STANDALONE_NFSD
- - fflush(dlog_file);
- -#endif
- - va_end(args);
- - }
- + if (level > g_debug_level)
- + return;
- +
- + va_list args;
- + va_start(args, format);
- + (void)fprintf(dlog_file, "%04x: ", (int)GetCurrentThreadId());
- + (void)vfprintf(dlog_file, format, args);
- + (void)fflush(dlog_file);
- + va_end(args);
- }
- /* log events (mount, umount, auth, ...) */
- void logprintf(LPCSTR format, ...)
- {
- SYSTEMTIME stime;
- - GetLocalTime(&stime);
- + GetLocalTime(&stime);
- va_list args;
- va_start(args, format);
- - (void)fprintf(dlog_file, "# LOG: ts=%04d-%02d-%02d_%02d:%02d:%02d:%04d"
- + (void)fprintf(dlog_file,
- + "# LOG: ts=%04d-%02d-%02d_%02d:%02d:%02d:%04d"
- " thr=%04x msg=",
- (int)stime.wYear, (int)stime.wMonth, (int)stime.wDay,
- (int)stime.wHour, (int)stime.wMinute, (int)stime.wSecond,
- (int)stime.wMilliseconds,
- (int)GetCurrentThreadId());
- (void)vfprintf(dlog_file, format, args);
- -#ifndef STANDALONE_NFSD
- (void)fflush(dlog_file);
- -#endif
- va_end(args);
- }
- @@ -109,11 +108,9 @@ void eprintf(LPCSTR format, ...)
- {
- va_list args;
- va_start(args, format);
- - fprintf(elog_file, "%04x: ", GetCurrentThreadId());
- - vfprintf(elog_file, format, args);
- -#ifndef STANDALONE_NFSD
- - fflush(elog_file);
- -#endif
- + (void)fprintf(elog_file, "%04x: ", (int)GetCurrentThreadId());
- + (void)vfprintf(elog_file, format, args);
- + (void)fflush(elog_file);
- va_end(args);
- }
- --
- 2.43.0
- From 9ebdfe42aff5d1ceadfe138c6b1887fb054aeb3d Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Tue, 30 Jan 2024 14:57:49 +0100
- Subject: [PATCH 3/3] sys: Fix 'C28145: "The opaque MDL structure should not be
- modified by a driver"'-warnings
- Fix 'C28145: "The opaque MDL structure should not be modified by a
- driver"'-warnings.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41_driver.c | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
- diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
- index 75813dc..754b704 100644
- --- a/sys/nfs41_driver.c
- +++ b/sys/nfs41_driver.c
- @@ -804,7 +804,14 @@ NTSTATUS marshal_nfs41_rw(
- sizeof(entry->u.ReadWrite.offset));
- tmp += sizeof(entry->u.ReadWrite.offset);
- __try {
- +#pragma warning( push )
- +/*
- + * C28145: "The opaque MDL structure should not be modified by a
- + * driver.", |MDL_MAPPING_CAN_FAIL| is the exception
- + */
- +#pragma warning (disable : 28145)
- entry->u.ReadWrite.MdlAddress->MdlFlags |= MDL_MAPPING_CAN_FAIL;
- +#pragma warning( pop )
- entry->buf =
- MmMapLockedPagesSpecifyCache(entry->u.ReadWrite.MdlAddress,
- UserMode, MmNonCached, NULL, TRUE, NormalPagePriority);
- @@ -3838,7 +3845,14 @@ retry_on_link:
- RxFreePool(entry);
- goto out;
- }
- +#pragma warning( push )
- +/*
- + * C28145: "The opaque MDL structure should not be modified by a
- + * driver.", |MDL_MAPPING_CAN_FAIL| is the exception
- + */
- +#pragma warning (disable : 28145)
- entry->u.Open.EaMdl->MdlFlags |= MDL_MAPPING_CAN_FAIL;
- +#pragma warning( pop )
- MmProbeAndLockPages(entry->u.Open.EaMdl, KernelMode, IoModifyAccess);
- }
- @@ -4395,7 +4409,15 @@ NTSTATUS nfs41_QueryDirectory(
- RxFreePool(entry);
- goto out;
- }
- +#pragma warning( push )
- +/*
- + * C28145: "The opaque MDL structure should not be modified by a
- + * driver.", |MDL_MAPPING_CAN_FAIL| is the exception
- + */
- +#pragma warning (disable : 28145)
- entry->u.QueryFile.mdl->MdlFlags |= MDL_MAPPING_CAN_FAIL;
- +#pragma warning( pop )
- +
- MmProbeAndLockPages(entry->u.QueryFile.mdl, KernelMode, IoModifyAccess);
- entry->u.QueryFile.filter = Filter;
- --
- 2.43.0
msnfs41client: Patch for README+buildwarnings+misc, 2024-01-30
Posted by Anonymous on Tue 30th Jan 2024 15:11
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.