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

Re: [PATCH 4/4] livepatch: differentiate between old and new build systems


  • To: "Doebel, Bjoern" <doebel@xxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Wed, 2 Mar 2022 15:55:54 +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=Gm3wwbiISZCoda9GpT6wD0gAiqyct7+qGSdyQx3eVUg=; b=P/YTuCX8I5CvBJt1fV1lNs/eT9Z8e7FU03+TPMdVlcgfYSezFnNrh/ixOI58qSmqS0j4Jn/r7Vk+Vbx81ycdcWyP+PHrsGM1wYKG8muSY/qYg3ZkRvob4aDLdiHQvxcKpO8hqMvUPPtkhwL3eGsMHzqVfm8vLfTgu9kqRxlVSv8IUXVpw/8GGZg1Yp9WaJ3c1zXCs6Ww2EA47lSOvp1d/3lOl5PnYu6hrmne81Wx3ClXRjTJ0On5JY+ALmJgFbCbxJaSi2ySES0h6sq8PdNoXnym3WR5iC+N1wzlK/dCBNGTLQ+3sjMqUTGLTV+mpBeeAb3RQONRUR12lSdS5q1sjg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QzxeH899AWirUGWS7X1tM+Krki4chAzLD9DGKACu/jkgU19aMeIQyt8qixU4yzd2wVEFmvACAY/fhYz9SSqX4a9jJZyVHjaibn52O3iz8iseW09H5A5tEg4mtnA2eD5RxBA1Jc0pGbyWAX2VK6sQqfNYEN1GWQbIk9aGzbaPr/sx5M5H3Y1wOaiU59rps9zaAekXkb7efQ3RDmIgV6+mEtm2oIgwnqH7hER5Kp3T7dG/J68lKkl7ZyvYyxrac74UpiTmWtsa9Mx3F7bojWsNGJryDnhtUks7rhsDk+7R3tqhzjz8h1hA6iq2SzBYdgZ/RxBVWgMH6Gek7/XMuMezLA==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>, "konrad.wilk@xxxxxxxxxx" <konrad.wilk@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>
  • Delivery-date: Wed, 02 Mar 2022 15:56:06 +0000
  • Ironport-data: A9a23:J49Ftak+o6RZWqQ31iZ468Do5gy3JkRdPkR7XQ2eYbSJt1+Wr1Gzt xIeW2jSOayPYjHzfIhzb4Sw8R9Qu8PXnYRhTFQ4qCozESMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2EoLd9IR2NYy24DiW1nV4 rsenuWEULOb828sWo4rw/rrRCNH5JwebxtB4zTSzdgS1LPvvyF94KA3fMldHFOhKmVgJcaoR v6r8V2M1jixEyHBqD+Suu2TnkUiGtY+NOUV45Zcc/DKbhNq/kTe3kunXRa1hIg+ZzihxrhMJ NtxWZOYaCYyJerT3+4nWUcHCgtdDKRL/4bpCC3q2SCT5xWun3rExvxvCAc9PJEC+/YxCmZLn RAaAGlTNFbZ3bvwme/lDLk37iggBJCD0Ic3k3ds1zzGS90hRojOWf7i7t5ExjYgwMtJGJ4yY uJHNGU1NkyaM3WjPH9GF5sVgLulj0Cvah17qVW1lfRovTTqmVkZPL/Fb4OOJ43iqd9utkWfo HjP8yLmAxUZHNuFwDGB/zSngeqntSHmXIMfEpWo+/gsh0ecrkQfDxAcWF+TqPywmEm4Hd5SQ 2QE9yxroaUs+UiDStjmQwb+sHOCpgQbWddbD6s98g7l90bPy1/HXC5eFGcHMYF48p9tLdA36 rOXt/LIHicor/qfc3jDqa6+jgK7NC8sA0ZXMEfoUjA5y9XkpYgyiDfGQdBiDLO5g7XJJN3g/ 9yZhHNg3utO1Kbnw43+pAma2Gz0+vAlWyZovl2/Y46z0u9uiGdJjaSM4EOT0/tPJZ3xorKp7 CldwJj2AAzj4PiweM2xrAclQenBCxWtamS0bbtT838JrW7FF5mLJ9043d2GDB01WvvogBewC KMphStf5YVIIFyhZrJtboS6BqwClPa8S427DqiFMIMfOPCdkTNrGgk0PyZ8OEi3zSARfVwXY 8/HIa5A815AYUiY8NZGb7hEiuJ6rszP7WjSWYr633yaPUm2PxaopUM+GALWNIgRtfrcyC2Mq oo3H5bamn13DbylCgGKoNF7ELz/BSVibXwAg5cMLbDrz8sPMDxJNsI9Npt6I901x/kOz7yQl px/M2cBoGfCabT8AVziQlhoaa/1XIY5qnQ+PCc2Ok2v1WRlaoGqhJrzvbNtFVX73ISPFcJJc sQ=
  • Ironport-hdrordr: A9a23:VtZ3SahU3BvWWBsbYOZL4QAmcHBQXt4ji2hC6mlwRA09TyX+rb HIoB17726RtN91YhodcL+7VJVoLUmyyXcX2+ks1NWZMjUO0VHAROsO0WKI+VzdMhy72ulB1b pxN4hSYeeAaGSSVPyKgzVQxexQouW6zA==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYLkHgSrb/iAL0mEi291/GjB3zE6ysO3wAgAAD/YA=
  • Thread-topic: [PATCH 4/4] livepatch: differentiate between old and new build systems

