[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: Thu, 14 Jul 2022 18:59:49 +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=nRcjv3beWnD4LWIRFTqpeKJtj5MF12QYMuqTM7uC+D8=; b=BREWy5r+Vy+r7oKit/DezKRzRU+fpxAEyqwBXVU4RTzhTbsY41jmYHyQhWRUMZueitKYYAq73UlbbAx+CYA9e7v3W0CjK76ZkyTfqvOKBxkytbhsPjzhszDcjO+IG048S+oPGxJrt5ZTmtX+Aa6RtRy26Acv47bk7A8YOTAg5+vjEwdKiHg+3p61KVpwg5kQJm4yVvuTQPO3XheJx1VZyw/x9KlIW9bb/L+tyTs1y22XkRGTPsP+zfA42iVkE1pD+M8n+vdmt0VFgyr/OLnx/2ZI33iw11tDBg+xyPkBLBu/q0dR14AeX56BGWYAP0aVYrXDcz5Ju6VWhotD6FtKvw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H6Y8F3B8MVEnt5dxyc3VszVyL6kqmLnzrR4mXSq/0jajoyBjmOWwBIW4eJq8eKTKPjg2KmePWWzqGlRdD0lAfEK1O45IY8dMH4gXWVnuHn4k60Ejqha7BYKg+rw+GVEoP4r2tfoMQojPJqf60uQXSmOK0uUhXsZ8MSJ5/FgWUzQNYaydd8X3tQi19w1HgAAJYS6MHSnErheckew6kX3DMtGO2CwA39Pkq19LdpjI29+N7Pvv0L9UccCGrDC5pgahQVoIHvAF+5pYYV9sXG1Ho+GvnKWaCvfEeUAvhvuGEKngL8KUnV/6KUrLWB475pkF4Gb8Oc6PQ54poOws3tGUXw==
- 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: Thu, 14 Jul 2022 19:00:04 +0000
- Ironport-data: A9a23:8HawFqjSMldTjARuSmovij3SX161JxAKZh0ujC45NGQN5FlHY01je htvWz+FMv2LYWrzLtwlYIy280pSuZGGnIdqGQBprXhgEyMb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6j+fQLlbFILasEjhrQgN5QzsWhxtmmuoo6qZlmtH8CA6W0 T/Ii5S31GSNhnglaAr414rZ8Ek15Kur5GtD1rADTasjUGH2xiF94K03fcldH1OgKqFIE+izQ fr0zb3R1gs1KD90V7tJOp6iGqE7aua60Tqm0xK6aID76vR2nQQg075TCRYpQRw/ZwNlPTxG4 I4lWZSYEW/FN0BX8QgXe0Ew/ypWZcWq9FJbSJQWXAP6I0DuKhPRL/tS4E4eZrESw/d4DHpy9 aImKgA9aw2SgcO1z+fuIgVsrpxLwMjDGqo64isl5xeASPEsTNbEXrnA4sJe0HEonMdSEP3CZ s0fLz1ycBDHZB4JMVASYH48tL7w2j+jLHsF8RTJ+8Lb4ECKpOB1+JHrPMDYZZqhQsJNk1zDj mnH4374ElcRM9n3JT+trSz227CRx3mTtIQ6EoeV5t13oGKq4E8zTx5NcGufuOCooxvrMz5YA wlOksY0loAi+UruQtTjUhmQpH+fogVaS9dWC/c96gyG1uzT+QnxLkwZRTcHRtUgv8IyQSEC3 0WM2djuAFRHtbSJSXOQ6/GIpCmoMCw9NXUFeSgCSAIE55/op4RbphDFQ8tnEaW1psboAjy2y DePxAA8mrESgMgjx6i9u1fdjFqEvYPVRwQ44gHWWGON7Q5jYoOhIYuy5jDz8vJoPIufCF6bs xAsscWE8PoHC53LsSWXWfgMB5mg/fPDOzrZ6XZPEp875nKS8nisVYlK5Xd1I0IBGsMNYzSvf UnctBha5J5QIGCCc6Zrbpn3Bd5C8ET7PdHsV/SRZNwXZJF0LFCD5Hs2ORDW2H3xmk8xl615I Y2cbcunEXcdD+Jg0SayQOAel7Qsw0jS2F/ueHwy9Dz/uZL2WZJfYe5t3IemBgzh0J65nQ==
- Ironport-hdrordr: A9a23:Gfbr36G+W6Bs4gpBpLqE4ceALOsnbusQ8zAXPiFKOHhom6Oj+v xG8M526fbUskdzZJhCo7C90cu7IE80nKQdieJ6AV7LZniAhILCFu5fBOXZrQEIYxeOk9K1rp 0QEZRDNA==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYl4+Dg7FHxwiGFEGkNOu8rM/Cw619+TQAgAA/dYA=
- Thread-topic: [XEN PATCH 1/2] xen: Fix check-endbr with mawk
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.
~Andrew
|