All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Eclair: scan the last xen-syms linking pass on Arm
@ 2026-10-06 14:23 Dmytro Prokopchuk1
  2026-10-06 15:03 ` Jan Beulich
  0 siblings, 1 reply; 7+ messages in thread
From: Dmytro Prokopchuk1 @ 2026-10-06 14:23 UTC (permalink / raw)
  To: xen-devel@lists.xenproject.org
  Cc: Dmytro Prokopchuk1, Nicola Vetrini, Doug Goldstein,
	Stefano Stabellini

Hiding .xen-syms.[013] assumed the almost-final image is always pass 2.
On x86 LAST_LINKING_PASS is 2, so .xen-syms.2 stays visible. On Arm
LAST_LINKING_PASS is 3 and the final image is .xen-syms.3, which was
hidden. Pass 2 is usually only a symlink, so Eclair saw no program link
and reported every translation unit as unreachable.

Stop hiding pass 3. Passes 0 and 1 remain excluded.

Fixes: a401b5c9dc35 ("Eclair: re-enable scanning of the (almost) final linking step")
Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
---
Test CI pipeline: https://gitlab.com/xen-project/people/dimaprkp4k/xen/-/pipelines/2918036491
---
 automation/eclair_analysis/ECLAIR/analysis.ecl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/automation/eclair_analysis/ECLAIR/analysis.ecl b/automation/eclair_analysis/ECLAIR/analysis.ecl
index c6e1a7a95d..4078c14a3c 100644
--- a/automation/eclair_analysis/ECLAIR/analysis.ecl
+++ b/automation/eclair_analysis/ECLAIR/analysis.ecl
@@ -35,9 +35,11 @@ their Standard Library equivalents."
 -doc_end
 
 -doc_begin="Do not analyze intermediate linking artifacts, as they do not differ from their final
-counterparts for the purposes of MISRA C static analysis."
+counterparts for the purposes of MISRA C static analysis.
+The scanned xen-syms link is the last linking pass (.xen-syms.2 on x86, where
+that pass is final, .xen-syms.3 on Arm, where a further pass exists)."
 -file_tag+={xen_efi_tmp, "^xen/\\.xen\\.efi\\.([01]|alt\\..*)$"}
--file_tag+={xen_syms_tmp, "^xen/\\.xen-syms\\.[013]$"}
+-file_tag+={xen_syms_tmp, "^xen/\\.xen-syms\\.[01]$"}
 -frames+={hide, "kind(program)&&target(xen_syms_tmp||xen_efi_tmp)"}
 -doc_end
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] Eclair: scan the last xen-syms linking pass on Arm
  2026-10-06 14:23 [PATCH] Eclair: scan the last xen-syms linking pass on Arm Dmytro Prokopchuk1
@ 2026-10-06 15:03 ` Jan Beulich
  2026-10-06 16:09   ` Dmytro Prokopchuk1
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2026-10-06 15:03 UTC (permalink / raw)
  To: Dmytro Prokopchuk1
  Cc: Nicola Vetrini, Doug Goldstein, Stefano Stabellini,
	xen-devel@lists.xenproject.org

On 06.10.2026 16:23, Dmytro Prokopchuk1 wrote:
> Hiding .xen-syms.[013] assumed the almost-final image is always pass 2.
> On x86 LAST_LINKING_PASS is 2, so .xen-syms.2 stays visible. On Arm
> LAST_LINKING_PASS is 3 and the final image is .xen-syms.3, which was
> hidden. Pass 2 is usually only a symlink, so Eclair saw no program link
> and reported every translation unit as unreachable.

When I did that work, rule 2.1 ended up clean for both ARM64-* analysis
jobs (iirc). Upon re-checking I now see that ARM64-amd has 177 violations
(apparently that's what you talk about above), but ARM64-allcode has none
(https://gitlab.com/xen-project/hardware/xen/-/pipelines/2916569232).

> Stop hiding pass 3. Passes 0 and 1 remain excluded.

This will cause scanning of both passes 2 and 3, i.e. consume more time
and report duplicate violations when both passes are real linking steps.
I think we want to be smarter than that, to really scan exactly once. I
don't have a good idea just yet how to achieve that, though (and I was
wondering already when putting together the original patch).

Jan


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Eclair: scan the last xen-syms linking pass on Arm
  2026-10-06 15:03 ` Jan Beulich
