xen: Fix latent check-endbr.sh bug with 32bit build environments
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 15 Jul 2022 11:53:09 +0000 (12:53 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 Jul 2022 14:32:27 +0000 (15:32 +0100)
commit0af91dc0326cba12795e0b8fa8f665776e2a9e13
tree8e8620cca3fe058352962a7084c11241cc858be9
parentb2ebe879a44428957e147be52e8bf5227e36e723
xen: Fix latent check-endbr.sh bug with 32bit build environments

While Xen's current VMA means it works, the mawk fix (i.e. using $((0xN)) in
the shell) isn't portable in 32bit shells.  See the code comment for the fix.

The fix found a second latent bug.  Recombining $vma_hi/lo should have used
printf "%s%08x" and only worked previously because $vma_lo had bits set in
it's top nibble.  Combining with the main fix, %08x becomes %07x.

Fixes: b2ebe879a444 ("xen: Fix check-endbr.sh with mawk")
Reported-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/tools/check-endbr.sh