[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>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 2 Mar 2022 16:51:29 +0100
  • 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=tp7BP6YDX7sYiHsbnawkPE+zGuVmcllsQOjveyqMa0o=; b=OvIfXr7ckNPIByUqtrqveMg/UUOezTSE/2CmCzHr1WPshxC6g32uXANl8GidgFQhNo9Snn180IDTfpTyc1zCgCeQAjk+3CutRTDE8Jn/y/21okobe0NtGDPq0S7ayd/ScNYpi9KYctqF/P4Ompxgb4Ti5Zay1JqMp8kopUkqDeo90BDk2ofo+z9coJCBLpPyTEMAMNTrlGhJaiy+IMH2aq/1ZlHzjvsNrDTf5h9ae2XfiSYiWbxlrNS9y7uSVF614q7d8vpLfZeREdpYpEvvK3UhXfYXzxxL2YM9+osmO//4xLd8P/t3mLbjCQQx7iv+Hb27cTFfsSuhDSsR5sfPRQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M6xHYHx/g3ewSPetgZBV9FMuMwvaSUG8PON+ltxmPypusIeiq+fly8gkKYT2YUur5R/4GoSLj5gCTCDT4S4oL0YGOj8Qcy+8FZothtnLRc8I2ZH/7GZiWk2AHwQ0K53Gf1q6gVj1WzGTDKunnijta7jWi8fiQNcEfnsb8j2YWy3uHUvSzHY2Ex+yBtOVd4qDsKMB4DyHkbJjKfAaJdKheu+e3G7fKAEhXPsTqLo5OLG6jMmS2juBl95nsEupWbTWYH3y2eQa9ye1e96VSkME2ArbMd6/Md4aIBTKttZ0QeTxh5Tu6ccWg1bOmvTJv2uv469sb6681+NwzEJbEZO36w==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <ross.lagerwall@xxxxxxxxxx>, <konrad.wilk@xxxxxxxxxx>, <julien@xxxxxxx>, <Andrew.Cooper3@xxxxxxxxxx>
  • Delivery-date: Wed, 02 Mar 2022 15:51:42 +0000
  • Ironport-data: A9a23:CdZL5qKna0rAAFe0FE+R+pUlxSXFcZb7ZxGr2PjKsXjdYENS0GEBn 2NLDDvUbKuONDemf4gjOdjkoU1UsZ+BztBmHQNlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vrav67xZVF/fngqoDUUYYoAQgsA148IMsdoUg7wbRh2dYy2YPR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 Md0vrC9VSw7Bb3Nl9sESCt/PgNAPJQTrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBNPsM44F/Glp0BnSDOo8QICFSKLPjTNd9Gls2Z8URa6PD yYfQSEzYAyHIABpBmg8N80R3/vxg1/kaTIN/Tp5ooJoujOOnWSdyoPFM93TYNWGA9pUmkWwo XjP9GD0RBodMbS3yyeB83+qrv/Cm2X8Qo16PLG/+/RnhHWaw2UBDxtQWVbTiem0jAuyVsxSL 2QQ+zEytu4i+UqzVN7/Uhak5nmesXYht8F4SrNgrlvXk+yNvljfVjNsoiN9hMIOpvY9aTE2/ U2yj9LmOiV0gpq4a0ycz+LBxd+tAhQ9IWgHbC4CaAIK5dj/vY0+5i7yosZf/L2d1YOsR2ypq 9yehG1n3uhI05ZXv0mu1Q2f21qRSo71ohnZD+k9dkas9UtHaYGsfOREAnCLvK8bfO51orRs1 UXoevRyDshTVflhdwTXGY3h+Y1FAd7falUwZnY1QvEcG8yFoSLLQGypyGgWyL1VGsgFYyT1R 0TYpBlc4pReVFPzM/MpOtzpU5V0lPm6fTgAahwyRoAUCnSWXFXalByCmGbKhzy9+KTSuftX1 WinnTaEUi9BVPUPIMueTOYBy747rh3SNkuILa0XOy+PiOLEDFbMEO9tGALXMogRsfPVyC2Io o03H5bblH1ivBjWP3C/HXg7dgtRcxDWxPne9qRqSwJ0ClE+STF5VqSImutJlk4Mt/09q9okN 0qVAydw4FH+mWfGOUONbHViY6noRpFxsTQwOilEALpi8yVLjVqHhEvHS6YKQA==
  • Ironport-hdrordr: A9a23:yh+3Fav2Fve8YyUn2nYyJQUC7skDWNV00zEX/kB9WHVpm5Sj5q STdYcgpHjJYVcqKQsdcL+7WJVoLUmwyXcx2/h1AV7AZniahILLFvAA0WKK+VSJcEfDH6xmpM VdmsNFZ+EYeGIasS+M2meF+rgbrOVvu5rY49s2h00dND2Dfclbnn9E4yigYzZLeDU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Mar 02, 2022 at 04:41:36PM +0100, 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...)

I've also wondered. I think a reasonable approach would be for
interested parties (ie: using livepatch) to backport the commit that
sets -f{function,data}-sections in their Xen build for that broken
window.

I think we could also consider it as a candidate for backport to
stable branches, but that won't fix versions we have already
shipped.

Thanks, Roger.



 


Rackspace

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