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

Re: [PATCH for-4.17 v3 07/15] CODING_STYLE(tools/ocaml): add 'make format' and remove tabs


  • To: Henry Wang <Henry.Wang@xxxxxxx>
  • From: Edwin Torok <edvin.torok@xxxxxxxxxx>
  • Date: Wed, 9 Nov 2022 16:27:02 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=d4dAEgVRnGT6vctPCLk+AFIjAqguSpc7AsekpJ7o1ek=; b=KTm04TF33JXnqpHkcc0GkFfKsOKg37DkAa3Z/L2qvxuNWWndlEfRWl5Dnwd9OMMxK2wPJjNvG/W9cP/SVOkNT8yBVatgfho4HQI8DUBQTvSg9B9nc0EWHEhKXRpIktVlbchjPV7YqIb+1n3yDYjAznUhF3yM6YJgFCePRX9HJ+x9daT0NO0rVdozjw5KC5CNkH81avgTpOzbVqZWxKTXe/YWLms5vdUhbusdO0DEV5UTsXnOH1runfvCpciRTRRggKdZMTv7PEPAZefoArDMB17dDYtfPaAw9LNM/CKzPg7l6CW+hDp2qOytVvpPSk7vxiqc8uTsSKOI4G3RXOFx+Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SKQ1Jeppo2RCrRxErjaRRmeQhImWeKPEEORK5WFOEjaENMg2chcmwE02uLweK+DM/J0jg13WeXTa9LgYZKjBd+Zeq9f0vHvUgicNx10okEz7x9wOOsMB9H8FD4onVNtg14+Gt+OfOGczHQsHrWm4QzON6B532L0liZT/U8u9CFEHf95OAutZOFy+Z2+1wxnbNKfiJUiNrzeUuDJnTkzd9Fiv8dpaOhaw5bbZmSICvNvRKK8azcW8Uum+pCU1Qb9adt8Zyrl0E3xYuquXWZ7GePVtWRzEbALI2CrA8Lkmefxu6PE8+L57UbN1L6r0PGUS38xBzoJ0om5WiMEyYFn54A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Wed, 09 Nov 2022 16:27:18 +0000
  • Ironport-data: A9a23:Av8Do603FNaLDEET2/bD5RNwkn2cJEfYwER7XKvMYLTBsI5bpzRRn GAWUG6OPfvbajP2Ldsjb4q0/EIE6MDWyt9hQAI4pC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK5ULSfUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8tuTS9nuDgNyo4GlC5wVmNKgQ1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CHYVxB0qXkwIzxWvTDes10FfUuFLTveRBTvSEPpqFvnrSFL/hGVSkL0YMkFulfDiIU5 /YUCzAxZ1OG19yUh4u3VdVrr5F2RCXrFNt3VnBI6xj8VapjbbWdBqLA6JlfwSs6gd1IEbDGf c0FZDFzbRPGJRpSJlMQD5F4l+Ct7pX9W2QA9BTJ+uxouC6PkmSd05C0WDbRUtGGW8RT2Fqfv GXF12/4HgsbJJqUzj/tHneE1rOexHOgB9p6+LuQ+vxqw0aagUMpOhw6RGebrfie0XGkVIcKQ 6AT0m90xUQoz2SLQ9/nTluHqXiLlhcGXpxbFOhSwAOQzqvZ5S6JC25CSSROAPQ2uclzSTE02 1uhm9LyGScpoLCTUWia9LqfsXW1Iyd9BWMLeyIsVwYO5Njn5oYpgXrnUdJLAKOzyNrvFlnNL yuiqSE/g/AfiJAN3qDjoVTf2Wrw+N7OUxI/4RjRUiS99ARlaYW5Zouur1/G8fJHK4XfRV6E1 JQZp/WjACk1JcnlvESwrC8lQNlFO97t3OXgvGNS
  • Ironport-hdrordr: A9a23:CoDWiK/0OFhMDAdNvMxuk+F7db1zdoMgy1knxilNoENuH/Bwxv rFoB1E73TJYW4qKQodcdDpAtjifZtFnaQFrLX5To3SJjUO31HYYL2KjLGSiQEIfheTygcz79 YGT0ETMrzN5B1B/L7HCWqDYpkdKbu8gcaVbI7lph8DIz2CKZsQljuRYTzrcHGeMTM2YabRY6 Dsg/avyQDBRV0nKuCAQlUVVenKoNPG0Lj8ZwQdOhIh4A6SyRu19b/TCXGjr1YjegIK5Y1n3X nOkgT/6Knmmeq80AXg22ja6IkTsMf9y+FEGNeHhqEuW3XRY0eTFcdcso+5zXUISdKUmRIXeR 730lAd1vFImjHsl6eO0F3QMkfboW8TAjTZuCKlaDPY0LDErXQBeoR8bMtiA2Xkwltls9dm3K 1R2WWF85JREBPbhSz4o8PFThdwiyOP0DMfeX56tQ0hbWIyUs4nkWUkxjIiLL4QWCbhrIw3Gu hnC8/RoP5QbFOBdnjc+m1i2salUHg/FgqPBhFqgL3f7xFG2HRii0cIzs0WmXkNsJo7Vplf/u zBdqBljqtHQMMaZb90QO0BXcy0AGrQRg+kChPbHX33UKUcf37doZ/+57s4oOmsZZwT1ZM33I /MVVtJ3FRCD34Gyff+qaGj3iq9M1lVBw6du/22z6IJyoHUVf7sLTCJTkwono+pv+gfa/erKc qOBA==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHY84fA+Ym2JRve3kKJcIO1APAKeK41MEgAgACx3ICAAML3gIAAI/qA
  • Thread-topic: [PATCH for-4.17 v3 07/15] CODING_STYLE(tools/ocaml): add 'make format' and remove tabs


