git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] some more chunk-file bounds-checks fixes
@ 2023-11-09  7:03 Jeff King
  2023-11-09  7:09 ` [PATCH 1/9] commit-graph: handle overflow in chunk_size checks Jeff King
                   ` (10 more replies)
  0 siblings, 11 replies; 39+ messages in thread
From: Jeff King @ 2023-11-09  7:03 UTC (permalink / raw)
  To: git; +Cc: Taylor Blau

This is a follow-up to the series from:

  https://lore.kernel.org/git/20231009205544.GA3281950@coredump.intra.peff.net/

which was merged to master as jk/chunk-bounds. There were a few issues
left open by that series and its review:

  1. the midx code didn't check fanout ordering

  2. whether we needed to sprinkle some more st_mult() on it

  3. improving some of the error messages (translations, some
     consistency, maybe more details)

  4. possible refactoring with a pair_chunk_expect() API (Taylor posted
     a series in that direction, which is currently in limbo)

The patches here fix the remaining correctness issues (points 1 and 2,
along with a few other small issues I found). There's some improvement
on 3, but I stopped short of adding lots more details. Partially because
the series was already getting big, and partially because going further
may depend on what we do with 4.

With regards to the pair_chunk_expect() thing, this series is
incompatible (textually, but not conceptually) with what Taylor posted
earlier, just because I'm moving some checks into the chunk-reader
callbacks. Because it's fixing user-visible bugs, I think we'd want to
do this first, and then (possibly) rebase Taylor's series on top. But I
also think some of the things I noticed around overflow (especially
patches 1 and 6) may inform how we'd want the pair_chunk_expect() API to
look.

This is a continuation of the jk/chunk-bounds topic, which is new in the
v2.43 cycle. But it should be OK to leave this until after the release.
Nothing here is fixing a regression in the 2.43 release candidates; it's
just a few bits that were incomplete. That said, I did try to float the
correctness bits to the first two patches just in case. ;)

  [1/9]: commit-graph: handle overflow in chunk_size checks
  [2/9]: midx: check consistency of fanout table
  [3/9]: commit-graph: drop redundant call to "lite" verification
  [4/9]: commit-graph: clarify missing-chunk error messages
  [5/9]: commit-graph: abort as soon as we see a bogus chunk
  [6/9]: commit-graph: use fanout value for graph size
  [7/9]: commit-graph: check order while reading fanout chunk
  [8/9]: commit-graph: drop verify_commit_graph_lite()
  [9/9]: commit-graph: mark chunk error messages for translation

 commit-graph.c              | 94 +++++++++++++------------------------
 midx.c                      | 20 ++++----
 t/t5318-commit-graph.sh     | 16 ++++---
 t/t5319-multi-pack-index.sh | 14 ++++++
 4 files changed, 67 insertions(+), 77 deletions(-)

-Peff

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2024-01-18 23:59 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-09  7:03 [PATCH 0/9] some more chunk-file bounds-checks fixes Jeff King
2023-11-09  7:09 ` [PATCH 1/9] commit-graph: handle overflow in chunk_size checks Jeff King
2023-11-09 21:13   ` Taylor Blau
2023-11-09 21:27     ` Jeff King
2023-11-09  7:12 ` [PATCH 2/9] midx: check consistency of fanout table Jeff King
2023-11-09  7:13 ` [PATCH 3/9] commit-graph: drop redundant call to "lite" verification Jeff King
2023-11-09  7:14 ` [PATCH 4/9] commit-graph: clarify missing-chunk error messages Jeff King
2023-11-09  7:17 ` [PATCH 5/9] commit-graph: abort as soon as we see a bogus chunk Jeff King
2023-11-09 21:18   ` Taylor Blau
2023-11-09  7:24 ` [PATCH 6/9] commit-graph: use fanout value for graph size Jeff King
2023-11-09 21:20   ` Taylor Blau
2023-11-09 21:38     ` Jeff King
2023-11-09 22:15       ` Taylor Blau
2023-11-10 21:52         ` Jeff King
2023-11-09  7:25 ` [PATCH 7/9] commit-graph: check order while reading fanout chunk Jeff King
2023-11-09  7:25 ` [PATCH 8/9] commit-graph: drop verify_commit_graph_lite() Jeff King
2023-11-09  7:26 ` [PATCH 9/9] commit-graph: mark chunk error messages for translation Jeff King
2023-11-09 21:22 ` [PATCH 0/9] some more chunk-file bounds-checks fixes Taylor Blau
2023-11-09 22:34 ` [PATCH 0/7] chunk-format: introduce `pair_chunk_expect()` Taylor Blau
2023-11-09 22:34   ` [PATCH 1/7] chunk-format: introduce `pair_chunk_expect()` helper Taylor Blau
2023-11-10  4:55     ` Junio C Hamano
2023-11-10 16:27       ` Taylor Blau
2023-11-10 22:01         ` Jeff King
2023-11-10 23:39           ` Junio C Hamano
2023-11-10 23:38         ` Junio C Hamano
2023-11-10 21:57       ` Jeff King
2023-11-10 22:09         ` Jeff King
2023-11-10 22:08     ` Jeff King
2024-01-15 22:31     ` Linus Arver
2024-01-15 22:53       ` Linus Arver
2024-01-16 15:10       ` Jeff King
2024-01-18 23:59         ` Linus Arver
2023-11-09 22:34   ` [PATCH 2/7] commit-graph: read `OIDL` chunk with `pair_chunk_expect()` Taylor Blau
2023-11-10 22:10     ` Jeff King
2023-11-09 22:34   ` [PATCH 3/7] commit-graph: read `CDAT` " Taylor Blau
2023-11-09 22:34   ` [PATCH 4/7] commit-graph: read `GDAT` " Taylor Blau
2023-11-09 22:34   ` [PATCH 5/7] commit-graph: read `BIDX` " Taylor Blau
2023-11-09 22:34   ` [PATCH 6/7] midx: read `OIDL` " Taylor Blau
2023-11-09 22:34   ` [PATCH 7/7] midx: read `OOFF` " Taylor Blau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).