diff mbox series

[XEN] docs/misra: mark the gzip folder as adopted code

Message ID 2970c1010e227ca1460c5656d13fb87a05d87f29.1713174475.git.federico.serafini@bugseng.com (mailing list archive)
State New
Headers show
Series [XEN] docs/misra: mark the gzip folder as adopted code | expand

Commit Message

Federico Serafini April 15, 2024, 9:56 a.m. UTC
Mark the whole gzip folder as adopted code and remove the redundant
deviation of file inflate.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
 automation/eclair_analysis/ECLAIR/deviations.ecl | 5 -----
 docs/misra/exclude-list.json                     | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

Comments

Andrew Cooper April 15, 2024, 3:44 p.m. UTC | #1
On 15/04/2024 10:56 am, Federico Serafini wrote:
> Mark the whole gzip folder as adopted code and remove the redundant
> deviation of file inflate.
>
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

I hadn't realised that we had a special case like this.  Definitely
better to get rid of it.

I've pulled this into my `for-next` branch, and will get it committed
properly when OSSTest (our non-gitlab CI) is in a happier state.
Jan Beulich April 18, 2024, 7:39 a.m. UTC | #2
On 15.04.2024 17:44, Andrew Cooper wrote:
> On 15/04/2024 10:56 am, Federico Serafini wrote:
>> Mark the whole gzip folder as adopted code and remove the redundant
>> deviation of file inflate.
>>
>> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
> 
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
> 
> I hadn't realised that we had a special case like this.  Definitely
> better to get rid of it.
> 
> I've pulled this into my `for-next` branch, and will get it committed
> properly when OSSTest (our non-gitlab CI) is in a happier state.

Hmm. Considering Daniel's work (which I'll comment on separately), is this
really going to remain "adopted"? We're about to diverge to a degree where
simply taking patches from the original source isn't going to work anymore.
IOW I think we want either Daniel's work (and perhaps follow-on adjustments)
or marking of that code as adopted.

Jan
Andrew Cooper April 18, 2024, 6:33 p.m. UTC | #3
On 18/04/2024 8:39 am, Jan Beulich wrote:
> On 15.04.2024 17:44, Andrew Cooper wrote:
>> On 15/04/2024 10:56 am, Federico Serafini wrote:
>>> Mark the whole gzip folder as adopted code and remove the redundant
>>> deviation of file inflate.
>>>
>>> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
>> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>
>> I hadn't realised that we had a special case like this.  Definitely
>> better to get rid of it.
>>
>> I've pulled this into my `for-next` branch, and will get it committed
>> properly when OSSTest (our non-gitlab CI) is in a happier state.
> Hmm. Considering Daniel's work (which I'll comment on separately), is this
> really going to remain "adopted"? We're about to diverge to a degree where
> simply taking patches from the original source isn't going to work anymore.
> IOW I think we want either Daniel's work (and perhaps follow-on adjustments)
> or marking of that code as adopted.

inflate.c is was from Linux in 2010.  There's only one build fix and one
comment change in Linux since 2010, whereas Xen's copy has seen several
bugfixes and cleanups.

gunzip.c has floated around rather more (it was originally some glue
code in bZImage.c) but it was entirely rewritten first, to support other
types of decompression (we did this differently in Xen), and second to
support KASLR.


In both cases, there's not an upstream to usefully track, and we
probably take ownership.

~Andrew
Jan Beulich April 19, 2024, 6:30 a.m. UTC | #4
On 18.04.2024 20:33, Andrew Cooper wrote:
> On 18/04/2024 8:39 am, Jan Beulich wrote:
>> On 15.04.2024 17:44, Andrew Cooper wrote:
>>> On 15/04/2024 10:56 am, Federico Serafini wrote:
>>>> Mark the whole gzip folder as adopted code and remove the redundant
>>>> deviation of file inflate.
>>>>
>>>> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
>>> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>>
>>> I hadn't realised that we had a special case like this.  Definitely
>>> better to get rid of it.
>>>
>>> I've pulled this into my `for-next` branch, and will get it committed
>>> properly when OSSTest (our non-gitlab CI) is in a happier state.
>> Hmm. Considering Daniel's work (which I'll comment on separately), is this
>> really going to remain "adopted"? We're about to diverge to a degree where
>> simply taking patches from the original source isn't going to work anymore.
>> IOW I think we want either Daniel's work (and perhaps follow-on adjustments)
>> or marking of that code as adopted.
> 
> inflate.c is was from Linux in 2010.  There's only one build fix and one
> comment change in Linux since 2010, whereas Xen's copy has seen several
> bugfixes and cleanups.
> 
> gunzip.c has floated around rather more (it was originally some glue
> code in bZImage.c) but it was entirely rewritten first, to support other
> types of decompression (we did this differently in Xen), and second to
> support KASLR.
> 
> In both cases, there's not an upstream to usefully track, and we
> probably take ownership.

I'm confused by the combination of your reply (seemingly agreeing with my
perspective) vs you having committed the patch. Can you clarify whether I
misunderstood your reply? Imo gzip code should no longer be excluded from
any scans when we take ownership. Hence why I would have expected a v2 of
the patch also dropping (rather than adjusting) the exclude-list.json
entry.

Jan
diff mbox series

Patch

diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl
index 0230b41c6d..4287805819 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -148,11 +148,6 @@  const-qualified."
 # Series 8.
 #
 
--doc_begin="The following file is imported from Linux: ignore for now."
--file_tag+={adopted_r8_2,"^xen/common/inflate\\.c$"}
--config=MC3R1.R8.2,reports+={deliberate,"any_area(any_loc(file(adopted_r8_2)))"}
--doc_end
-
 -doc_begin="The type ret_t is deliberately used and defined as int or long depending on the architecture."
 -config=MC3R1.R8.3,reports+={deliberate,"any_area(any_loc(text(^.*ret_t.*$)))"}
 -doc_end
diff --git a/docs/misra/exclude-list.json b/docs/misra/exclude-list.json
index 0956364158..cd69765427 100644
--- a/docs/misra/exclude-list.json
+++ b/docs/misra/exclude-list.json
@@ -118,7 +118,7 @@ 
             "comment": "Imported from Linux, ignore for now"
         },
         {
-            "rel_path": "common/gzip/inflate.c",
+            "rel_path": "common/gzip/*",
             "comment": "Imported from Linux, ignore for now"
         },
         {