-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
bpo-33164: blake2 fix for HP-UX #13633
Conversation
Modules/_blake2/impl/blake2-impl.h
Outdated
@@ -140,6 +140,9 @@ static inline void secure_zero_memory(void *v, size_t n) | |||
{ | |||
#if defined(_WIN32) || defined(WIN32) | |||
SecureZeroMemory(v, n); | |||
#elif deifned(__hpux) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo, should be "defined"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is my upstream fix: BLAKE2/libb2@37062e5
configure.ac
Outdated
@@ -3527,7 +3527,9 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ | |||
getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \ | |||
getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \ | |||
if_nameindex \ | |||
madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What and why did you modify the configure script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact I got the fixes from a HP-UX specialist, if it works without the better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will remove the changes ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change comes actually from the original PR which broke it, 51aa35e#diff-67e997bcfdac55191033d57a16d1408a too much has been removed as opposed to the configure
script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configure.ac
needs to retain:
initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
memrchr mbrtowc mkdirat mkfifo \
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the patch I have sent via email:
# diff -U 1 configure.ac.orig configure.ac
--- configure.ac.orig 2019-05-28 14:34:58 +0000
+++ configure.ac 2019-05-28 14:38:23 +0000
@@ -3526,6 +3526,8 @@
getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
if_nameindex \
+ initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
+ memrchr mbrtowc mkdirat mkfifo \
mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
Please reinstantiate otherwise all of these won't be available at compile time.
@dcarlier-afilias please readd otherwise people are back to the configure error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry about I merged the previous PR. I thought travis checked configure script is really generated from configure.ac.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Modules/_blake2/impl/blake2-impl.h
Outdated
@@ -140,6 +140,9 @@ static inline void secure_zero_memory(void *v, size_t n) | |||
{ | |||
#if defined(_WIN32) || defined(WIN32) | |||
SecureZeroMemory(v, n); | |||
#elif defined(__hpux) | |||
static void *(*const volatile memset_v)(void *, int, size_t) = &memset; | |||
memset_v(v, 0,n); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one misses a space after the second comma
Modules/_blake2/impl/blake2-impl.h
Outdated
@@ -140,6 +140,9 @@ static inline void secure_zero_memory(void *v, size_t n) | |||
{ | |||
#if defined(_WIN32) || defined(WIN32) | |||
SecureZeroMemory(v, n); | |||
#elif deifned(__hpux) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is my upstream fix: BLAKE2/libb2@37062e5
Backporting fix on blake2 side too.
@dcarlier-afilias looks very good now. Let me double check on the server tomorrow and then you can merge into master! Thank you very much for the quick reaction. |
I will merge this after @michael-o 's check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compiles for me on top of 0ae022c with my outstanding PR: https://github.com/python/cpython/pulls/michael-o. Would be nice if someone could take a look at them. They are trivial.
@methane please revert the merge. The modifications to autoconf script are incorrect. |
@tiran, why? It restores the |
@michael-o The commit d8b7551 only changes |
@tiran Mismatch between This PR resolves the mismatch. I'm sorry about merging #6286. |
I re-run |
Backporting fix on blake2 side too.
Fixes from @michael-o mainly.
https://bugs.python.org/issue33164