-
Notifications
You must be signed in to change notification settings - Fork 9
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 it work in modern kernels #1
base: master
Are you sure you want to change the base?
Conversation
): it does not, for me at least. Errors are the same, just on different lines, in functions ‘fh_ftrace_thunk’ and ‘fh_install_hook’ in trap_hook.c file. It's all way above my skill, but I might get it if someone explains. Mind taking a look-see? |
You need to add a specialized hook in the kernel and then arrange the module so as to employ it. Not sure why such hook is not readily available in regular kernels, but the patch to add it is quite straightforward, and apparently it is the only reliable way to do it nowadays. Please see attachment that works fine for me. Besides, I've found and fixed some small bugs in opcode processing but because the main repo looks like abandoned I'm not sure where to push the fixes yet. The attached patch is targeted for regular kernel 5.15.146. |
Ooops. op_emu legal?????????????????? just noticed this inconsistency, lol . Or I mistake? |
I'm definitely not a lawyer, but after browsing through some relevant headers and license files, I'd say it looks like attaching the GPL was incorrect here. This certainly does NOT make the code itself illegal, as it is a fork of some master tree that obviously allowed forking by its license. Therefore, it might be problematic to e.g. include this module as a part of some distribution product or to upstream it. But other than that, I basically see no problem. Just apply appropriate correction to the license file and that's it. |
@zhubr maybe but no, 1 author have ASPL but @mirh lisense own code under GPLv2. I no can change license back to ASPL because code in this project have code from @mirh. At the moment, code from two authors under incompatible licenses is mixed in one project. You can’t just take your previous license and return it. The code is mixed. I'm deleting my fork and all my work. If anyone needs changes, they are saved in a closed merge request. It's a pity. But okay. |
Not sure what's funnier.. That I wasn't subscribed to my own repo, or that my hunger for pedantry (that brought me into spending big time to find the credits for every single line) somehow made the code turn out unproperly copyrighted. Even if the standard terms applied (which I don't really think is the case, even though it's not explicitly stated anywhere) you can mix whatever you want with GPL as long as you aren't shipping the actual binaries that "physically" bind together the different object code. |
:D |
Hi! I'll use this opportunity to say tons of thanks for publishing this module! It lets me run Android x86_64 image on an old Core2 laptop which would otherwise be impossible because of some few opcodes missing. And BTW I'd like to give back a small usermode test and some bugfixes :) |
It's not even mine actually (I probably broke it more than I fixed), it was originally from a brazilian guy. Which AFAIR was exactly like trying to do something with android (on an athlon or core 2), but then upgraded his system and lost interest. But speaking of that.. I knew @maurossi used to ship a hacked up workaround at least in the past. Idk what has been of it? |
Hello everyone. I am the original author of this code. My part of it is MIT licensed. |
@sinetek Hello. Thank you for your response. On this repo https:/sinetek/xnu-amd license is
@mirh (and we all) can use
This files (exclude libudis86 real under Sorry for my English. I hope you understand me :) Maybe someone else will say something else about this. Maybe i just stupid i don't know :D |
The mac kernel is licensed with that, yes. But his modifications are MIT licensed, so we are good (and udis86 is licensed with BSD-2, so ditto). So, the only things left is how much of |
These licenses should all be compatible, with the notable exception of GPL, but I don't see how the GPL is relevant here? |
It is (GPL 2.0) present in the topmost LICENSE file of this repository, causing some confusion and panic to people. |
And it's the expected license of compiled linux modules. |
Well, if you intend to ship/share this module in binary form, yes. But imho this is becoming increasingly unlikely for a number of reasons anyway. Otherwise, for just publishing your module source, the license can be just anything (afaik). |
That's nonsense. NVIDIA's drivers do not ship GPL for example |
Since it turned out that the files written by @sinetek are under the MIT license, as he said, then using only them in this project does not affect the code under ASPL 2.0 and therefore the current GPLv2 license that @mirh chose for his changes does not cause any problems. So everything is fine and I panicked in vain. The only thing is that there is no mention of MIT in the files listed above, and if @sinetek allows (after all, he wrote the code), then the text of the MIT license could be added to these files, this would solve all the theoretical problems. Since the license cannot be implied, it must be explicit and explicitly stated. Yes, sometimes it’s just unnecessary bureaucracy. And we're all here for the fun. Sorry if my remark on licensing caused discomfort for someone :D The point is that I thought that the current GPL project contained code under ASPL, but judging by the author's response, this is not the case. So there are no problems. |
He can do that for his work, but I don't think he can relicense my whole
project.?
…On Wed, Mar 6, 2024 at 8:40 PM BLOGDRON ***@***.***> wrote:
Since it turned out that the files written by @sinetek
<https:/sinetek> are under the MIT license, as he said, then
using only them in this project does not affect the code under ASPL 2.0 and
therefore the current GPLv2 license that @mirh <https:/mirh>
chose for his changes does not cause any problems. So everything is fine
and I panicked in vain. The only thing is that there is no mention of MIT
in the files listed above, and if @sinetek <https:/sinetek>
allows (after all, he wrote the code), then the text of the MIT license
could be added to these files, this would solve all the theoretical
problems. Since the license cannot be implied, it must be explicit and
explicitly stated. Yes, sometimes it’s just unnecessary bureaucracy. And
we're all here for the fun.
Sorry if my remark on licensing caused discomfort for someone :D
The point is that I thought that the current GPL project contained code
under ASPL, but judging by the author's response, this is not the case. So
there are no problems.
—
Reply to this email directly, view it on GitHub
<#1 (comment)>, or
unsubscribe
<https:/notifications/unsubscribe-auth/ABNCTC7ULB23ZXC5DPWYM7LYW7ARDAVCNFSM6AAAAAA5VAEB5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBSGE4DIMBYGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
No one has the right to license someone else's code except the author. Licenses can only be compatible and different code under different licenses can exist in one project licensed as a work under any license compatible with all other licenses. At the moment, some licenses are not indicated explicitly in the text, but only indirectly in words. As a result, everything got confused. I can use code under the MIT license in my project under the GPL license, for example, but this does not mean that I relicense the MIT code under the GPL license, it means that the project as a whole is under the GPL, but part of the code is under the MIT license, this is possible because the licenses are compatible. That's all. The problem is that the code under ASPL is incompatible with the GPL, and the words that your changes are under MIT (this solves all problems) are just words and the text of the license for your code is not explicitly indicated, this creates confusion.
I'm not a lawyer. These are just my thoughts. Above I listed the files used in this project, if the author of these files claims that they are under MIT, and not under ASPL, then there are no problems and you just need to add the license text and the author’s copyright to these files, otherwise everything is ambiguous. I will not speak further on this matter. I think everything is clear to everyone. |
@zhubr, since it doesn't seem to be illegal, could you please help me build it? I've patched the kernel to add the hook but have no idea what it is or how to arrange the module so as to employ it. |
When using a patched kernel (with setup_invalid_op_handler function added) you can apply the following patch to this module: |
Thanks, that fixed that, but now I have an error in opemu.c:254 |
I haven't tried in 32-bit. Some details in the sources suggest that it was likely possible at some point. Moreover, 64-bit registers support in current version is actually incomplete and somewhat buggy. Some ifdefs might be necessary. I'd still like to hear if @mirh is interested in PRs and patches to this repository and willing to fix GPL/ASPL confusion by either updating the top LICENSE file or inserting license headers to individual source files so as to clear any subsequent doubts. Or, if not, maybe I'll clone and try to fix it myself (but no promises). |
FWIW I can even add you to the project.. I try to even stay away from linux these days, and it's not like even back then I understood much about registers and opcodes. As for the license, I just realized that we've had a problem here. We couldn't just wave away Meowthra's code because he literally wrote "all rights reserved" (which I guess legally isn't much different from just any generic copyright notice, but practically it rules out any other alternative good faith interpretation) |
Ok, if you are not really interested in maintaining this project anymore, I think I'll better just clone the repository. I'll then eventually try to insert the missing license headers where possible or maybe remove some files. AFAICS as compared to xnu-amd there were 4 new files introduced: fpins.*, sse41.c, trap_hook.c. Those 4 files are either unnecessary for my specific needs or have to be completely redesigned anyway. |
Lines 24 to 26 in 4a56f54
Oh, come on. It was eventually all navel gazing for nothing. |
Ok. Thank you again for your work anyway :) |
not sure if it works :)