Hi Pedro, Laszlo, I have double-check this patch and I'd like to point out the following: 1. Some of the code in this patch actually refers to the Linux kernel. But only used the name of kernel code , such as PUD, PMD, PTE, Swapper Page Dir, etc. 2. Refer to the LoongArch TLB rules, if we use the multi-level page table to search and filling, the usual logic is as follows:     a. Get the first level page table, called PGD, in reigster PGDL or PGDH.     b. PGD will index the 2st Dir, and the 2st Dir will index the 3st Dir, and so on.     c. We would like to use the four-level page table, because if we use two- or three-level page tables, the page tables will larger and must be continuous, so we think the four-level is better(Linux kernel also uses the four-level page tables).     d. LoongArch paging logic is shown in the image below(URL: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#memory-management-of-page-table-mapping): Referring to the above, should I use the old logic, rewrite the Linux kernel-like code to EFI style and clean up some unused code and redesign the PEI library, it that OK? Thanks, Chao On 2024/2/4 10:58, Chao Li wrote: > > Hi Leif and Pedro, > > On 2024/2/2 23:14, Leif Lindholm wrote: >> On 2024-02-01 19:36, Pedro Falcato wrote: >>> On Thu, Feb 1, 2024 at 3:05 AM Chao Li wrote: >>>> >>>> Hi Pedro and Laszlo, >>>> >>>> Part of the code in this patch is indeed quoted from the Linux >>>> kernel, and do you think it is inapproparate? If so, we need to >>>> refactor this module, what are you suggests with the refactoring? >>>> Just remove the unused logic from the Kernel code and keep the >>>> logic good or refactor from scratch? >>> >>> +CC stewards >>> >>> Disclaimer: I'm not a lawyer >>> >>> It is wildly inappropriate. All of the code was clearly inspired by >>> GPL and derives from the Linux GPL code, it's not just unused logic. >>> You should triple check *every other patch* you've sent out for these >>> kinds of GPL violations. >> >> I want to highlight >> https://github.com/tianocore/edk2/blob/master/ReadMe.rst?plain=1#L177 >> >> Chao, by adding your Signed-off-by to any patch and sending it out, >> you certify that: >> >> (a) The contribution was created in whole or in part by me and I >>     have the right to submit it under the open source license >>     indicated in the file; or >> >> (b) The contribution is based upon previous work that, to the best >>     of my knowledge, is covered under an appropriate open source >>     license and I have the right under that license to submit that >>     work with modifications, whether created in whole or in part >>     by me, under the same open source license (unless I am >>     permitted to submit under a different license), as indicated >>     in the file; or >> >> (c) The contribution was provided directly to me by some other >>     person who certified (a), (b) or (c) and I have not modified >>     it. >> >> (d) I understand and agree that this project and the contribution >>     are public and that a record of the contribution (including all >>     personal information I submit with it, including my sign-off) is >>     maintained indefinitely and may be redistributed consistent with >>     this project or the open source license(s) involved. >> >> Now, that's a bunch of legalese, but it matters. >> Mistakes happen, but it would have been a massive headache if this >> had been merged and *then* we found out about this. The *best case* >> scenario would have been that we would have been forced to revert the >> whole set. >> >> I wouldn't say you need to "triple check every patch", but I would >> say you need to re-evaluate the existing patches based on this new >> information you have learned. So that once you resubmit a version as >> per Laszlos comments in separate email, you are comfortable that the >> whole submission conforms with the DCO. >> And if you are unsure - ask. That's never wrong. >> >> Pedro - many thanks for this. Owe you one. > Of couse, I will study the entries you are referring to and I'm sure > that the Part 1 series is full compliance with terms, and I will > double/triple check them when I sumbit the Part 2, thank you for > spotting this and preventing me form making a mistake. >> >> / >>     Leif >> >>> There's another way of writing this sort of code (that doesn't involve >>> all the Linux mm craziness) but I don't know if changing strategies >>> would be considered getting rid of any shadow of GPL/IP violation. >>> >>> (As a side note, I don't really understand IP in the software world. >>> If you work, say, on GPL software for a moment in time, are you always >>> going to be "GPL-tainted"? Surely not? Most people in the industry >>> I've talked to about this say that, yeah, no, corps don't expect that. >>> But no one really seems to have drawn a line between OK and not-OK, >>> but rather "please please don't sue us". And in this case I don't know >>> (but I suspect it'd be uncomfortable) for someone to redesign a >>> solution right away, after being "tainted". Anyway, tough problem, and >>> IANAL :/) >>> > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115141): https://edk2.groups.io/g/devel/message/115141 Mute This Topic: https://groups.io/mt/103971653/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-