-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make HgfsConvertFromNtTimeNsec aware of 64-bit time_t on i386 #387
base: master
Are you sure you want to change the base?
Conversation
I verified that this function behaves as expected on x86_64, i386 with 32-bit time_t, and i386 with 64-bit time_t for the following values of ntTtime: UNIX_EPOCH-1, UNIX_EPOCH, UNIX_EPOCH+1, UNIX_S32_MAX-1, UNIX_S32_MAX, UNIX_S32_MAX+1, UNIX_S32_MAX*2+1 I did not verify whether the use of Div643264 is optimal, performance wise.
Hm, a couple notes upon further inquiry:
I can update the pull request addressing all of these if you folks indicate the desired course of action for (2) and (3). |
@beevvy, VMware has approved your signed contributor license agreement. |
Was this forgotten? I don't see it in the git log. |
Not intentionally dropped. The resources for updating this feature have not been monitoring this. |
Add upstream pending patch[1] to fix time_t on 32-bit platform. [1]: vmware/open-vm-tools#387 Fixes: http://autobuild.buildroot.net/results/eb3dfe679536b578a0f16762312a96ada7162095/ Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Add upstream pending patch[1] to fix time_t on 32-bit platform. [1]: vmware/open-vm-tools#387 Fixes: http://autobuild.buildroot.net/results/eb3dfe679536b578a0f16762312a96ada7162095/ Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Add upstream pending patch[1] to fix time_t on 32-bit platform. [1]: vmware/open-vm-tools#387 Fixes: http://autobuild.buildroot.net/results/eb3dfe679536b578a0f16762312a96ada7162095/ Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit 75b02d6) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Add upstream pending patch[1] to fix time_t on 32-bit platform. [1]: vmware/open-vm-tools#387 Fixes: http://autobuild.buildroot.net/results/eb3dfe679536b578a0f16762312a96ada7162095/ Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit 75b02d6) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Thanks for your contribution. Your contribution will go through a review process at VMware. An update will be provided once the review is completed. I have started to work on PR. It would be great if you could please share your test setup or steps you performed to test the fix. |
Hi @VinodKumarGoku, I'm sorry, but I've since lost interest in this patch. Fur sure, this was developed against an i386 environment based on musl libc. This of course also applies to i386 glibc systems with 64-bit time_t, but I don't know what is the state of glibc nowadays in this regard. Perhaps @kraj or @giuliobenetti could help you here, I believe they applied this patch in Yocto and Buildroot, respectively. Please do keep in mind my comments from #387 (comment) - they are probably still relevant. |
Hi @beevvy and @VinodKumarGoku, this patch is still used in Buildroot and to reproduce the bug and check it is solved with this patch you can:
After the builds fail you can pick this pending patch and copy and paste it to buildroot/package/openvmtools/0012-The-pending-patch.patch And then rebuild the single package with:
That way the build failure should disappear. |
We support musl in Yocto/OpenEmbedded which has moved to using 64bit time_t on 32bit hosts. You can perhaps also reproduce the problem with riscv32 and glibc. |
The change incorporates the support of 64 bit time epoch conversion from Windows NT time to Unix Epoch time on i386. Addresses pull request: #387
I verified that this function behaves as expected on x86_64, i386 with
32-bit time_t, and i386 with 64-bit time_t for the following values of
ntTtime:
UNIX_EPOCH-1, UNIX_EPOCH, UNIX_EPOCH+1, UNIX_S32_MAX-1, UNIX_S32_MAX,
UNIX_S32_MAX+1, UNIX_S32_MAX*2+1
I did not verify whether the use of Div643264 is optimal, performance
wise.