On 02/03/2022 15:41, Doebel, Bjoern wrote:
> On 02.03.22 15:27, Roger Pau Monne wrote:
>> CAUTION: This email originated from outside of the organization. Do
>> not click links or open attachments unless you can confirm the sender
>> and know the content is safe.
>>
>>
>>
>> Do not attempt to modify the build system if CFLAGS are not set in
>> Rules.mk, and instead rely on CONFIG_LIVEPATCH already setting
>> -f{function,data}-sections.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>> ---
>> This depends on getting the patch to add -f{function,data}-sections
>> when using CONFIG_LIVEPATCH accepted.
>> ---
>>   livepatch-build | 22 ++++++++++++++--------
>>   1 file changed, 14 insertions(+), 8 deletions(-)
>>
>> diff --git a/livepatch-build b/livepatch-build
>> index 38a92be..656cdac 100755
>> --- a/livepatch-build
>> +++ b/livepatch-build
>> @@ -98,14 +98,20 @@ function build_special()
>>
>>       # Build with special GCC flags
>>       cd "${SRCDIR}/xen" || die
>> -    sed -i 's/CFLAGS += -nostdinc/CFLAGS += -nostdinc
>> -ffunction-sections -fdata-sections/' Rules.mk
>> -    cp -p arch/x86/Makefile arch/x86/Makefile.bak
>> -    sed -i
>> 's/--section-alignment=0x200000/--section-alignment=0x1000/'
>> arch/x86/Makefile
>> -    # Restore timestamps to prevent spurious rebuilding
>> -    touch --reference=arch/x86/Makefile.bak arch/x86/Makefile
>> -    make "-j$CPUS" $XEN_DEBUG &>
>> "${OUTPUT}/build_${name}_compile.log" || die
>> -    sed -i 's/CFLAGS += -nostdinc -ffunction-sections
>> -fdata-sections/CFLAGS += -nostdinc/' Rules.mk
>> -    mv -f arch/x86/Makefile.bak arch/x86/Makefile
>> +    if grep -q 'nostdinc' Rules.mk; then
>
> This means we are still breaking livepatch builds for all Xen versions
> between your recent patch and the original patch that moved CFLAGS to
> xen/Makefile (commit 2740d96efdd3009f8adb40aacdbcf05cfe8d1bbb, Fri Apr
> 24 14:57:10 2020 +0200).
>
> Is this acceptable? (I mean, no one seems to have noticed...)

So yeah - not putting this into OSSTest has had exactly the forseen outcome.

The steps now are to unbreak it by whatever means are necessary, then
get CI in place so we can't regress it again.

The tip of livepatch-build-tools should work with all versions of Xen. 
If this means we need to backport fixes into the staging-* branches,
then so be it.

The downstream users of livepatching have patchqueues anyway, and these
breakages are not the kind of thing which could slip though even a token
testing attempt.

As far as this issue goes, I suggest that we do what we can to avoid
livepatch-build-tools needing to do surgery like that on the build
system, then backport it everywhere.  The above is the kind of fragility
which really shouldn't exist :-/

~Andrew

 


Rackspace

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