Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

argon2 build without optimizations #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hakerdefo
Copy link

argon2 build without optimizations as the previous build caused illegal instructions on certain CPUs.

argon2 build without optimizations as the previous build caused illegal instructions on certain CPUs.
@demmm
Copy link
Contributor

demmm commented Jan 1, 2023

As mentioned on Matrix, Argon2 has not changed in over 2 years, issue with keepassxc strated just a week ago on your system, so not changing Argon2 for all users because of your system, until clearer what you have going on. As asked before, full SysInfo log is needed.

@hakerdefo
Copy link
Author

hakerdefo commented Jan 3, 2023

@demmm
I tested argon2 standalone and it gave me the following error,

Illegal instruction (core dumped)

Apparently when build with optimization, argon2 will error out with illegal instructions on many processors. Arch Linux fixed this exact bug in Jan 8, 2018,

archlinux/svntogit-packages@fdf4c3b

The same bug reported in Debian in 2016,

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=828779

And, in Fedora in 2016,

https://bugzilla.redhat.com/show_bug.cgi?id=1512845

Why it didn't occur in my system previously? Well, I think I might have used AES-KDF in Keepassxc previously and hence argon2 wasn't used.

@demmm
Copy link
Contributor

demmm commented Jan 3, 2023

Again, SysInfo is needed, keepassxc is used by many in KaOS (and as soon there is anything wrong with keepassxc, it is reported immediately), so not changing Argon2 for one user who so far refuses to provide much needed logs.

@hakerdefo
Copy link
Author

Again, SysInfo is needed, keepassxc is used by many in KaOS (and as soon there is anything wrong with keepassxc, it is reported immediately), so not changing Argon2 for one user who so far refuses to provide much needed logs.

Here you go buddy,

https://go.0xfc.de/1n3rz1

@demmm
Copy link
Contributor

demmm commented Jan 3, 2023

Nothing in the logs that shows a cause for this issue.
KaOS is much more aligned with Gentoo, then distro's you link. Gentoo sets OPT still as 1 by default, if SSE2 is enabled:
https://gitweb.gentoo.org/repo/gentoo.git/commit/app-crypt/argon2?id=b71890e7ec94187258bbd0de4553d8dd8d339efd

More research needed before this PR will be considered. Will keep you posted.
See the discussion:
P-H-C/phc-winner-argon2#113

@hakerdefo
Copy link
Author

@demmm
Okay, I hope you won't forget about this one and will get around to resolving this.

@hakerdefo
Copy link
Author

hakerdefo commented Jan 3, 2023

@demmm

I compiled the argon2 package on my system using makepkg without changing any flags in the default PKGFILE and then installed the compiled binary and guess what? It works like a charm. So for me, the issue is gone but hopefully, you'll dig deep and may be figure out why pre-compiled binary ended-up throwing illegal instructions error on my CPU.

P.S. The working self compiled binary perhaps explains why Gentoo hasn't changed OPT as it is a source based distribution and users compile the stuff on their own machines instead of using pre-built binaries.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants