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

Re: [XEN PATCH 1/2] xen: Fix check-endbr with mawk


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 15 Jul 2022 12:14:37 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=xrHxZTLfABoiB5W2wRRF/3pHtCvhqOHQnkTZMH0RHdE=; b=J2ilypP/fJMmO1p9HwohkQmybRxLkpuv6i1DvHdwh8eOvlSPkLqZkBngGe3wI/vBeh811IKjJ/ncz9eawc/PikvMpSBXnuRvgc37+2VFT8/vDQKEiFfMAK37TaILoBnnczAjcLTe0DQxyK3XVy1ZYBPWVBJZ4T9Ist5+ip4OXsr+xIGq1sGf/z10k76+drv93vObWkez18OO+CjPN1Y+6IVhngdsqtIR86pTIiGT87or3E04JYqvvSl5q1rwXME/sVnIPg2f3SNhr9pXYI3y8v9lxgojleJ3qGPFlxplThqByrCAHsaPbwqfWjGqUfJyXL6BCy7ks6vC6SVN4DTBPA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jPGAf9U380EhN4D59cA0RUUQ6q397j3pFNAsFatm0jLDHvFRLmBeSsrw9pgL3WM4Qq9WaU3Aw3RCiI5LkkbbaYa2/DSYWtIwFHuykSJ2FdwHGOOXNZImkSzpx+820K5XOSA6kB/6VNMztPmPP0IuR6fF3pncd27zkUTbJihYAgLm4DCSmB4wmtHeHsAnKYhDfAH3VLjNd+Y8TN1JYfZGkwru7PbOeALEfmgV0LR/MHg97d/BxREdJs6tH3Jvyin1Z8zgeQFKkHtdOUd5nRpuQFOE6uMSxcHESZW4YofWXApiXj+ZGV35fWrxR2Sm8Jg44IE2u8+N3dsfccULYJU5nQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Luca Fancellu <Luca.Fancellu@xxxxxxx>, Mathieu Tarral <mathieu.tarral@xxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 15 Jul 2022 10:14:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.07.2022 16:39, Anthony PERARD wrote:
> --- a/xen/tools/check-endbr.sh
> +++ b/xen/tools/check-endbr.sh
> @@ -78,7 +78,7 @@ then
>  else
>      grep -aob -e "$(printf '\363\17\36\372')" -e "$(printf 
> '\363\17\36\373')" \
>           -e "$(printf '\146\17\37\1')" $TEXT_BIN
> -fi | awk -F':' '{printf "%s%x\n", "'$vma_hi'", int(0x'$vma_lo') + $1}' > $ALL
> +fi | awk -F':' '{printf "%s%x\n", "'$vma_hi'", int('$((0x$vma_lo))') + $1}' 
> > $ALL

I'm afraid that's not portable to environments where sizeof(long) < 8.
The shell isn't required to use wider than long for the evaluation.

Jan



 


Rackspace

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