[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH 1/2] xen: Fix check-endbr with mawk
- To: Jan Beulich <jbeulich@xxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Fri, 15 Jul 2022 10:43:20 +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=FRPLlU3oexD7vGBeeD1i7qjtguNQRRtKb69qkCk8GZ4=; b=hvnUmL8thzAlV4de4yrHL9Ago5nddPV3SgvjNTpObh6hqfv9dtLdTTHM3jxa3nli/yhw/EOxTZC0RCDJ1MZzku8mPX0L22bLjFPZeKH8UAv0+01gf4RuY4Ry5rrhDjvpIuF7mqmQzK1bwX/2y3nRRWpENg8pPSsbkaOZeKaQz6QMrF1ebdiONnUDSNiQ2ghI5v6zjklZ+TmsrqoGOCghgADag/uUlG96PkCL0Dx6DnZQNsNijvKFho60oa2qHYpKImu/BaDMfJ3BHUwj/eiPmlW5Bd1SH2+IxUB58qGS8JodFvfQtIyobm28ZOOVQVkRz39d2PilCSUAeO5t+RBkBw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Joyg+Y9OJWLrrPsQaLxz8vZkf3xcNtRRrVnfCzFD/VVc+g5UXCugTCLQv7rAwhIslxFW428ox+nNlcIwkl0oIS1EExJxGR5J7Kmi2bnFi11KpmeGUyL6Kf3adsWLv4A5rKS8WWj1zr775wmvtGUmv5818EzqxGGTy+pWqbXi18J58zMqzVcQOsSMU1RM+UJ9l5qcepx1Span46h07xkWQNJWjMdFtHLhKfwE/BcDFOdjPW/XYYJFmt+6ShV+qqGCYI2cFiRstPpIVKfJcyt/yDC4GDwlswI7cZN126s5JNejdhUcmJFfG+djnC0Ho8NkufSgK32Ab/ymH3x1vzsmbQ==
- 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>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 15 Jul 2022 10:43:36 +0000
- Ironport-data: A9a23:tFfoy6P+5QPK1+vvrR1alsFynXyQoLVcMsEvi/4bfWQNrUp30DwDm mEbC2HXOvffMWHzLYpyOYnkpEoD6sSHyNIwSwto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH3dOCJQUBUjcmgXqD7BPPPJhd/TAplTDZJoR94kqsyj5UAbeKRWmthg vuv5ZyFULOZ82QsaDhMtPve8EoHUMna41v0gHRvPZing3eG/5UlJMp3Db28KXL+Xr5VEoaSL woU5Ojklo9x105F5uKNyt4XQGVTKlLhFVHmZk5tc7qjmnB/Shkaic7XAha+hXB/0F1ll/gpo DlEWAfZpQ0BZsUgk8xFO/VU/r0X0QSrN9YrLFDm2fF/wXEqfFPmzNU1AhA0DLYBpM1vXyJIy 7szcxYSO0Xra+KemNpXS8FKr+F6dYzBGtNavXttizbEEfwhXJbPBb3Q4sNV1ysxgcYIGuvCY 80eanxkaxGojx9nYw9LTs5h2rr4wCChI1W0q3rMzUYzy0HVwBZ8z/7GN93Nd8bRbc5UglyZt iTN+GGR7h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iueT11rm9e8opwkc7/mZ8 o=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYl4+Dg7FHxwiGFEGkNOu8rM/Cw61/OECAgAAIBYA=
- Thread-topic: [XEN PATCH 1/2] xen: Fix check-endbr with mawk
On 15/07/2022 11:14, Jan Beulich wrote:
> 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.
Yuck. This works at the moment in 32 bit builds because:
++ objdump -j .text xen-syms -h
++ awk '$2 == ".text" {printf "vma_hi=%s\nvma_lo=%s\n", substr($4, 1,
8), substr($4, 9, 16)}'
+ eval vma_hi=ffff82d0 vma_lo=40200000
++ vma_hi=ffff82d0
++ vma_lo=40200000
so the top bit isn't set.
And going from an 8/8 split to a 9/7 split doesn't work either because
that uses 4 bits and we've only got 2 to play with given .text's 1G
alignment.
I know it's disgusting, but how about a BUILD_BUG_ON(XEN_VIRT_START &
(1u << 31)) ?
~Andrew
|