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

Re: [PATCH 2/2] hvmloader: do not include system headers for type declarations


  • To: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 24 Feb 2021 13:19:23 +0000
  • 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-SenderADCheck; bh=U5tDomzb85iVlXrYubYyW0d9mDUTX4a2KHOHlXo7OJU=; b=dB9nXTUIRDcRXKtuANYFMPRMUjYJZULRpabCiJ/yMYZbGM0DQaioXUsvHVUHn01wxHQAJX5fJwW581iM0GsSJDr9YvBVmYD27x0zNRu9oqTglj4DSEiFDrmoAO9RLtHaIWMZBAtm2Q5pS4N1qzyz3ZiqisYacm9avmecuqkg93otdVJNQiEITqpjroBlOfLFKUMDztN4W3I3k2VFp1kpMHqtPNR4hkt8vi3BCKRIIjFTokxxDt0VcP77W+HC74c6rtTyPixWWEgzxNiHzHHLC0+KAQiV3uFruelEmSbu4VHMLuxvJLip4/93pGaVxEyL8YVzzLQQox6i0XuFH2j8+w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NOp3XA7R+yLaaLssaHVR26Y+KK6+Xe603MDGipN225uKKCr5V6Cq62lI0HsDU5z2Db6YLAXicgyNCfhEUfm55yWM9VoUclwuMbgvQXYgWAPBrDxi9LBam8t1mQwSe47iWg2bsHOCt6Oks0iJk1w6eSVu+foA1QuQv9wtb0wDDHw9V0h1ALJTv/a53dQUC6yyPU7KygmfQexzApbQajGyhiGTWDovdgLHZepxDkwsRjcolm9K1ajavNPv+Y4ZYSZL/xe+FiQGwbsyn4IJP7AbOlJER8h/yc6M69MgR3bFlKGWBcdQK9py3c8hz/v552a9NHIwVgpDAmUgCIZBNfdddw==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 24 Feb 2021 13:19:50 +0000
  • Ironport-sdr: 8SjJ09VYnBnjhFlRMP2dXrPB/MfQ9AhT/eUewo+tB6w5lzsh6sYzzYjKNtMgM7K1kCXVb868sB cpebFqRTYGE1tq/jvChDxamXoRlHhrIQyHehYz2sYMNEKup4SMpNUdr4R8RxXQauCNB3Qd8pvm nVjO9tgJZjhcFDg4l7lrxwcA+zD2KCkPeM0a5lgKKC/2J7yH05hopgo7V+PklaRjP2bk4RG0Gs mW49VYq/xy1603IPZxiq+25ktm0UVnQTU9QLG5Ug6WdNVfnS+qXx3aIvzq/ycbO38YPmPXTWDK 03E=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24/02/2021 11:07, Ian Jackson wrote:
> Jan Beulich writes ("Re: [PATCH 2/2] hvmloader: do not include system headers 
> for type declarations"):
>> Like the hypervisor, we should prefer using __SIZE_TYPE__
>> when available.
> I disagree.

size_t is obnoxious in the C spec.  It might not be the largest native
word size on the processor, and in some 64bit environments, it really is
32 bits.

It cannot be correctly derived from a standard type, and must come from
the compiler, because it critical that it matches what the compiler
generates for the sizeof operator.

Posix being fairly sane prohibits environments where the maximum object
size is smaller than the address size, which is why aliasing it to
unsigned long works in the common case.

~Andrew



 


Rackspace

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