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

Re: Revert of the 4.17 hypercall handler changes Re: [PATCH-for-4.17] xen: fix generated code for calling hypercall handlers


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 4 Nov 2022 08:36:28 +0100
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6o5I+unWrKBz23NDGdU2Nfnf2XkDseZ3RkXPVSz1gYk=; b=LuF3uyuBmCXFyUXZLAxHqnDTfy7RAFpAdDSrgJLTaDRS2MkbY6Lo55TThyXxAd60a6a0M7bcKYTqufAGuRMyuEXFkkLXFiI/U1E9j7CY2ULHsul+vfcj7CE0+TtKNModFCWWW2uwUI6X/pB509vRdIHJ5DY/g1VFImoeHsf5T6y8PBeL9yLfjMMQofrVlT/I/jAMqtxbYE3xAZyEka9FnrVbF5YqUXy3bfZyVzoHYEWVR4wLp+n/xbSf9Iwgqcrm5KkjAAfIjgFa6Oa1IuPNlQVHEiTpv68eWfS+Be8u2iR4n39Q0rl1sEUAspnfauFF3b4Gwk6lgJ3sJo7GZZ5GGg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FHuzz8QiJ3++L3n1KHr+kiIszXGORMp4ZZHX8L3DkA/5Qrr6IYl1pv72uD0JcOG/kTGbkivXJpS1uv64s/Fg5i0zTaNYCPUIbBodq98SXrBKAhl+vt1qCXEURLzgfc3Ap2At7vr9+A+lH8I52sufsP1zDZD8Xlr7hQOxp8JOrgVPdwr6i6mFJxqCNSwyQS4usFbVKDkcjQ61ZXvWaPmDSDFMpwFX7fdiDrQmTtoOzjD8TLre1+z5hy5+Kr6CxERJpCKQ3Tp7T9oIqKe4vMDUSghEyex3u8EmuAJ2Pb7gTJ0aoNS7IDY0R3y0U4o+EvewNnd0mB0rYJas8o2KMO8HRg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <George.Dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 04 Nov 2022 07:36:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04.11.2022 06:01, Andrew Cooper wrote:
> On 03/11/2022 16:36, Juergen Gross wrote:
>> The code generated for the call_handlers_*() macros needs to avoid
>> undefined behavior when multiple handlers share the same priority.
>> The issue is the hypercall number being unverified fed into the macros
>> and then used to set a mask via "mask = 1ULL << <hypercall-number>".
>>
>> Avoid a shift amount of more than 63 by setting mask to zero in case
>> the hypercall number is too large.
>>
>> Fixes: eca1f00d0227 ("xen: generate hypercall interface related code")
>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> 
> This is not a suitable fix.  There being a security issue is just the
> tip of the iceberg. 

I'm going to commit that change nevertheless. _If_ we decide to revert,
reverting this change as well is going to be easy enough.

Apart of this I can only fully support Jürgen's earlier reply, adding
that iirc it was in part you supporting and/or motivating the change
originally. It is perfectly fine for you to have changed your mind,
but it doesn't help at all if you indicate you did but don't say why.
Even for the change done here you left everyone guessing where the
problem would be that you did hint at in, afaict, merely a private
discussion with George originally. I'm glad it was enough of a hint
for Jürgen to spot the issue. But then ...

> The changes broke the kexec_op() ABI and this is a blocking regression
> vs 4.16.

... you repeat the same pattern here.

> There was one redeeming property of the series, and yet there was no
> discussion anywhere about function pointer casts.  But given that the
> premise was disputed to begin with, and the performance testing that
> stood an outside chance of countering the dispute was ignored, and
> /then/ that my objections were disregarded and the series committed
> without calling a vote, I have to say that I'm very displeased with how
> this went.

For there to be a need to vote, there needs to be an active discussion,
laying out all the issues, such that everyone who would eventually have
to vote can actually form an opinion. We were quite far from that point.

In fact, seeing the repeating pattern of you voicing objections without
then following up, in the "Progressing of pending patch series" design
session in September in Cambridge I did suggest that not followed-up on
objections should expire after a reasonable amount of time. Just giving a
vague "no" (not always quite as brief, but we had extreme cases) should
not be sufficient to block a patch or series indefinitely. This is still
only a suggestion of mine, not the least because it's not really clear to
me how to progress this into something more formal, but there were no
objections to such a model there nor in reply to the notes that were sent
afterwards.

Jan



 


Rackspace

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