[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] libxl: slightly correct JSON generation of CPU policy
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Tue, 15 Aug 2023 16:01:04 +0100
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 15 Aug 2023 15:01:32 +0000
- Ironport-data: A9a23:OaXLk6Poxv3D8lLvrR2Yl8FynXyQoLVcMsEvi/4bfWQNrUol32BUz mpNUT3Ta/qIYmH9KNFwOti/8RgBuZWByYRhGQto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQAOKnUoYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGjxSs/vrRC9H5qyo42tI5wFmPJingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0ttSA39A2 dMIFG0uLSughO2y0ryQVvY506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEN3w2Nk+ojx5nYz/7DLo3mvuogX/uNSVVsluPqYI84nTJzRw327/oWDbQUoXTFZUMwBbJ/ goq+UzeLQAjbM7D+AOurG6W2+jBmBulYrkdQejQGvlC3wTImz175ActfVmxrOS9i0W+c8lCM EFS8S0rxYAi+UruQtTjUhmQpH+fogVaS9dWC/c96gyG1uzT+QnxLncAZi5MbpohrsBebT4lz FiShPvyGCdi9raSTBq1/6+ZtzqoNQAJLGUJYmkPSg5t3jX4iNht1FSVFI8lSfPryISvQlkc3 gxmsgADorcNg+Ikx5nm3hP8oDGjoorHZRIqs1C/sn2e0it1Y4usZoqN4Ffd7OpdIIvxcmRtr EToiODFsrlQUMjleDilBbxUQer3v6rt3Cj02wYHInU3y9i6F5dPl6h06So2GkpmO91sldTBM B6K4lM5CHO+0RKXgU5Lj2CZUZlCIUvIT46NuhXogj1mO8EZSeN/1HsyDXN8Jki0+KTWrYkxO I2AbeGnBmsABKJswVKeHrlMi+dwlnhvnDqKHvgXKihLNpLEOBaopUotagPSPojVEovVyOkqz zqvH5TTkEgOOAEPSiLW7ZQSPTg3wYsTXPjLRzhsXrfbeGJOQThxY8I9NJt9I+SJaYwJzLaXl px8M2cEoGfCaYrvcFzVNS89NuK0DP6SbxsTZEQRALph4FB7Ca7H0UvVX8FfkWUPnAC78cNJc g==
- Ironport-hdrordr: A9a23:gAYnCqMlMffnscBcTgWjsMiBIKoaSvp037BK7S1MoH1uA6mlfq WV9sjzuiWatN98Yh8dcLO7Scu9qBHnlaKdiLN5VduftWHd01dAR7sSjrcKrQeAJ8X/nNQtr5 uJccJFeaDN5Y4Rt7eH3OG6eexQv+Vu6MqT9IPjJ+8Gd3ATV0lnhT0JbTqzIwlNayRtI4E2L5 aY7tovnUvaRZxGBv7LYEXsRoL41qT2qK4=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Tue, Aug 15, 2023 at 04:44:57PM +0200, Jan Beulich wrote:
> On 15.08.2023 16:28, Andrew Cooper wrote:
> > On 15/08/2023 3:26 pm, Anthony PERARD wrote:
> >> On Tue, Aug 15, 2023 at 02:35:55PM +0200, Jan Beulich wrote:
> >>> The "cpuid_empty" label is also (in principle; maybe only for rubbish
> >>> input) reachable in the "cpuid_only" case. Hence the label needs to live
> >>> ahead of the check of the variable.
> >>>
> >>> Fixes: 5b80cecb747b ("libxl: introduce MSR data in libxl_cpuid_policy")
> >>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> >> Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> >
> > Hmm - this was included in the security backports. I guess it ought to
> > go back to 4.15 (now that 4.14 is properly dead).
>
> Depends on whether this is just a theoretical issue, I would say. Can
> legacy format input legitimately be empty? If not, I wouldn't bother
> putting this onto the security-only branches.
I don't think libxl would generate an empty array.
libxl calls libxl__cpuid_policy_is_empty() before calling
libxl_cpuid_policy_list_gen_json(), so no empty array.
Then, without this fix, I think it would just mean that libxl would
return an error on something that was ok to do before. So backporting
the patch would be a nice to have.
--
Anthony PERARD
|