[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>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Fri, 15 Jul 2022 10:35:50 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=k9r1jD/6gnkECBcJIOg/D08LS7wQzsFoNBipF+j4veM=; b=LUopwFPv40QGYVdeNvBTxkWQv7MynpMVv6+mh9BbUjC80ESGQaTEM6eR8UQajN/+uVuPzUTQLn0jSxYY5Z78re+tiErgr3kf84AsfQmTHVvQTbrq9RrYkiz5cH1Q4rfwVR2CiX3TY4/EUesaDo7yobOop3iFoEaVpo5uOEJwAj+9dOt9vRaHf20ntLUwhYAzRComoHoJmqx8O+L0w+MdpVlgrW2A1BkhQxXKD2UH5vL9kafq/HCSdTK7+w0e0ypdopKsslCXBKeHHoG4gIuQzBRb6lb4hOw/X2kDOBjbqLAVbhHz5uJEokXHm/nivLBvbBNgdRa0uLdZKjAvMPkgSw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GEq4sLN5Oy0rZYKrZwtISzVCf9/+9zmCpepabEWYueEGUjDG4C46UUSpG6lYnbvZtQSUa/6uQ6mTlr1+lN8wlQYS4/zQG0MLRXZ3SjF8rqSw403O1rFlv7RixSohOA8EnQh0DBmMOYTPd/q5OG4MH+/F0MxR/1sP0yEx+s+pTL7Qgvb71hBX9xsZ1iyQOvJcBvuvGgDaUK3Ruc2UHU9vZCjsP1oEsCzEtU5z74DM1/r1mSd0rt/OxvXlxmnANzAaxq9AT2VgzURH4DBpQCqKqLv8nyhGPrYbFx7QKiLQ9iAbkMyoc51MYQmXxy7ZqR+QG3fUuDRrEyxpEviV9Xouog==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Luca Fancellu <Luca.Fancellu@xxxxxxx>, Mathieu Tarral <mathieu.tarral@xxxxxxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, "marc.ungeschikts@xxxxxxxx" <marc.ungeschikts@xxxxxxxx>
  • Delivery-date: Fri, 15 Jul 2022 10:36:13 +0000
  • Ironport-data: A9a23:YC04BKv1aiBun0gnuP59Cy+JUOfnVBFeMUV32f8akzHdYApBsoF/q tZmKTuFPK6JYDDwfoh2PIrk8klSvcDcydRrGlds/y8xEi1G+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/vOHtIQMcacUghpXwhoVSw9vhxqnu89k+ZAjMOwRgiAo rsemeWGULOe82MyYzh8B56r8ks15qyt4W5A5zTSWNgQ1LPgvyhNZH4gDfnZw0vQGuF8AuO8T uDf+7C1lkuxE8AFU47Nfh7TKyXmc5aKVeS8oiM+t5uK23CukhcawKcjXMfwXG8M49m/c3Kd/ /0W3XC4YV9B0qQhA43xWTEAe811FfUuFLMqvRFTGCFcpqHLWyKE/hlgMK05FYom1/pyL3NFz 95CeWEiQArToOeLyZvuH4GAhux7RCXqFKU2nyk8i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f2RYUh2rD3xnklZqsoDWb/8sQqAe NuBMbT6LJfdk6bdWnQui1qzMa3Vno+Ex+aSgxa0/blmAR+jTR81Q8V1cYflnAP+NY0TIRF/f 3NNuBtmKtVRsEbYKphDKMKQNexCGbKXRXQWVjiaWjPBeUCITbAupT36LI66KWjf4EJ1oI7nN DbXFZRpQcJCjbT4A21reh2Gzz2MRWAtG7Wu7BjDrBCy87BbauuNzGfQ1YzlMblq+kDA6TgKo SOBK4=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYl4+Dg7FHxwiGFEGkNOu8rM/Cw619+TQAgAA/dYCAAQWFAA==
  • Thread-topic: [XEN PATCH 1/2] xen: Fix check-endbr with mawk

On 14/07/2022 19:59, Andrew Cooper wrote:
> On 14/07/2022 16:12, Andrew Cooper wrote:
>> On 14/07/2022 15:39, Anthony PERARD wrote:
>>> check-endbr.sh works well with gawk, but fails with mawk. The produced
>>> $ALL file is smaller, it is missing 0x$vma_lo on every line. On mawk,
>>> int(0x2A) just produce 0, instead of the expected value.
>>>
>>> The use of hexadecimal-constant in awk is an optional part of the
>>> posix spec, and mawk doesn't seems to implemented.
>>>
>>> There is a way to convert an hexadecimal to a number be putting it in
>>> a string, and awk as I understand is supposed to use strtod() to
>>> convert the string to a number when needed. The expression
>>> 'int("0x15") + 21' would produce the expected value in `mawk` but now
>>> `gawk` won't convert the string to a number unless we use the option
>>> "--non-decimal-data".
>>>
>>> So let's convert the hexadecimal number before using it in the awk
>>> script. The shell as no issue with dealing with hexadecimal-constant
>>> so we'll simply use the expression "$(( 0x15 ))" to convert the value
>>> before using it in awk.
>>>
>>> Fixes: 4d037425dc ("x86: Build check for embedded endbr64 instructions")
>>> Reported-by: Luca Fancellu <Luca.Fancellu@xxxxxxx>
>>> Reported-by: Mathieu Tarral <mathieu.tarral@xxxxxxxxxxxxxx>
>>> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
>> Thanks for doing this.  You beat me to it.
>>
>> On policy first, we have https://gitlab.com/xen-project/xen/-/issues/26
>> open for tracking this bug.
>>
>> We should consider having
>>
>> Resolves xen-project/xen#26
>>
>> in our list of tags, so Gitlab can properly cross-reference this fix. 
>> (I wonder if Resolves: works...)
> Yes it does.  Gitlab successfully cross-referenced my dev branch ...
>
>> https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically
>> is the full list of patterns available, but I think we want to keep
>> Fixes: for it's current meaning.
>>
>>
>> I also want to wait for the patchew CI run to complete
> ... pushed because patchew failed to pick the series up for some reason.

This series is now fully acked/reviewed and ready, and passed CI (well -
the bits of CI which aren't broken for other reasons).

Given the lack of objections, I'm going to use this patch alone as an
experiment to see how Resolves: works through other bits of our workflow
too.  Unless someone objects very promptly.

~Andrew

 


Rackspace

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