From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 72AD0941D95 for ; Thu, 1 Feb 2024 23:03:01 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=0GdUWL6wru3coL18IAIiAkwy6ez8lVKLtTAva3UcjPs=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1706828580; v=1; b=ix7GIj2M4e+5ImQGIkTQpe9zYcXmSYhYPVkwPmEh3gpYQg2uN0u0NFqpcY+MZ18qD6MrY8u2 9xDKhTi/vfmRnzws0WelJeWpCeJFQTsZo5Oa+fMI8mVdSPTAf/qvNhJEOXsddFydJSLokWUxrrA lLaN4SI2oYkbVEcqtts4mBIA= X-Received: by 127.0.0.2 with SMTP id TzgJYY7687511xJDZ2e2pSPI; Thu, 01 Feb 2024 15:03:00 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.10144.1706828574258535737 for ; Thu, 01 Feb 2024 15:02:54 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-271-qQ2j-1r2OyK8Wax4Ib0MUg-1; Thu, 01 Feb 2024 18:02:50 -0500 X-MC-Unique: qQ2j-1r2OyK8Wax4Ib0MUg-1 X-Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CD181881BC2; Thu, 1 Feb 2024 23:02:49 +0000 (UTC) X-Received: from [10.39.192.71] (unknown [10.39.192.71]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8FDFB2166B33; Thu, 1 Feb 2024 23:02:47 +0000 (UTC) Message-ID: Date: Fri, 2 Feb 2024 00:02:42 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v8 14/37] UefiCpuPkg: Add CpuMmuLib to UefiCpuPkg To: Pedro Falcato , Chao Li Cc: devel@edk2.groups.io, Eric Dong , Ray Ni , Rahul Kumar , Gerd Hoffmann , Baoqi Zhang , Dongyan Qian , Xianglai Li , Bibo Mao , Andrew Fish , Leif Lindholm , "Kinney, Michael D" References: <20240126062715.3099433-1-lichao@loongson.cn> <20240126062919.3101691-1-lichao@loongson.cn> <3fe0fda8-d32e-679e-2f71-6cc35e7772b8@redhat.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: gjBVI9a1HBl0no6yvlFnajWLx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ix7GIj2M; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 2/1/24 20: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. > > 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 :/) > If Chao can find someone at loongson.cn who can write this code *from zero* and has never looked at the Linux kernel, IMO that would be preferable. If not, then I think Chao can rewrite this code too, but it must be from zero (starting with an empty C file in the editor). Only architecture manuals and such should be used -- I assume all that's needed for this paging stuff is described in sufficient detail in architecture manuals. And yes, that implies Chao needs to manually #define new macros from zero, if the manuals provide constants, bitmasks, etc. Then, Pedro, you'd be invited to please check whether the new code struck you as "foreign"! :) Thanks! Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114975): https://edk2.groups.io/g/devel/message/114975 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] -=-=-=-=-=-=-=-=-=-=-=-