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

[PATCH 0/4] Fix truncation of various XENVER_* subops


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 3 Jan 2023 20:09:39 +0000
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, Daniel Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 03 Jan 2023 20:10:17 +0000
  • Ironport-data: A9a23:Sm87RalYXZe1VtTXKmr0tIHo5gxsJkRdPkR7XQ2eYbSJt1+Wr1Gzt xIXDGDUOP7eYmSjLd9zPoy+ph5Xv56AyNVlTws5+CwxEyMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icf3grHmeIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE4p7aqaVA8w5ARkPqgS5ASGyxH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 cIocj1XdS++vey3yeiQdNlc3J16Lda+aevzulk4pd3YJfMvQJSFSKTW/95Imjw3g6iiH96HO ZBfM2A2Kk2dPVsfYT/7C7pn9AusrlD5fydVtxS+oq0v7nKI5AdwzKLsIJzefdniqcB9zhfJ9 jqdrjmR7hcyE4GPl3nfzWuXtvLGnTvWZoVKC6+Z+as/6LGU7jNKU0BHPbehmtG7l0q/VtR3O 0ESvC00osAa60iDXtT7GRqirxassgYHXttME8Uz8AyX1rfP+AGdG3QFSThaLtchsaceSTMm2 1CTlvv1FDdvt/uTUnvb+bCKxRupIjQcJ2IGYS4CTCMG7sPlrYV1iQjAJv5zHajwgtDrFDXYx zGRsDN4l7gVldQM1aiw4RbAmT3EjrrjQxMx5w7Xdnm49Q4/b4mgD7FE8nCCs6wGdtzACADc4 j5UwKBy8dziE7mzpHaAGv4yIYun5v/fGwPssQQ2Rpg+omHFF2GYQahc5zR3JUFMO8kCeCP0b EK7hT699KO/L1PxM/YpPtvZ59ACiPG5SI+7Dqy8gs9mOMAZSeORwM15iad8NUjJmVNkr6wwM IzznS2EXSdDUvQPINZbqo4gPV4XKsIWnzi7qXPTlU7PPV+iiJm9F9843KOmNLxR0U99iFy9H yxjH8WL0Q5Dd+b1fzPa94UeRXhTcydhWs+u+5wPL7LTSuaDJI3GI6aIqY7NhqQ/x/gF/gs21 ivVtrBkJKrX2iScdFTihoFLY7LzR5dvxU8G0dgXFQ/wgRALON//hJrzgrNrJdHLAsQ/l68rJ xTEEu3caslypsPvomlENcGk/dEyK3xGR2umZkKYXdT2RLY4LyShxzMuVlGHGPUmZsZvifYDn g==
  • Ironport-hdrordr: A9a23:mtaaPqP8jMQ7OcBcTgWjsMiBIKoaSvp037BK7S1MoH1uA6mlfq WV9sjzuiWatN98Yh8dcLO7Scu9qBHnlaKdiLN5VduftWHd01dAR7sSjrcKrQeAJ8X/nNQtr5 uJccJFeaDN5Y4Rt7eH3OG6eexQv+Vu6MqT9IPjJ+8Gd3ATV0lnhT0JbTqzIwlNayRtI4E2L5 aY7tovnUvaRZxGBv7LYEXsRoL41qT2qK4=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

See patch 4 for details of the problem.  Other patches fix other errors found
while investigating.

This is only the hypervisor side of the change for now, because I want
agreement before starting to untangle the mess which is libxc's helpers for
this.

Also a disaster is Linux's sysfs handling for these.  In several places it
makes a heap allocation for a pointer (or two) sized object.

Andrew Cooper (4):
  public/version: Change xen_feature_info to have a fixed size
  xen/version: Drop compat/kernel.c
  xen/version: Drop bogus return values for XENVER_platform_parameters
  xen/version: Introduce non-truncating XENVER_* subops

 xen/common/Makefile          |   2 +-
 xen/common/compat/kernel.c   |  53 ---------------------
 xen/common/kernel.c          | 108 ++++++++++++++++++++++++++++++++++++++-----
 xen/include/hypercall-defs.c |   2 +-
 xen/include/public/version.h |  78 +++++++++++++++++++++++++++++--
 xen/include/xlat.lst         |   4 ++
 xen/xsm/flask/hooks.c        |   4 ++
 7 files changed, 181 insertions(+), 70 deletions(-)
 delete mode 100644 xen/common/compat/kernel.c

-- 
2.11.0




 


Rackspace

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