> On 9 Nov 2022, at 14:18, Edwin Torok <edvin.torok@xxxxxxxxxx> wrote:
> 
> 
> 
>> On 9 Nov 2022, at 02:40, Henry Wang <Henry.Wang@xxxxxxx> wrote:
>> 
>> Hi Julien,
>> 
>>> -----Original Message-----
>>> From: Julien Grall <julien@xxxxxxx>
>>> Subject: Re: [PATCH for-4.17 v3 07/15] CODING_STYLE(tools/ocaml): add
>>> 'make format' and remove tabs
>>> While I understand the goal and support, this seems to be a bit too late
>>> to do it in Xen 4.17 (we are only a couple of weeks away). At this stage
>>> of the release we should only do bug fix.
>>> 
>>> This is clearly only a comesmetic change and there I would argue this
>>> should be deferred to 4.18. That said the last call is from the RM.
>> 
>> I agree with your point. I think maybe defer the patch to 4.18 is better,
>> given the deep freeze state we are currently in.
> 
> 
> Indentation can't really be trusted to humans :)
> 


It might be better to consider oxenstored unsupported in 4.17 at this point and 
try again for 4.17.1 or 4.18, it is probably too late to fix up all the bugs 
that I keep finding in it in a way in which it can be (security) supported, 
although I thought the goal of a release candidate is to try and find bugs and 
fix them before release.

But doing that while also trying to keep whitespace and indentation changes out 
of the patches (or trying to keep the patches small), is more likely to 
introduce more bugs into it at this point rather than fix things.

I was not able to do or send any of these patches sooner because the XSA-326 
and XSA-115/etc. work in the past years has prevented any other kind of work 
from being sent (it'd have made rebasing the XSA series more difficult, and/or 
reveal the XSA as part of various other changes and commits), it is unfortunate 
that there is a release quite so close after an oxenstored XSA

I tried fixing up the rest of the series to not depend on this patch, but 
without an actual 'make format' rule to give it consistent indentation
it is just too error-prone or risky to fix it up at this point (I don't really 
mind whether indentation is tabs vs spaces, it is the inconsistency and 
non-automated nature of it that is the problem),
e.g. it is quite easy to accidentally duplicate code, or get the code in the 
wrong scope, or introduce bugs like the one I just mentioned before when a new 
statement gets inserted and the code seemingly looks ok but its semantics is 
entirely changed (and that is hidden by the inconsistent/non-automated 
indentation).


Perhaps by trying to merge some of the changes/fixes from 
https://github.com/mirage/ocaml-xenstore and getting that production ready, 
which is a much better codebase to start from than
the current one in the Xen tree.:
* it has actual unit tests (which I tried to introduce as part of a security 
fix for the intree version of oxenstored but got repeatedly discouraged from 
including it to not make the security fix too large)
* it was not vulnerable XSA-353
* it has fixed part of XSA-326 together with a unit test nearly 10 years before 
Xen project rediscovered the same bug and realized it is a security bug in the 
in-tree version: 
https://github.com/mirage/ocaml-xenstore/commit/21e96654c27c01cf52e5d7aabc5ee53e07f2cbb7
* (of course mirage version has never been used in production so it is entirely 
likely it has *different* bugs)
* in-tree Xen is difficult to contribute to: 
  * it has a broken build system that keeps throwing 'inconsistent assumptions'
  * it has inconsistent and as we can see sometimes wrong indentation
  * patches get posted to the mailing list and sometimes lost (e.g. 
https://patchwork.kernel.org/project/xen-devel/list/?series=339731&archive=both 
is still not committed), and I'm fairly sure I've seen an ack somewhere, but 
patchwork can't find it now

So I think oxenstored in 4.18+ will likely be sufficiently different than 4.17 
that direct backports won't be possible anyway (indentation changes or not), so 
having this indentation patch in 4.17 wouldn't really help much.
The disadvantage is that we lose all the bugfixes in the patch series after the 
indentation change, but if we consider oxenstored unsupported in 4.17 that may 
not matter.

I can resend this patch series for master without a 'for-4.17 tag' and keep 
doing development there.

Best regards,
--Edwin




 


Rackspace

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