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

Re: [PATCH] livepatch: set -f{function,data}-sections compiler option


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 2 Mar 2022 17:13:46 +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=2hervgjJMGhuzaYXWXwQM/fbWQrktTuhnNCgLrvmR/E=; b=CrtzXVfbug4RA17Np0p5jM+H2R56soQtIsrU8vio+ThhQdnGw5SmMEGCz9JSDXjCDb1+qmY+s6A+tZu5BMT8HA9kY1ql/nRZRyiuZ4fX4tH/cadGyqisC4z5nO5MqusBFcsfnEgjpC8AduGRvhOd9cAtxobH9t2nqZLCLcqK4K7VH4leWkc1XdE4kQ2eeBk77+DtVylBQbqTu84fInspWmBaXTCy62LcSLXTNZ12ZeZetOX5cxgtgXiI59+UF0O9/WrYU/dWMSa02mriVHs8S94DpEoNyShP5SSDCWY/5E2/tW8zp+eWBee+UhoO0D/3Hbih9uVegICGszn3XAq/Zg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CjyFURgjNEZMcitvdr0/FYITJagHIy+U7ACbsLsoi9pfAbv01Mrk+v9C9s1NfMAzaDeYrmpOv8Oz4Pv/UXMlSuBv1oEVxD0iteEs3yWb74r3hIQ2D616oPropgETvBw3X7zT6wRCcU3WUF4EKsLspDIEHm+gsNq4CRxPE6v0OlE7jKO5FclB01iQ8IFMFDshQj1Ge5bvqKDBasnIKTbetXFAhaCKc9/zoZmViJ9h97byrFFK8oNfsN3xBVkkFLo0RMYrdbdW8wE+ljfDypo1bMNk3EMQcvqtriDM7/N3MLMRUKvcskvTUy/+SiT95Ut//O9otXu3mAtM8+ov119iQA==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, 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>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 02 Mar 2022 16:14:00 +0000
  • Ironport-data: A9a23:s5E2Naq3QR7CbfZFGE9m/rPX1IleBmLsZRIvgKrLsJaIsI4StFCzt garIBmEP/vYYGf1KownPIrkpE4EsMDcz9ZmQQRlpH9kQioU9ZuZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlVEliefQAOCU5NfsYkidfyc9IMsaoU8lyrZRbrJA24DjWVvW4 Ymq+KUzBXf+s9JKGjNMg068gEsHUMTa4Fv0aXRnOJinFHeH/5UkJMp3yZOZdhMUcaENdgKOf M7RzanRw4/s10xF5uVJMFrMWhZirrb6ZWBig5fNMkSoqkAqSicais7XOBeAAKv+Zvrgc91Zk b1wWZKMpQgBEYbth/UhShdiIjxlevV8353GGEa4rpnGp6HGWyOEL/RGCUg3OcsT+/ptAHEI/ vsdQNwPRknd3aTsmuv9E7QywJR4RCXoFNp3VnVI1zbWAOxgWZnea67L+cVZzHE7gcUm8fP2O ZdCMGE2NUuojxtnAQhMV5QlveKSwTrmWWN39wmMgKsQ7D2GpOB2+Oe0a4eEEjCQfu1Kmm6Iq 2SA+H72ajkQOcaD0zOD/jSpj/XWgCLgcIsIEfuz8fsCqGOUwmsfGRgHT2yRqPOyilO9c99HI klS8S0rxYAp71CiRNT5Wxy+oVaHswQaVt4WFPc1gCmdx6yR7wuHC2wsSj9adMdgpMIwXSYt1 FKCg5XuHzMHmL+fRG+Z97yUhSivIiVTJmgHDQcGUA8E7t/LsIw1yBXVQb5e/LWd14OvX2uqm nbT8XZ41+57YdM3O7uT0nvmnCOQv5bzfxMuoV3teUCk1z1+e9vwD2C30mTz4fFFJYefa1COu nkYhsSThNwz4YGxeD+lG7tUQuzwjxqRGHiF2AM0QcF9n9i40yP7JehtDCdCyFCF2yruURvge wfttAxY//e/11P6PPYsM+pd5ynHpJUM9OgJtNiJNrKigbArLWdrGR2Cg2bKhQgBd2B2zMkC1 W+zK5rEMJrjIf0PIMCKb+kcy6Q34Ss12HneQ5v2pzz+j+bAPSDNEeZbaQrUBgzc0E9iiF+Pm zq4H5HXoyizrcWkOnWHmWLtBQpiwYcH6WDe9JUMK7/rzvtOE2A9Ef7BqY7NiKQ+95m5Ytzgp ynnMmcBkQKXrSSedW2iNyAyAJuyDM0XhS9qYkQR0aOAhiFLjXCHt/xEKfPavNAPqYRe8BKDZ 6JdKpXYX68WEWyvFvZ0RcCVkbGOvS+D3GqmFyGkfCI+b9hnQQnI8cXjZQzh6G8FCS/fiCf0i +TIOt/zKXbbezlfMQ==
  • Ironport-hdrordr: A9a23:dl74rKtpKYIfjwwlfWlzSkFp7skDSNV00zEX/kB9WHVpm6uj5q eTdZUgpHvJYVkqKRMdcLy7WJVoIkm8yXcW2/h2AV7KZmCP0gbFEGgL1/qa/9SKIVyaygcy79 YCT0FWMqyJMbAk5vyQ3ODDKbgdKXO8gduVbJzloEtQcQ==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Mar 02, 2022 at 03:35:07PM +0000, Andrew Cooper wrote:
> On 02/03/2022 13:44, Roger Pau Monne wrote:
> > diff --git a/xen/common/Kconfig b/xen/common/Kconfig
> > index 6443943889..2423d9f490 100644
> > --- a/xen/common/Kconfig
> > +++ b/xen/common/Kconfig
> > @@ -353,7 +353,9 @@ config CRYPTO
> >  config LIVEPATCH
> >     bool "Live patching support"
> >     default X86
> > -   depends on "$(XEN_HAS_BUILD_ID)" = "y"
> > +   depends on "$(XEN_HAS_BUILD_ID)" = "y" && \
> > +              $(cc-option,-ffunction-sections) && \
> > +              $(cc-option,-fdata-sections)
> 
> cc-option can take multiple, so just $(cc-option,-ffunction-sections
> -fdata-sections)
> 
> However, we in practice want these in combination with $(LD)
> --gc-sections anyway although that wants to be separately configurable.
> 
> Therefore, we probably want something like:
> 
> config FUNC_SECTIONS
>     bool
> 
> config LIVEPATCH
>     selects FUNC_SECTIONS
> 
> or so, so in the future we can add "config LD_GC_SECTIONS" which also
> selects FUNC_SECTIONS.
> 
> Thoughts?

Do we want separate options for ffunction-sections and fdata-sections
options, or is FUNC_SECTIONS supposed to cover them both?

I assume you are fine with Jan's suggestion to not check for the
option presence, since it should be in all supported versions.

Thanks, Roger.



 


Rackspace

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