diff options
| author | Hungyu Lin <dennylin0707@gmail.com> | 2026-10-29 00:49:02 +0000 |
|---|---|---|
| committer | Jan Kara <jack@suse.cz> | 2026-11-04 13:23:30 +0100 |
| commit | 0cbfc16fe49629f5c1fc3628405661c2b938ec61 (patch) | |
| tree | 37a8eed973e75530afb313fa89f106d09dd4ba1c /tools/perf/scripts/python/task-analyzer.py | |
| parent | 3f57fc2c49ed05ccfc56e4dc9eda41be95925bbd (diff) | |
isofs: handle Rock Ridge long-form dates before 1900
iso_date() stores the year relative to 1900 and rejects negative values.
Rock Ridge LONG_FORM timestamps encode calendar years from 1 to 9999,
so valid years before 1900 are returned as seconds since the Unix epoch
equal to zero instead of their recorded dates. For example, an 1899
timestamp on an image produced by xorriso is reported as 1970 by stat,
and cp -p preserves that incorrect time.
Use the calendar year for both timestamp formats and pass it directly
to mktime64(). Keep the epoch fallback for year zero, while allowing
valid long-form years before 1900. Short-form dates are unchanged.
Fixes: 5ea45f54c8d6 ("isofs: fix Y2038 and Y2156 issues in Rock Ridge TF entry")
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Link: https://patch.msgid.link/20261029004902.76944-1-dennylin0707@gmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
