mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1795] Adjust master files, to reduce merge problems, and to document (in code) differences between master and jumbo #1199
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#1199
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 (Oct 1, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1795
Now with the addition of JUMBO_JTR define, we should be able to get all source (most at least) to be 100% merge easy. I think we can also due the same for all documentation. If docs are in core, then we will have to add an annotation file (a RULES.jumbo, etc), and then add extra lines in the original jumbo that point out that there is jumbo specific documentation over a specific area. For files which are 100% jumbo, who cares, they do not exist in the master doc tree, BUT the ones that do, we can edit them to be 'easy' to merge.
@jfoug commented on GitHub (Oct 1, 2015):
First step is to get a list of ALL core files where they are likely merge problems, then simply start working through them. We probably should build a script that points out the files with problems. Then once we get the source/docs/runtime clean, we can run the script occasionally, to find any rough spots added. Hmm, I wonder if we could even CI this, lol. (actually, we certainly could, if it is a clean running script!)
@magnumripper commented on GitHub (Oct 1, 2015):
There is no RoI in overdoing this: For most already existing stuff I can do it whenever faced with an actual problem (if ever). But for new stuff, this is great. Complicated differences (eg. with bitmaps in loader.c) will be much easier to follow if we simply keep the old code as reference and add new
#if JUMBO_JTR. It can be great even NOT considering merging!Also, we have one file that is so totally different it would only be messier - wordlist.c. I think we should change the tab setting for that file to 4, there's no point in trying to maintain any core stuff in that one.
@jfoug commented on GitHub (Oct 2, 2015):
Wordlist.c simply needs to be removed from jumbo, and wordlist_j.c needs
to be created. Yes, that thing is the spaghetti bowl of all spider
webs. No F'n way should we ever try to make that an enhanced master
file. NOTE, that is not to say that we really shouldn't rewrite it, I
KNOW we should. I think both of us have put so much sweat into that
thing, that it is simply so complex as to be a real nightmare. I used
to know it really well. Now I would rather work on rules.c or even
compiler.c than touch wordlist, lol. And I KNOW you know how bizarre
those code bases are.
A lot of highly optimized IO source are this way. It may actually
benefit us to have many source files (or several), each optimized to
certain systems or libraries, and then have the wordlist_j.c 'use' these
real IO code, and the wordlist_j.c be more of the common glue layer.
But that is SUCH a deviation from master that there is 100% no going
back. However, we have already diverged so far, that there is really
very little that could be used anyway.
On 10/1/2015 6:46 PM, magnum wrote:
@jfoug commented on GitHub (Oct 2, 2015):
I have done formats.c (before I start merging -test and -test-full), and sent a diff to you off line. Please look that over and get back to me. I have not checked it in. I wanted to first hear if this type of coding would actually be helpful. It did not take a whole lot, and the file is just as readable as it was before (well, a tiny bit more complex, BUT surprisingly little needed changed).
Now, you may be right, that overall, we do not need to take it to completion. However, I think this topic is not a bad one. We certainly could get jumbo much 'closer' to master, as far as the auto-tools such as git-patching matter, without LOSING human maintainability/readability. I see that as nothing but a win. Yes, it is 'busy' work, getting to that point, and you have to test VERY carefully, so that something does not end up getting compiled out on jumbo that we did not want. And YES, I do understand, this code will NEVER be built, without JUMBO_JTR define, but that is simply a tool, to allow us to bend the code into a form that patching should hopefully have NO problems with.
It may also point out, where we either have latent problems in jumbo OR where there are latent problems in master. I already saw one area I question a bit. That was around format initialization, where jumbo may be doing it too early, OR master may be doing it too late. However, even if that is NOT an issue (I hope it is not), having this type code in there DOES document pretty well, the expectations and changes seen in jumbo enhanced over master (at least on 'easy' code like formats.c). I do not even WANT to think about wordlist.c My head would simply explode before getting that one done.
@magnumripper commented on GitHub (Oct 2, 2015):
The fmt_init() is called earlier in Jumbo because we need it before the max length tests - many Jumbo formats change max. depending on encoding etc. So it's not a bug on either side, just a difference.
I already answered your mail, but I also see now it fails building as-is! Perhaps you already started with the changes you planned, so it's kind of incomplete because of that?
@magnumripper commented on GitHub (Oct 2, 2015):
Scrap that, it was because I lacked the commit defining JUMBO_JTR 😆
@jfoug commented on GitHub (Oct 2, 2015):
No, I think there was still a problem (I may have fixed it and re-diffed, I just dont remember). But some of that was in some 'prelim' code for the separation of bench timings vs ST. They will just be done as params when I get to it.
@jfoug commented on GitHub (Oct 2, 2015):
ahh, so you were building core code, lol :)
Not supposed to do it that way. It was not 'designed' to ever be buildable by core. Just has 'equal' core code in there for reference, AND so that merging is a no-brainer
@jfoug commented on GitHub (Oct 2, 2015):
Question (I think I know the answer)
Would we ever care about merging back the other direction (from bleed to master?) I would assume no, since Solar never uses our enhancements anyway, but I just want to ask in case. The way I did formats.c it would be easy to merge code, but only in 1 direction. I doubt I could do this both ways.
@jfoug commented on GitHub (Oct 2, 2015):
More fitting title.
@magnumripper commented on GitHub (Oct 2, 2015):
Yeah we probably don't care about that. However I am pretty sure this "clean merge" file would be a lot easier to merge in that direction too.
@jfoug commented on GitHub (Oct 2, 2015):
Are there other master source that would benefit from this? I know wordlist.c is a no go. Would john.c also be a no go? I bet it may be a bit ugly itself.
But what about inc.c, rules, rpp, etc?
@magnumripper commented on GitHub (Oct 2, 2015):
Let's not do it just for the sake of it. We'll do it when adding new stuff, or when I actually see a nasty merge conflict.
@magnumripper commented on GitHub (Oct 2, 2015):
If you feel like coding, I would suggest #1746 😉
@jfoug commented on GitHub (Oct 2, 2015):
ya, I know. I started on that one a bit. I think I will be totally re-writing things. I will keep the current LL-RDP code, for validation, and for building test strings. But I think I will not use it (or not use it exclusively to build the actual scripts. It just does not fit that well. It works, but to make it generic, I get an even more limited usage of dynamic than it is. Dynamic has some shortcomings. Certain 'complex' expressions can NOT be handled, with the scratch variables we have in dynamic. We have basically a 2 bit 'complex instruction' Turing machine. But it is reduced from that, when try to generically go from the polish notation the parser provides, into a flat left to right sequential representation needed for dyan.
But yes, you are right, I do need to continue on that code.
@magnumripper commented on GitHub (Oct 2, 2015):
The dynamic compiler format is awesome, it's among the top three improvements after Jumbo-1 (I guess along with GPU-side mask mode and AVX2/AVX512/NEON/Altivec support). I'm pretty relaxed about #1746 since the auto-generated self-tests will show what works and what doesn't (and BTW how cool is that!!) but it would be even more awesome with no known bugs.