@ 2026-10-06 16:09   ` Dmytro Prokopchuk1
  2026-10-07  5:45     ` Nicola Vetrini
  2026-10-07  8:31     ` Jan Beulich
  0 siblings, 2 replies; 7+ messages in thread
From: Dmytro Prokopchuk1 @ 2026-10-06 16:09 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Nicola Vetrini, Doug Goldstein, Stefano Stabellini,
	xen-devel@lists.xenproject.org



On 10/6/26 18:03, Jan Beulich wrote:
> On 06.10.2026 16:23, Dmytro Prokopchuk1 wrote:
>> Hiding .xen-syms.[013] assumed the almost-final image is always pass 2.
>> On x86 LAST_LINKING_PASS is 2, so .xen-syms.2 stays visible. On Arm
>> LAST_LINKING_PASS is 3 and the final image is .xen-syms.3, which was
>> hidden. Pass 2 is usually only a symlink, so Eclair saw no program link
>> and reported every translation unit as unreachable.
>
> When I did that work, rule 2.1 ended up clean for both ARM64-* analysis
> jobs (iirc). Upon re-checking I now see that ARM64-amd has 177 violations
> (apparently that's what you talk about above), but ARM64-allcode has none
> (https://gitlab.com/xen-project/hardware/xen/-/pipelines/2916569232).
>
>> Stop hiding pass 3. Passes 0 and 1 remain excluded.
>
> This will cause scanning of both passes 2 and 3, i.e. consume more time
> and report duplicate violations when both passes are real linking steps.
> I think we want to be smarter than that, to really scan exactly once. I
> don't have a good idea just yet how to achieve that, though (and I was
> wondering already when putting together the original patch).
>
> Jan

Hmm

At the moment
(https://gitlab.com/xen-project/hardware/xen/-/pipelines/2917375773) I
see ARM64 R2.1 violations:
- 177 in AMD
- 249 in allcode

Anyway, we can have if-else like this (copied from
automation/eclair_analysis/ECLAIR/tagging.ecl):

-setq=target,getenv("XEN_TARGET_ARCH")
if(string_equal(target,"x86_64"),
     file_tag+({"xen_syms_tmp", "^xen/\\.xen-syms\\.[013]$"}),
     if(string_equal(target,"arm64"),
         file_tag+({"xen_syms_tmp", "^xen/\\.xen-syms\\.[012]$"})
     )
)

^^^ test pipeline is here:
https://gitlab.com/xen-project/people/dimaprkp4k/xen/-/pipelines/2918571749

BR, Dmytro.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Eclair: scan the last xen-syms linking pass on Arm
  2026-10-06 16:09   ` Dmytro Prokopchuk1
@ 2026-10-07  5:45     ` Nicola Vetrini
  2026-10-07  8:35       ` Jan Beulich
  2026-10-07  8:31     ` Jan Beulich
  1 sibling, 1 reply; 7+ messages in thread
From: Nicola Vetrini @ 2026-10-07  5:45 UTC (permalink / raw)
  To: Dmytro Prokopchuk1
  Cc: Jan Beulich, Doug Goldstein, Stefano Stabellini, xen-devel

On 2026-10-06 18:09, Dmytro Prokopchuk1 wrote:
> On 10/6/26 18:03, Jan Beulich wrote:
>> On 06.10.2026 16:23, Dmytro Prokopchuk1 wrote:
>>> Hiding .xen-syms.[013] assumed the almost-final image is always pass 
>>> 2.
>>> On x86 LAST_LINKING_PASS is 2, so .xen-syms.2 stays visible. On Arm
>>> LAST_LINKING_PASS is 3 and the final image is .xen-syms.3, which was
>>> hidden. Pass 2 is usually only a symlink, so Eclair saw no program 
>>> link
>>> and reported every translation unit as unreachable.
>> 
>> When I did that work, rule 2.1 ended up clean for both ARM64-* 
>> analysis
>> jobs (iirc). Upon re-checking I now see that ARM64-amd has 177 
>> violations
>> (apparently that's what you talk about above), but ARM64-allcode has 
>> none
>> (https://gitlab.com/xen-project/hardware/xen/-/pipelines/2916569232).
>> 
>>> Stop hiding pass 3. Passes 0 and 1 remain excluded.
>> 
>> This will cause scanning of both passes 2 and 3, i.e. consume more 
>> time
>> and report duplicate violations when both passes are real linking 
>> steps.
>> I think we want to be smarter than that, to really scan exactly once. 
>> I
>> don't have a good idea just yet how to achieve that, though (and I was
>> wondering already when putting together the original patch).
>> 
>> Jan
> 
> Hmm
> 
> At the moment
> (https://gitlab.com/xen-project/hardware/xen/-/pipelines/2917375773) I
> see ARM64 R2.1 violations:
> - 177 in AMD
> - 249 in allcode
> 
> Anyway, we can have if-else like this (copied from
> automation/eclair_analysis/ECLAIR/tagging.ecl):
> 
> -setq=target,getenv("XEN_TARGET_ARCH")
> if(string_equal(target,"x86_64"),
>      file_tag+({"xen_syms_tmp", "^xen/\\.xen-syms\\.[013]$"}),
>      if(string_equal(target,"arm64"),
>          file_tag+({"xen_syms_tmp", "^xen/\\.xen-syms\\.[012]$"})
>      )
> )
> 
> ^^^ test pipeline is here:
> https://gitlab.com/xen-project/people/dimaprkp4k/xen/-/pipelines/2918571749
> 
> BR, Dmytro.

In theory we could even generate a configuration file on the fly just 
before invoking make. See e.g. [1] and [2]. In this way, we can 
determine programmatically which is the linking step to consider, since 
the logic involves some conditionals in the Makefile rules. In any case 
intercepting one more command that is just a symlink does not incur in a 
big cost: only if the intercepted step is another linking command ~5 
more minutes are needed.

[1] 
https://gitlab.com/xen-project/hardware/xen/-/blob/staging/automation/eclair_analysis/ECLAIR/generate_ecl.sh?ref_type=heads
[2] 
https://gitlab.com/xen-project/hardware/xen/-/blob/staging/automation/eclair_analysis/ECLAIR/generate-linker-symbols.sh?ref_type=heads


-- 
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Eclair: scan the last xen-syms linking pass on Arm
  2026-10-06 16:09   ` Dmytro Prokopchuk1
  2026-10-07  5:45     ` Nicola Vetrini
@ 2026-10-07  8:31     ` Jan Beulich
  1 sibling, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2026-10-07  8:31 UTC (permalink / raw)
  To: Dmytro Prokopchuk1
  Cc: Nicola Vetrini, Doug Goldstein, Stefano Stabellini,
	xen-devel@lists.xenproject.org

