[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 2/2] earlycpio: lib-ify earlycpio.c


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
  • Date: Thu, 22 Jan 2026 18:48:53 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=bugseng.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cRil9PbVBhOa83C92+M8SdCtBsJOkobYTmtGebdb9L0=; b=xVqur7GbdguKoubEk+Hz6XAcdCBinOIte3mkpFDPOMnH956L+4Yv2XuAqfuIrAWzhinZn5KjQ0frAKBf2HpAXCWg4R4S0pE0vVBzmKVYaMnPWVpwOwZ8Of3kmfKh1xkcyY6uB1nWqbet+UNmc70uOkmGu4hkykiWV+SwylcdGJSwrIU9+QpHe0Sr9q1ZboIW7OEj9OpVqGMxue1llqy3UziS0RmvNrgQto4iFTM243WpQhdgHVCoKxcaJ4wj0FRoe/GXJ9QG/pFkUnUGUA1BsINDeyo4qSpvYH4Z9yeaEK2jwXoSl12LQ5ZP2hWeMfM0GZXU/pRkX/qo2C192NPj4A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZuvQEgkPBmk2Ss897ar70x6C3/mHK+JsebCp93wHR5GHSEIUMC5PvCqsKYrLnmwaNRlFJcdA4ocUJ/wNaalEAwEpq/moVBBGXq/Tm6YfGAynArgXhw7qMeryR1ME9sX1PZdcO0P8/rq0EmZTBYk/aGNoj4B600Wd5YCDOaOJyQR2rL8fbEg3d0wS3gf9gCehev8mmFOXHoEQpgiqLF9fBPpFhzZQiqJcHUis9NtOOEyZscZqllgSciBIPEgIxbfivGIHUF0TAIHhpIxfOIw+kYsT2EYL/eKGnIrqLqksT6lRXgxvp9g9feiIAgZ4JuOJLUDaieLE41+CBpqBz2s/SQ==
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 22 Jan 2026 17:49:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu Jan 22, 2026 at 3:18 PM CET, Nicola Vetrini wrote:
> On 2026-01-22 13:50, Andrew Cooper wrote:
>> On 22/01/2026 8:27 am, Jan Beulich wrote:
>>> On 21.01.2026 16:47, Alejandro Vallejo wrote:
>>>> --- a/docs/misra/exclude-list.json
>>>> +++ b/docs/misra/exclude-list.json
>>>> @@ -121,10 +121,6 @@
>>>>              "rel_path": "common/bunzip2.c",
>>>>              "comment": "Imported from Linux, ignore for now"
>>>>          },
>>>> -        {
>>>> -            "rel_path": "common/earlycpio.c",
>>>> -            "comment": "Imported from Linux, ignore for now"
>>>> -        },
>>>>          {
>>>>              "rel_path": "common/gzip/*",
>>>>              "comment": "Imported from Linux, ignore for now"
>>> Judging from Andrew's
>>> https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2277362625
>>> this doesn't quite work. As I had expected, since the file is compiled
>>> unconditionally now in its new location, some violations are now also
>>> unconditionally reported. (Some, checked for at linking time only, may 
>>> not
>>> be reported anymore for the *-amd analysis jobs.)
>> 
>> Yeah, in hindsight this seems obvious, given that we're compiling then
>> discarding.
>> 
>> There are two options:
>> 
>> 1. Use an earlier form which adds the new location to the exclude list 
>> (Still needs to be in this patch for bisectibility.)
>> 2. Fix up the violations first (only 6 in total)
>> 
>> Two of the violations look easy to fix, two need the deviation for 
>> octal
>> numbers, but two essentially-char violations look to be hard.  The 
>> logic
>> is doing ASCII manipulation in what I would consider to be the
>> appropriate/canonical way, but Eclair does not like the mixture of ints
>> and character literals.
>> 
>> I dislike option 1, but as (contrary to my expectations) this is
>> interfering with the *-amd build, I'll tolerate it.
>> 
>
> I agree that Solution 1 is the easiest to implement. An alternative 
> could be to fix the regressions for R7.1 and R20.7 (they're trivial) 
> regardless and add casts to sidestep MISRA for R10.2.

Easy as it is, and while I'd prefer to fix earlycpio.c, I just don't have
time to do it now. The original incarnation of the patch I sent that moved the
exclusion would work here.

That patch, followed by the lib move (as it was back then) ought to work for the
time being. I'm not in a hurry though so I'm happy for the move to wait until
someone finds the time to fix the errors. Whatever you prefer.

Cheers,
Alejandro



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.