* [PATCH] drivers: gpu: drm: msm: registers: improve reproducibility
@ 2025-05-23 13:06 Viswanath Kraleti
2025-05-23 17:00 ` Dmitry Baryshkov
0 siblings, 1 reply; 3+ messages in thread
From: Viswanath Kraleti @ 2025-05-23 13:06 UTC (permalink / raw)
To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter
Cc: Ryan Eatmon, linux-arm-msm, dri-devel, freedreno, linux-kernel,
Bruce Ashfield, Viswanath Kraleti
The files generated by gen_header.py capture the source path to the
input files and the date. While that can be informative, it varies
based on where and when the kernel was built as the full path is
captured.
Since all of the files that this tool is run on is under the drivers
directory, this modifies the application to strip all of the path before
drivers. Additionally it prints <stripped> instead of the date.
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
---
The files generated by gen_header.py include the source path to the
input files and the build date. While this information can be useful,
it inadvertently exposes build system configuration details in the
binaries. This hinders binary reproducibility, as the output will
vary if the build environment changes.
---
| 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--git a/drivers/gpu/drm/msm/registers/gen_header.py b/drivers/gpu/drm/msm/registers/gen_header.py
index 3926485bb197b0992232447cb71bf1c1ebd0968c..a409404627c7180d5b0626f0ce6255d7d0df5113 100644
--- a/drivers/gpu/drm/msm/registers/gen_header.py
+++ b/drivers/gpu/drm/msm/registers/gen_header.py
@@ -11,6 +11,7 @@ import collections
import argparse
import time
import datetime
+import re
class Error(Exception):
def __init__(self, message):
@@ -877,13 +878,14 @@ The rules-ng-ng source files this header was generated from are:
""")
maxlen = 0
for filepath in p.xml_files:
- maxlen = max(maxlen, len(filepath))
+ new_filepath = re.sub("^.+drivers","drivers",filepath)
+ maxlen = max(maxlen, len(new_filepath))
for filepath in p.xml_files:
- pad = " " * (maxlen - len(filepath))
+ pad = " " * (maxlen - len(new_filepath))
filesize = str(os.path.getsize(filepath))
filesize = " " * (7 - len(filesize)) + filesize
filetime = time.ctime(os.path.getmtime(filepath))
- print("- " + filepath + pad + " (" + filesize + " bytes, from " + filetime + ")")
+ print("- " + new_filepath + pad + " (" + filesize + " bytes, from <stripped>)")
if p.copyright_year:
current_year = str(datetime.date.today().year)
print()
---
base-commit: fc5c669c902c3039aa41731b6c58c0960d0b1bbf
change-id: 20250523-binrep-f8c81fa0d31d
Best regards,
--
Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drivers: gpu: drm: msm: registers: improve reproducibility
2025-05-23 13:06 [PATCH] drivers: gpu: drm: msm: registers: improve reproducibility Viswanath Kraleti
@ 2025-05-23 17:00 ` Dmitry Baryshkov
2025-05-24 16:06 ` Viswanath Kraleti
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Baryshkov @ 2025-05-23 17:00 UTC (permalink / raw)
To: Viswanath Kraleti
Cc: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Ryan Eatmon, linux-arm-msm,
dri-devel, freedreno, linux-kernel, Bruce Ashfield
On Fri, May 23, 2025 at 06:36:16PM +0530, Viswanath Kraleti wrote:
> The files generated by gen_header.py capture the source path to the
> input files and the date. While that can be informative, it varies
You are not the author of this patch. Why did you drop authorshop
information when picking it up and resending?
> based on where and when the kernel was built as the full path is
> captured.
>
> Since all of the files that this tool is run on is under the drivers
> directory, this modifies the application to strip all of the path before
> drivers. Additionally it prints <stripped> instead of the date.
>
> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
> Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers: gpu: drm: msm: registers: improve reproducibility
2025-05-23 17:00 ` Dmitry Baryshkov
@ 2025-05-24 16:06 ` Viswanath Kraleti
0 siblings, 0 replies; 3+ messages in thread
From: Viswanath Kraleti @ 2025-05-24 16:06 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Ryan Eatmon, linux-arm-msm,
dri-devel, freedreno, linux-kernel, Bruce Ashfield
On Fri, May 23, 2025 at 10:30 PM Dmitry Baryshkov
<dmitry.baryshkov@oss.qualcomm.com> wrote:
>
> On Fri, May 23, 2025 at 06:36:16PM +0530, Viswanath Kraleti wrote:
> > The files generated by gen_header.py capture the source path to the
> > input files and the date. While that can be informative, it varies
>
> You are not the author of this patch. Why did you drop authorshop
> information when picking it up and resending?
>
Apologies for the oversight. I've corrected the author ID in the v2 posting.
> > based on where and when the kernel was built as the full path is
> > captured.
> >
> > Since all of the files that this tool is run on is under the drivers
> > directory, this modifies the application to strip all of the path before
> > drivers. Additionally it prints <stripped> instead of the date.
> >
> > Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> > Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
> > Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
>
> --
> With best wishes
> Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-24 16:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-23 13:06 [PATCH] drivers: gpu: drm: msm: registers: improve reproducibility Viswanath Kraleti
2025-05-23 17:00 ` Dmitry Baryshkov
2025-05-24 16:06 ` Viswanath Kraleti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®