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

Re: [PATCH 1/3] tools/libacpi: Use 64-byte alignment for FACS [and 1 more messages]


  • To: Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 13 Sep 2021 09:08:00 +0200
  • 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; bh=2knjgkLZn1y6wm3AKSFjUsFCFY2s2it+KcMcLQZnVQE=; b=GWcHH+SVtMZ2V8YAxkcTxrsPpOpfRQIQ7LZ49//78rghTP6lskpVMIUih4bKqWTu+ML2h72u1LmnXQtKKrGEM4DXB2rd+Uq7FDW1M9oCNCjWAx1MRC1Aj6Dt3Rdh8Zj7dmB+daYTPSH+pyERWFJ3s2SHAdAqnJTVZ5S/EdEQY6DcJEx5J1PY5qsTXjJWnQynRSeoO71H9SNcakXVFtpWM61ht/RoE1JTDhgJO9OxMfo6i17CNzUh9SreWCXnORu4F2R1btP6pc/HBgBMvnclXqv9XyLPqCbJiYxF1x3rCLLfD+8ghZ0myoa3L7FiFKUA32dlcrJTR1rdiJ+GNPZScQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OzpSyz+DCXr5KwWgJHenk1WbxRrw1loOlPBtpdKzF2Ar01yqtisAN8P0OX4DodTxDBDTySouNRhgoTGkTLJkBLnQcaF0GEbiQqQ5hSH0589gEd7aDCRuVUo34y5/tx8ddffiPYaB2WEcX/6eVIMBNmsaxHe/BgxdEVOT+ywkOQkR8xmAg8plK2DmQzV0f/ltc+C8c6+VPwqRDSSJ61EVNrL/rUkCcplvS+Zm9KTS8NHyqdS3TRD9ZUh2fqXH9toWeYnQCUOOmgJnEQTxF2ZWlRaOZLDVSoNpkFX46dbCLtLn5eakCCp8cpnQZffiFGudvVDQoeX0+58GO2Nki4itWA==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Mon, 13 Sep 2021 07:08:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10.09.2021 16:50, Ian Jackson wrote:
> Andrew Cooper writes ("Re: [PATCH 1/3] tools/libacpi: Use 64-byte alignment 
> for FACS"):
>> The current code is clearly wrong, but happens to work correctly in
>> hvmloader because FACS is the first table written and it starts on a
>> page boundary.  The logic does not work correctly when libxl passes a
>> buffer which doesn't start on a page boundary.
>>
>> As a consequence, I'm not sure what to suggest as a Fixes tag here,
>> except "the logic has been wrong for 15 years - patch everything".
> 
> Jan Beulich writes ("Re: [PATCH 2/3] tools/libxl: Correctly aligned buffer 
> for ACPI tables"):
>> But the buffers obtained via libxl__malloc() have no association with
>> guest address space layout (or at least they aren't supposed to have).
>> That's solely determined by mem_alloc(). I think it is a bug of
>> mem_alloc() to determine padding from alloc_currp; it should
>> rather/also maintain a current address in guest address space (e.g.
>> by having separate alloc_currp and alloc_currv). Not doing so leaves
>> us prone to encountering the same issue again down the road. For
>> example if higher than page alignment was requested from somewhere in
>> libacpi.
> 
> I think the two of you are saying roughly the same thing here ?

That's my view of it, indeed.

> There was a question about how (and if) this should be backported.
> I'm afraid I don't quite follow all the implications, but I doubt that
> a a substantial overhaul as described would be a good idea for a
> backport.  What is the impact for backports, and can we have a more
> targeted fix there ?  Are, in fact, Kevin's original patches, suitable
> to fix the issue for stable trees ?

I think they are; the risk with not (also) backporting the more complete
fix to do away with the bad assumptions is that eventual subsequent
backports may then run into the same issue again. Like Andrew suggested,
I think we want to first see how intrusive a "proper" fix is. If it's
really "bad", we can still decide to backport only the original change
(which I'd rather view as a workaround) while trying to make sure future
backports won't end up hitting the underlying problem.

Of course there's also the option to simply declare "future backports
here are unlikely"; I wouldn't really like such, though.

Jan




 


Rackspace

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