On 06.10.2026 18:09, Dmytro Prokopchuk1 wrote:
> 
> 
> On 10/6/26 18:03, Jan Beulich wrote:
>> On 06.10.2026 16:23, Dmytro Prokopchuk1 wrote:
>>> Hiding .xen-syms.[013] assumed the almost-final image is always pass 2.
>>> On x86 LAST_LINKING_PASS is 2, so .xen-syms.2 stays visible. On Arm
>>> LAST_LINKING_PASS is 3 and the final image is .xen-syms.3, which was
>>> hidden. Pass 2 is usually only a symlink, so Eclair saw no program link
>>> and reported every translation unit as unreachable.
>>
>> When I did that work, rule 2.1 ended up clean for both ARM64-* analysis
>> jobs (iirc). Upon re-checking I now see that ARM64-amd has 177 violations
>> (apparently that's what you talk about above), but ARM64-allcode has none
>> (https://gitlab.com/xen-project/hardware/xen/-/pipelines/2916569232).
>>
>>> Stop hiding pass 3. Passes 0 and 1 remain excluded.
>>
>> This will cause scanning of both passes 2 and 3, i.e. consume more time
>> and report duplicate violations when both passes are real linking steps.
>> I think we want to be smarter than that, to really scan exactly once. I
>> don't have a good idea just yet how to achieve that, though (and I was
>> wondering already when putting together the original patch).
> 
> At the moment
> (https://gitlab.com/xen-project/hardware/xen/-/pipelines/2917375773) I
> see ARM64 R2.1 violations:
> - 177 in AMD
> - 249 in allcode

Which demonstrates how variable the situation is.

> Anyway, we can have if-else like this (copied from
> automation/eclair_analysis/ECLAIR/tagging.ecl):
> 
> -setq=target,getenv("XEN_TARGET_ARCH")
> if(string_equal(target,"x86_64"),
>      file_tag+({"xen_syms_tmp", "^xen/\\.xen-syms\\.[013]$"}),
>      if(string_equal(target,"arm64"),
>          file_tag+({"xen_syms_tmp", "^xen/\\.xen-syms\\.[012]$"})
>      )
> )

Ah, yes, perhaps. Yet there isn't any if-else needed here, is there?
tagging.ecl also uses two simply if()-s afaics. (Excluding .xen-syms.3
on x86 is pointless. There's no 3rd pass there just yet, and once one
would need adding, we'd want to similarly scan that rather than the
potentially no-op pass 2.)

The thing that continues to worry me with this is: This way we have a
connection between the build machinery under xen/ and the patterns
here, which need keeping in sync manually. That's going to be pretty
easy to miss.

Jan


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Eclair: scan the last xen-syms linking pass on Arm
  2026-10-07  5:45     ` Nicola Vetrini
@ 2026-10-07  8:35       ` Jan Beulich
  2026-10-07 17:09         ` Dmytro Prokopchuk1
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2026-10-07  8:35 UTC (permalink / raw)
  To: Nicola Vetrini
  Cc: Doug Goldstein, Stefano Stabellini, xen-devel, Dmytro Prokopchuk1

On 07.10.2026 07:45, Nicola Vetrini wrote:
> On 2026-10-06 18:09, Dmytro Prokopchuk1 wrote:
>> On 10/6/26 18:03, Jan Beulich wrote:
>>> On 06.10.2026 16:23, Dmytro Prokopchuk1 wrote:
>>>> Hiding .xen-syms.[013] assumed the almost-final image is always pass 
>>>> 2.
>>>> On x86 LAST_LINKING_PASS is 2, so .xen-syms.2 stays visible. On Arm
>>>> LAST_LINKING_PASS is 3 and the final image is .xen-syms.3, which was
>>>> hidden. Pass 2 is usually only a symlink, so Eclair saw no program 
>>>> link
>>>> and reported every translation unit as unreachable.
>>>
>>> When I did that work, rule 2.1 ended up clean for both ARM64-* 
>>> analysis
>>> jobs (iirc). Upon re-checking I now see that ARM64-amd has 177 
>>> violations
>>> (apparently that's what you talk about above), but ARM64-allcode has 
>>> none
>>> (https://gitlab.com/xen-project/hardware/xen/-/pipelines/2916569232).
>>>
>>>> Stop hiding pass 3. Passes 0 and 1 remain excluded.
>>>
>>> This will cause scanning of both passes 2 and 3, i.e. consume more 
>>> time
>>> and report duplicate violations when both passes are real linking 
>>> steps.
>>> I think we want to be smarter than that, to really scan exactly once. 
>>> I
>>> don't have a good idea just yet how to achieve that, though (and I was
>>> wondering already when putting together the original patch).
>>>
>>> Jan
>>
>> Hmm
>>
>> At the moment
>> (https://gitlab.com/xen-project/hardware/xen/-/pipelines/2917375773) I
>> see ARM64 R2.1 violations:
>> - 177 in AMD
>> - 249 in allcode
>>
>> Anyway, we can have if-else like this (copied from
>> automation/eclair_analysis/ECLAIR/tagging.ecl):
>>
>> -setq=target,getenv("XEN_TARGET_ARCH")
>> if(string_equal(target,"x86_64"),
>>      file_tag+({"xen_syms_tmp", "^xen/\\.xen-syms\\.[013]$"}),
>>      if(string_equal(target,"arm64"),
>>          file_tag+({"xen_syms_tmp", "^xen/\\.xen-syms\\.[012]$"})
>>      )
>> )
>>
>> ^^^ test pipeline is here:
>> https://gitlab.com/xen-project/people/dimaprkp4k/xen/-/pipelines/2918571749
>>
>> BR, Dmytro.
> 
> In theory we could even generate a configuration file on the fly just 
> before invoking make. See e.g. [1] and [2]. In this way, we can 
> determine programmatically which is the linking step to consider, since 
> the logic involves some conditionals in the Makefile rules.

Hmm, yes, that looks promising.

> In any case 
> intercepting one more command that is just a symlink does not incur in a 
> big cost: only if the intercepted step is another linking command ~5 
> more minutes are needed.

Yet that's an issue, at least as long as the analysis jobs generally
determine pipeline overall latency. Plus with code size (almost) only ever
growing, that time is also only going to (almost) ever grow.

Jan

> [1] 
> https://gitlab.com/xen-project/hardware/xen/-/blob/staging/automation/eclair_analysis/ECLAIR/generate_ecl.sh?ref_type=heads
> [2] 
> https://gitlab.com/xen-project/hardware/xen/-/blob/staging/automation/eclair_analysis/ECLAIR/generate-linker-symbols.sh?ref_type=heads
> 
> 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Eclair: scan the last xen-syms linking pass on Arm
  2026-10-07  8:35       ` Jan Beulich
@ 2026-10-07 17:09         ` Dmytro Prokopchuk1
  0 siblings, 0 replies; 7+ messages in thread
From: Dmytro Prokopchuk1 @ 2026-10-07 17:09 UTC (permalink / raw)
  To: Jan Beulich, Nicola Vetrini
  Cc: Doug Goldstein, Stefano Stabellini,
	xen-devel@lists.xenproject.org



On 10/7/26 11:35, Jan Beulich wrote:
> On 07.10.2026 07:45, Nicola Vetrini wrote:
>> On 2026-10-06 18:09, Dmytro Prokopchuk1 wrote:
>>> On 10/6/26 18:03, Jan Beulich wrote:
>>>> On 06.10.2026 16:23, Dmytro Prokopchuk1 wrote:
>>>>> Hiding .xen-syms.[013] assumed the almost-final image is always pass
>>>>> 2.
>>>>> On x86 LAST_LINKING_PASS is 2, so .xen-syms.2 stays visible. On Arm
>>>>> LAST_LINKING_PASS is 3 and the final image is .xen-syms.3, which was
>>>>> hidden. Pass 2 is usually only a symlink, so Eclair saw no program
>>>>> link
>>>>> and reported every translation unit as unreachable.
>>>>
>>>> When I did that work, rule 2.1 ended up clean for both ARM64-*
>>>> analysis
>>>> jobs (iirc). Upon re-checking I now see that ARM64-amd has 177
>>>> violations
>>>> (apparently that's what you talk about above), but ARM64-allcode has
>>>> none
>>>> (https://gitlab.com/xen-project/hardware/xen/-/pipelines/2916569232).
>>>>
>>>>> Stop hiding pass 3. Passes 0 and 1 remain excluded.
>>>>
>>>> This will cause scanning of both passes 2 and 3, i.e. consume more
>>>> time
>>>> and report duplicate violations when both passes are real linking
>>>> steps.
>>>> I think we want to be smarter than that, to really scan exactly once.
>>>> I
>>>> don't have a good idea just yet how to achieve that, though (and I was
>>>> wondering already when putting together the original patch).
>>>>
>>>> Jan
>>>
>>> Hmm
>>>
>>> At the moment
>>> (https://gitlab.com/xen-project/hardware/xen/-/pipelines/2917375773) I
>>> see ARM64 R2.1 violations:
>>> - 177 in AMD
>>> - 249 in allcode
>>>
>>> Anyway, we can have if-else like this (copied from
>>> automation/eclair_analysis/ECLAIR/tagging.ecl):
>>>
>>> -setq=target,getenv("XEN_TARGET_ARCH")
>>> if(string_equal(target,"x86_64"),
>>>       file_tag+({"xen_syms_tmp", "^xen/\\.xen-syms\\.[013]$"}),
>>>       if(string_equal(target,"arm64"),
>>>           file_tag+({"xen_syms_tmp", "^xen/\\.xen-syms\\.[012]$"})
>>>       )
>>> )
>>>
>>> ^^^ test pipeline is here:
>>> https://gitlab.com/xen-project/people/dimaprkp4k/xen/-/pipelines/2918571749
>>>
>>> BR, Dmytro.
>>
>> In theory we could even generate a configuration file on the fly just
>> before invoking make. See e.g. [1] and [2]. In this way, we can
>> determine programmatically which is the linking step to consider, since
>> the logic involves some conditionals in the Makefile rules.
>
> Hmm, yes, that looks promising.
>
>> In any case
>> intercepting one more command that is just a symlink does not incur in a
>> big cost: only if the intercepted step is another linking command ~5
>> more minutes are needed.
>
> Yet that's an issue, at least as long as the analysis jobs generally
> determine pipeline overall latency. Plus with code size (almost) only ever
> growing, that time is also only going to (almost) ever grow.
>
> Jan
>
>> [1]
>> https://gitlab.com/xen-project/hardware/xen/-/blob/staging/automation/eclair_analysis/ECLAIR/generate_ecl.sh?ref_type=heads
>> [2]
>> https://gitlab.com/xen-project/hardware/xen/-/blob/staging/automation/eclair_analysis/ECLAIR/generate-linker-symbols.sh?ref_type=heads
>>
>>
>

Jan, Nicola

Thank you for the review.
Sending V2.

BR, Dmytro.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-07 17:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 14:23 [PATCH] Eclair: scan the last xen-syms linking pass on Arm Dmytro Prokopchuk1
2026-10-06 15:03 ` Jan Beulich
2026-10-06 16:09   ` Dmytro Prokopchuk1
2026-10-07  5:45     ` Nicola Vetrini
2026-10-07  8:35       ` Jan Beulich
2026-10-07 17:09         ` Dmytro Prokopchuk1
2026-10-07  8:31     ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.