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

Re: [Xen-devel] [PATCH V2 3/6] [RFC] xen/common: Introduce _xrealloc function


  • To: Oleksandr <olekstysh@xxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Thu, 8 Aug 2019 07:05:08 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.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=dABkvVeFxsRihtNswh6Z8MgpMndoVk/5+JNbwFDPSJw=; b=X+GiXlfxXQEEM3FVOZGnkhzQZmoMrh4NhpCC+dNIKf7gPhNbLiu4fD3Yt5UV89K7CeB/67TeH569sRbJVqQu4Q2VL/HieJvsRnOdY3dpzpkHrbgeGBZFiGDepaxYf7wjX//36X1I6FeidbO6DscnOJf55b5rTBMQg7X2iI84sxbHWBUw0YXxYJ6+0tTgUPFxdE0W71KNYgk6GzsGMmi0gl3ew4n2mu3BuMKOWBV4z+MRxEvObe+S0onRVt2QbBgKnwT4lDOLzwbj2NA2UQtq2ONW20evMD7OTAaXdAec2voscOX8kKq+6tHPkrBwxfV5Ztz12a9/ohmc2JH4FwBc1w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TMhehjFaen9K31Xk3bEtZV+mV8uEd7UsQ82gkl3v3NvpkdWkRXXOzESzXHe+ln5RasfOLaIzXN88CIqYcDi9CyjbOj4RMbE0p8TGtBl+eqB2HXaezYP73z9oeMzDWyFWnymwk37qrCrW7gjUExIC/AAs9tVw+VyDXqsSJ08uqFQmmYrlyM55TlIXR8t8RZwux5q05a+5yxh8JbN7ZkrOjU2nFph1RRxTs2eeIccc4kTakQqF2opymoTGzJ0ZadV+Lji7VA27QvwKQBB9rD92GIfOUp/PEoLbTST9J7P5duph2bWdpzYuHWj3fklY6aWHT/6Beg38tRr87DKT7ktlnQ==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, AndrewCooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, "julien.grall@xxxxxxx" <julien.grall@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 08 Aug 2019 07:07:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVTbec/HxtyA8UA0eaMlcBWmBXEQ==
  • Thread-topic: [PATCH V2 3/6] [RFC] xen/common: Introduce _xrealloc function

(I'm sorry if you receive duplicates of this, but I've got a reply
back from our mail system that several of the recipients did not
have their host names resolved correctly on the first attempt.)

On 07.08.2019 20:36, Oleksandr wrote:
>> There's one more thing for the re-alloc case though (besides
>> cosmetic aspects): The incoming pointer should also be verified
>> to be of correct type.
> 
> Jan, how this could be technically implemented, or are these any existing 
> examples in Xen?

See x86's copy_to_guest_offset(), for example. To get the compiler
to emit a warning (at least), a (typically otherwise dead)
comparison of pointers is commonly used.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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