mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #871] Remove/audit FIXME and XXX comments #475
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#475
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jfoug on GitHub (Dec 8, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/871
When these get removed, please update this list. Also, if there are some that will not be 'fixed', then place comment after the item, and use ~~~strike out~~~ font for the filename. Looks like ~~~strike out~~~ does not work in code sections. Oh well. Move them to code blocks below the WIP block.
_THIS group_ is the main list of items still not handled.
Here are the ones where OMP_SCALE lists work has not been done on this one.
@magnumripper commented on GitHub (Dec 8, 2014):
Some of the
// XXXare just for OMP_SCALE. The faster the format, the more OMP_SCALE depends on what CPU you've got - modern Intel often wants much higher figures than AMD iirc. After tuning (I usually tune for Intel) I use to change the comment to something like// tuned for core i7(and sometimes// tuned for core i7 w/o HT).@magnumripper commented on GitHub (Dec 8, 2014):
On a related note I've played with the idea of adding a shared function for calling CPUID at runtime. We actually have it already in x86.S and x86-64.S but we might want a function that we can call from anywhere. Then we could pick OMP_SCALE depending on some parameters - not only Intel vs. AMD but also HT vs not and other things.
@magnumripper commented on GitHub (Dec 8, 2014):
It looks like it's the other way around, this is from current NT2 format:
I use XOP to distinguish between AMD and Intel but calling CPUID would be a lot nicer.
@jfoug commented on GitHub (Dec 8, 2014):
At some point, we really should build some form of auto-tuner for this (like in generic). It really can make a pretty big difference, and at the same time, over doing this can really make a -test=0 painful and SLOW 😴
It might even be good to have this be something in john_local.conf (a section), even down to the format level.
One huge issue here, is that OMP_SCALE is a #define that modifies things at compile time. I am not 100% sure this is something that can always be adjusted at run time, but it 'may' be able to fully do at runtime.
@magnumripper commented on GitHub (Dec 8, 2014):
More often than not, it's just a multiplier in init()
Most OpenCL formats can take a per-format conf setting for GWS, we could do the same for OpenMP using some shared code. But only a few very fast formats are "picky" about the multipler, most do fine with something lite 64 for slow formats and 1024 for semi-fast ones.
@magnumripper commented on GitHub (Dec 8, 2014):
But let's leave this alone until post Jumbo-1...
@jfoug commented on GitHub (Dec 8, 2014):
Certainly.
@jfoug commented on GitHub (Dec 9, 2014):
Here are the left over XXX (from ./src directory)
... Data moved to primary post on this thread ...
NOTE the raw hashes with OMP_SCALE 1 _SHOULD_ be handled prior to jumbo1 (IMHO)
e9baae1@jfoug commented on GitHub (Dec 9, 2014):
OK, the 'easy' ones are fixed. MANY of the others are non issues but more research stuff. Also the OMP_SCALE ones. The post right above this one, lists all the items left in the ./src directory.
I will start tackling the ones in ../run, but MANY of them are in python code where I do not have examples to work with.
@jfoug commented on GitHub (Dec 10, 2014):
What about adding a new option --omp-tune that does a tuning session inside --test ?? It really should not be all that hard to do. That way, if we added the ability of these tuning params to be put into john.local.conf (or john.conf), then a user could easily tune a pre-build JtR, and set the proper values?
I think it would take a new flag (in format.params) listing this format is tunable, possibly it would not need any additional flag, simply make a new format function that if it is not pointing to the default, lists that this format can OMP tune itself. How does that sound?? Certainly NOT for jumbo-1, but is this something that sounds interesting? If so, we might make this a feature request issue.
@magnumripper commented on GitHub (Dec 10, 2014):
Hmmm yes that is a good idea. For any format that does not hard code MAX_KEYS_PER_CRYPT or OMP_SCALE in a bad way, it should be as easy as core setting fmt->params.max_keys_per_crypt and benchmark. We could start with kpc==num_threads and then double kpc until performance drops (or does not increase). That would not even need a new format function.
@jfoug commented on GitHub (Dec 10, 2014):
Not usable in that manner. First off, fmt-params.max_keys_per_crypt should never be set down. What happens when you have mmx_coef==4 and md5_para==3 (i.e. 12), and you have 8 cores. Not a good solution.
But overall, ,the idea is great. Simply run bench, get results. double fmt-params.max_keys_per_crypt, run again, save results, and repeat, run until user exits.
In this manner, you would know some scaling factor. In fact, a scaling factor may be a better way to go, than a hard coded OMP_SCALE. That could even be 'hidden' from having to change ANY format. Upon running, if a format has the scaling factor set, then john core simply auto increases fmt->params.max_keys_per_crypt prior (or in) the format init.
It may then be good to add a flag to the formats that use OMP scaling (or do all OMP formats have scaling ??) so that a script could be made to first interrogate the list of formats, showing which ones 'can' be tuned, and then setting to loop through and tune them, hell, it could even update the john.local.conf with its findings. Simply start up the tuner before going to bed, and the next morning, you would have all formats running at 'ideal' levels.
I like this. I am going to make an enhancement about this. so we do not lose the information.
@magnumripper commented on GitHub (Dec 10, 2014):
[moved to #875]
@jfoug commented on GitHub (Dec 13, 2014):
I believe this issue can now be closed, but I want to give others a chance to look things over before I close it.
@frank-dittrich commented on GitHub (Dec 13, 2014):
There's at least one FIXME comment in
c3_fmt.cthat requires changes.What needs to be done:
s/DUMMY //@jfoug commented on GitHub (Dec 14, 2014):
@frank-dittrich please validate
502106dwith your hashes.* file(s)@frank-dittrich commented on GitHub (Dec 14, 2014):
@jfoug great, thanks.
@frank-dittrich commented on GitHub (Dec 14, 2014):
Would it be "better" to report the hard coded number of iterations for cryptmd5 and "rename"
algorithm specific tunable costtoiteration count(oriterations), at least as long as the format specific cost parameter is the number of iterations for all algorithms supported by crypt(3)?@jfoug commented on GitHub (Dec 14, 2014):
Are there other XXX or FIXME's that would hold up jumbo1 Frank has replied. It would be nice to hear from @magnumripper and @kholia about these. Yes, I know many of these are things that need to be looked at and fixed. But are any of them 'critical' for this jumbo?
If not, then I will re-assign this to the jumbo-2 (so it does not simply 'go away')
@magnumripper commented on GitHub (Dec 14, 2014):
I'm not aware of any that I feel responsible for and that needs a fix now.
@jfoug commented on GitHub (Dec 14, 2014):
I will wait a bit to hear from @kholia ( I will poke him directly with an email also) A lot of these are his. I really would like to hear from him. I feel none of them are show stoppers, and the open issue should just be moved to J2. But I will wait on him.
@frank-dittrich commented on GitHub (Dec 14, 2014):
Several of my FIXMEs also are comments added to Dhiru's code, because I felt something needed to be done, but I didn't have the energy...
@kholia commented on GitHub (Dec 15, 2014):
@jfoug I had a quick look and things are OK from my side as well. Go ahead 👍
@magnumripper commented on GitHub (Aug 18, 2016):
Closing. We'll start over with a similar issue some [very] rainy day