Embedding feedback in BytecodeArray for StrictEqual [v8/v8 : main]

0 views
Skip to first unread message

Yuheng Wei (Gerrit)

unread,
Sep 26, 2025, 3:00:37 AMSep 26
to AyeAye, v8-re...@googlegroups.com, v8-risc...@chromium.org, leszek...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, dmercadi...@chromium.org, victorgo...@chromium.org, verwaes...@chromium.org

Message from Yuheng Wei

Set Ready For Review

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I24390811c12755b0a19beaefe2b0319d75ceaf6c
Gerrit-Change-Number: 6986847
Gerrit-PatchSet: 1
Gerrit-Owner: Yuheng Wei <yuhen...@intel.com>
Gerrit-Comment-Date: Fri, 26 Sep 2025 07:00:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Yuheng Wei (Gerrit)

unread,
Sep 26, 2025, 3:50:48 AMSep 26
to Leszek Swirski, Toon Verwaest, Hao A Xu, V8 LUCI CQ, AyeAye, v8-re...@googlegroups.com, v8-risc...@chromium.org, leszek...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, dmercadi...@chromium.org, victorgo...@chromium.org, verwaes...@chromium.org
Attention needed from Leszek Swirski and Toon Verwaest

Yuheng Wei voted and added 1 comment

Votes added by Yuheng Wei

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Yuheng Wei . resolved

Hi Toon, hi Leszek, this patch is ready for review, PTAL, thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
  • Toon Verwaest
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I24390811c12755b0a19beaefe2b0319d75ceaf6c
Gerrit-Change-Number: 6986847
Gerrit-PatchSet: 1
Gerrit-Owner: Yuheng Wei <yuhen...@intel.com>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
Gerrit-Reviewer: Yuheng Wei <yuhen...@intel.com>
Gerrit-CC: Hao A Xu <hao....@intel.com>
Gerrit-Attention: Toon Verwaest <verw...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Fri, 26 Sep 2025 07:50:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Yuheng Wei (Gerrit)

unread,
Sep 26, 2025, 3:53:21 AMSep 26
to Leszek Swirski, Toon Verwaest, Hao A Xu, V8 LUCI CQ, AyeAye, v8-re...@googlegroups.com, v8-risc...@chromium.org, leszek...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, dmercadi...@chromium.org, victorgo...@chromium.org, verwaes...@chromium.org
Attention needed from Leszek Swirski and Toon Verwaest

Yuheng Wei voted and added 1 comment

Votes added by Yuheng Wei

Commit-Queue+1

1 comment

File src/interpreter/bytecodes.h
Line 316, Patchset 1 (Latest): OperandType::kReg, OperandType::kFlag16, OperandType::kFlag8) \
Yuheng Wei . unresolved

We add one padding byte to ensure that the feedback value can be stored at a 16-bit aligned address. This guarantees that atomic loads will always operate on an aligned address. We have a more detailed explanation of this in our design doc: https://docs.google.com/document/d/1QmkY6LEZ7B6kEu1xAr3Dzn4O5gFljmRwvqcA5eMmLsw/edit?disco=AAABrMA17pE.
Do you have any suggestions regarding this approach?

Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
  • Toon Verwaest
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I24390811c12755b0a19beaefe2b0319d75ceaf6c
    Gerrit-Change-Number: 6986847
    Gerrit-PatchSet: 1
    Gerrit-Owner: Yuheng Wei <yuhen...@intel.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
    Gerrit-Reviewer: Yuheng Wei <yuhen...@intel.com>
    Gerrit-CC: Hao A Xu <hao....@intel.com>
    Gerrit-Attention: Toon Verwaest <verw...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Fri, 26 Sep 2025 07:53:17 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    open
    diffy

    Leszek Swirski (Gerrit)

    unread,
    Sep 29, 2025, 4:27:58 AMSep 29
    to Yuheng Wei, Toon Verwaest, Hao A Xu, V8 LUCI CQ, AyeAye, v8-re...@googlegroups.com, v8-risc...@chromium.org, leszek...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, dmercadi...@chromium.org, victorgo...@chromium.org, verwaes...@chromium.org
    Attention needed from Toon Verwaest and Yuheng Wei

    Leszek Swirski added 1 comment

    File src/interpreter/bytecodes.h
    Line 316, Patchset 1 (Latest): OperandType::kReg, OperandType::kFlag16, OperandType::kFlag8) \
    Yuheng Wei . unresolved

    We add one padding byte to ensure that the feedback value can be stored at a 16-bit aligned address. This guarantees that atomic loads will always operate on an aligned address. We have a more detailed explanation of this in our design doc: https://docs.google.com/document/d/1QmkY6LEZ7B6kEu1xAr3Dzn4O5gFljmRwvqcA5eMmLsw/edit?disco=AAABrMA17pE.
    Do you have any suggestions regarding this approach?

    Leszek Swirski

    Would it be possible to keep this as a racy read, and deal with the consequences in the optimizing compiler (e.g. swallow the risk of reading incorrect feedback then deopting, or validate the feedback on finalization)?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Toon Verwaest
    • Yuheng Wei
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I24390811c12755b0a19beaefe2b0319d75ceaf6c
    Gerrit-Change-Number: 6986847
    Gerrit-PatchSet: 1
    Gerrit-Owner: Yuheng Wei <yuhen...@intel.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
    Gerrit-Reviewer: Yuheng Wei <yuhen...@intel.com>
    Gerrit-CC: Hao A Xu <hao....@intel.com>
    Gerrit-Attention: Toon Verwaest <verw...@chromium.org>
    Gerrit-Attention: Yuheng Wei <yuhen...@intel.com>
    Gerrit-Comment-Date: Mon, 29 Sep 2025 08:27:54 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Yuheng Wei <yuhen...@intel.com>
    unsatisfied_requirement
    open
    diffy

    Yuheng Wei (Gerrit)

    unread,
    Sep 30, 2025, 2:57:20 AMSep 30
    to Leszek Swirski, Toon Verwaest, Hao A Xu, V8 LUCI CQ, AyeAye, v8-re...@googlegroups.com, v8-risc...@chromium.org, leszek...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, dmercadi...@chromium.org, victorgo...@chromium.org, verwaes...@chromium.org
    Attention needed from Leszek Swirski and Toon Verwaest

    Yuheng Wei added 1 comment

    File src/interpreter/bytecodes.h
    Line 316, Patchset 1 (Latest): OperandType::kReg, OperandType::kFlag16, OperandType::kFlag8) \
    Yuheng Wei . unresolved

    We add one padding byte to ensure that the feedback value can be stored at a 16-bit aligned address. This guarantees that atomic loads will always operate on an aligned address. We have a more detailed explanation of this in our design doc: https://docs.google.com/document/d/1QmkY6LEZ7B6kEu1xAr3Dzn4O5gFljmRwvqcA5eMmLsw/edit?disco=AAABrMA17pE.
    Do you have any suggestions regarding this approach?

    Leszek Swirski

    Would it be possible to keep this as a racy read, and deal with the consequences in the optimizing compiler (e.g. swallow the risk of reading incorrect feedback then deopting, or validate the feedback on finalization)?

    Yuheng Wei

    You're right, I think the optimizing compiler itself could likely tolerate a racy read for the feedback. We have an earlier version of this implementation which used a simple unaligned read for the 16-bit value (see https://chromium-review.googlesource.com/c/v8/v8/+/6855690/18/src/interpreter/bytecode-array-iterator.cc#371).

    The specific problem we're running into is with ThreadSanitizer in trybot. When the `is_tsan` build flag is enabled, the Store operation in the CSA (src/codegen/code-stub-assembler.cc#13297 of this CL) is lowered to a tsan-aware store, and the unaligned access will be flagged as a data race.

    Current implementation uses a 16-bit atomic load to satisfy these tsan and ubsan checks. I think if we want to use unaligned read/write, we would need to bypass the tsan check (maybe we introduce an "unsafe" store in CSA which will ignore the tsan? I'm not sure what the best practice would be here).

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    • Toon Verwaest
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I24390811c12755b0a19beaefe2b0319d75ceaf6c
    Gerrit-Change-Number: 6986847
    Gerrit-PatchSet: 1
    Gerrit-Owner: Yuheng Wei <yuhen...@intel.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
    Gerrit-Reviewer: Yuheng Wei <yuhen...@intel.com>
    Gerrit-CC: Hao A Xu <hao....@intel.com>
    Gerrit-Attention: Toon Verwaest <verw...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 30 Sep 2025 06:57:17 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Yuheng Wei <yuhen...@intel.com>
    Comment-In-Reply-To: Leszek Swirski <les...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Leszek Swirski (Gerrit)

    unread,
    Sep 30, 2025, 6:59:32 AMSep 30
    to Yuheng Wei, Toon Verwaest, Hao A Xu, V8 LUCI CQ, AyeAye, v8-re...@googlegroups.com, v8-risc...@chromium.org, leszek...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, dmercadi...@chromium.org, victorgo...@chromium.org, verwaes...@chromium.org
    Attention needed from Toon Verwaest and Yuheng Wei

    Leszek Swirski added 1 comment

    File src/interpreter/bytecodes.h
    Line 316, Patchset 1 (Latest): OperandType::kReg, OperandType::kFlag16, OperandType::kFlag8) \
    Yuheng Wei . unresolved

    We add one padding byte to ensure that the feedback value can be stored at a 16-bit aligned address. This guarantees that atomic loads will always operate on an aligned address. We have a more detailed explanation of this in our design doc: https://docs.google.com/document/d/1QmkY6LEZ7B6kEu1xAr3Dzn4O5gFljmRwvqcA5eMmLsw/edit?disco=AAABrMA17pE.
    Do you have any suggestions regarding this approach?

    Leszek Swirski

    Would it be possible to keep this as a racy read, and deal with the consequences in the optimizing compiler (e.g. swallow the risk of reading incorrect feedback then deopting, or validate the feedback on finalization)?

    Yuheng Wei

    You're right, I think the optimizing compiler itself could likely tolerate a racy read for the feedback. We have an earlier version of this implementation which used a simple unaligned read for the 16-bit value (see https://chromium-review.googlesource.com/c/v8/v8/+/6855690/18/src/interpreter/bytecode-array-iterator.cc#371).

    The specific problem we're running into is with ThreadSanitizer in trybot. When the `is_tsan` build flag is enabled, the Store operation in the CSA (src/codegen/code-stub-assembler.cc#13297 of this CL) is lowered to a tsan-aware store, and the unaligned access will be flagged as a data race.

    Current implementation uses a 16-bit atomic load to satisfy these tsan and ubsan checks. I think if we want to use unaligned read/write, we would need to bypass the tsan check (maybe we introduce an "unsafe" store in CSA which will ignore the tsan? I'm not sure what the best practice would be here).

    Attention is currently required from:
    • Toon Verwaest
    • Yuheng Wei
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I24390811c12755b0a19beaefe2b0319d75ceaf6c
    Gerrit-Change-Number: 6986847
    Gerrit-PatchSet: 1
    Gerrit-Owner: Yuheng Wei <yuhen...@intel.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
    Gerrit-Reviewer: Yuheng Wei <yuhen...@intel.com>
    Gerrit-CC: Hao A Xu <hao....@intel.com>
    Gerrit-Attention: Toon Verwaest <verw...@chromium.org>
    Gerrit-Attention: Yuheng Wei <yuhen...@intel.com>
    Gerrit-Comment-Date: Tue, 30 Sep 2025 10:59:26 +0000
    unsatisfied_requirement
    open
    diffy

    Yuheng Wei (Gerrit)

    unread,
    Oct 9, 2025, 4:28:50 AMOct 9
    to Leszek Swirski, Toon Verwaest, Hao A Xu, V8 LUCI CQ, AyeAye, v8-re...@googlegroups.com, v8-risc...@chromium.org, leszek...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, dmercadi...@chromium.org, victorgo...@chromium.org, verwaes...@chromium.org
    Attention needed from Leszek Swirski and Toon Verwaest

    Yuheng Wei voted and added 1 comment

    Votes added by Yuheng Wei

    Commit-Queue+1

    1 comment

    File src/interpreter/bytecodes.h
    Line 316, Patchset 1: OperandType::kReg, OperandType::kFlag16, OperandType::kFlag8) \
    Yuheng Wei . unresolved

    We add one padding byte to ensure that the feedback value can be stored at a 16-bit aligned address. This guarantees that atomic loads will always operate on an aligned address. We have a more detailed explanation of this in our design doc: https://docs.google.com/document/d/1QmkY6LEZ7B6kEu1xAr3Dzn4O5gFljmRwvqcA5eMmLsw/edit?disco=AAABrMA17pE.
    Do you have any suggestions regarding this approach?

    Leszek Swirski

    Would it be possible to keep this as a racy read, and deal with the consequences in the optimizing compiler (e.g. swallow the risk of reading incorrect feedback then deopting, or validate the feedback on finalization)?

    Yuheng Wei

    You're right, I think the optimizing compiler itself could likely tolerate a racy read for the feedback. We have an earlier version of this implementation which used a simple unaligned read for the 16-bit value (see https://chromium-review.googlesource.com/c/v8/v8/+/6855690/18/src/interpreter/bytecode-array-iterator.cc#371).

    The specific problem we're running into is with ThreadSanitizer in trybot. When the `is_tsan` build flag is enabled, the Store operation in the CSA (src/codegen/code-stub-assembler.cc#13297 of this CL) is lowered to a tsan-aware store, and the unaligned access will be flagged as a data race.

    Current implementation uses a 16-bit atomic load to satisfy these tsan and ubsan checks. I think if we want to use unaligned read/write, we would need to bypass the tsan check (maybe we introduce an "unsafe" store in CSA which will ignore the tsan? I'm not sure what the best practice would be here).

    Leszek Swirski

    We have precedent with RacyReadHeapNumberBits https://source.chromium.org/chromium/chromium/src/+/main:v8/src/compiler/heap-refs.cc;l=309;drc=77ce2c33f61b01daac3d9e4299b3d0805bee6461 which is suppressed in https://source.chromium.org/chromium/chromium/src/+/main:v8/tools/sanitizers/tsan_suppressions.txt;l=15;drc=96cf03108a535070d387bbaf88c899442d47d4d0

    Yuheng Wei

    Thanks for this information! I've uploaded a new patch set implementing the racy embedded feedback read and removing the padding byte, PTAL.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    • Toon Verwaest
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I24390811c12755b0a19beaefe2b0319d75ceaf6c
    Gerrit-Change-Number: 6986847
    Gerrit-PatchSet: 2
    Gerrit-Owner: Yuheng Wei <yuhen...@intel.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
    Gerrit-Reviewer: Yuheng Wei <yuhen...@intel.com>
    Gerrit-CC: Hao A Xu <hao....@intel.com>
    Gerrit-Attention: Toon Verwaest <verw...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Thu, 09 Oct 2025 08:28:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    open
    diffy

    Toon Verwaest (Gerrit)

    unread,
    Oct 24, 2025, 7:20:48 AM (2 days ago) Oct 24
    to Yuheng Wei, Michael Lippautz, Leszek Swirski, Hao A Xu, V8 LUCI CQ, AyeAye, v8-re...@googlegroups.com, v8-risc...@chromium.org, leszek...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, dmercadi...@chromium.org, victorgo...@chromium.org, verwaes...@chromium.org
    Attention needed from Leszek Swirski, Michael Lippautz and Yuheng Wei

    Toon Verwaest voted and added 1 comment

    Votes added by Toon Verwaest

    Code-Review+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 6 (Latest):
    Toon Verwaest . resolved

    Looks pretty nice. I do think you might need to whitelist code that writes to the bytecode array for sandbox/pkey builds? Adding mlippautz for pkey insights.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    • Michael Lippautz
    • Yuheng Wei
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I24390811c12755b0a19beaefe2b0319d75ceaf6c
    Gerrit-Change-Number: 6986847
    Gerrit-PatchSet: 6
    Gerrit-Owner: Yuheng Wei <yuhen...@intel.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
    Gerrit-Reviewer: Yuheng Wei <yuhen...@intel.com>
    Gerrit-CC: Hao A Xu <hao....@intel.com>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Yuheng Wei <yuhen...@intel.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Fri, 24 Oct 2025 11:20:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Lippautz (Gerrit)

    unread,
    Oct 24, 2025, 7:37:54 AM (2 days ago) Oct 24
    to Yuheng Wei, Toon Verwaest, Leszek Swirski, Hao A Xu, V8 LUCI CQ, AyeAye, v8-re...@googlegroups.com, v8-risc...@chromium.org, leszek...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, dmercadi...@chromium.org, victorgo...@chromium.org, verwaes...@chromium.org
    Attention needed from Leszek Swirski and Yuheng Wei

    Michael Lippautz added 3 comments

    Patchset-level comments
    Toon Verwaest . unresolved

    Looks pretty nice. I do think you might need to whitelist code that writes to the bytecode array for sandbox/pkey builds? Adding mlippautz for pkey insights.

    Michael Lippautz

    Trying to figure out where this actually happens. The CL description doesn't really help here. For the HW sandbox using pkeys the reads are fine but write are not.

    Basically we need exit/enter pairs for the HW sandbox around code that writes outside of untrusted memory.

    Commit Message
    Line 8, Patchset 6 (Latest):
    Michael Lippautz . unresolved

    What's going on here? That's a 1kLOC change without any description/bug/design doc?

    File tools/sanitizers/tsan_suppressions.txt
    Line 20, Patchset 6 (Latest):race:BytecodeDecoder::RacyDecodeEmbeddedFeedback
    Michael Lippautz . unresolved

    This is for C++ code, right? Then it should be fixed with using proper atomics. We should not add any more exceptions to this file as this is just not sustainable.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    • Yuheng Wei
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I24390811c12755b0a19beaefe2b0319d75ceaf6c
    Gerrit-Change-Number: 6986847
    Gerrit-PatchSet: 6
    Gerrit-Owner: Yuheng Wei <yuhen...@intel.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
    Gerrit-Reviewer: Yuheng Wei <yuhen...@intel.com>
    Gerrit-CC: Hao A Xu <hao....@intel.com>
    Gerrit-Attention: Yuheng Wei <yuhen...@intel.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Fri, 24 Oct 2025 11:37:49 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Toon Verwaest <verw...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Hao A Xu (Gerrit)

    unread,
    Oct 24, 2025, 7:54:21 AM (2 days ago) Oct 24
    to Yuheng Wei, Michael Lippautz, Toon Verwaest, Leszek Swirski, V8 LUCI CQ, AyeAye, v8-re...@googlegroups.com, v8-risc...@chromium.org, leszek...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, dmercadi...@chromium.org, victorgo...@chromium.org, verwaes...@chromium.org
    Attention needed from Leszek Swirski and Yuheng Wei

    Hao A Xu added 1 comment

    Commit Message
    Michael Lippautz . unresolved

    What's going on here? That's a 1kLOC change without any description/bug/design doc?

    Hao A Xu

    Sorry for missing the description. The purpose of the current CL is to embed the feedback slots for the bytecode "StrictEqual" in its bytecode rather than allocating the slots in the feedback vector. The CL itself can save some memory, and more importantly, we can do some further Sparkplug optimization based on this CL. For the details, please refer to this design doc. (And sure we will add some description in the commit message.)

    Here is the design doc.
    https://docs.google.com/document/d/1QmkY6LEZ7B6kEu1xAr3Dzn4O5gFljmRwvqcA5eMmLsw/edit?tab=t.0#heading=h.byzqhv7xsdrd

    Gerrit-Comment-Date: Fri, 24 Oct 2025 11:54:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Lippautz (Gerrit)

    unread,
    Oct 24, 2025, 8:49:26 AM (2 days ago) Oct 24
    to Yuheng Wei, Toon Verwaest, Leszek Swirski, Hao A Xu, V8 LUCI CQ, AyeAye, v8-re...@googlegroups.com, v8-risc...@chromium.org, leszek...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, dmercadi...@chromium.org, victorgo...@chromium.org, verwaes...@chromium.org
    Attention needed from Leszek Swirski and Yuheng Wei

    Michael Lippautz added 1 comment

    Commit Message
    Michael Lippautz . unresolved

    What's going on here? That's a 1kLOC change without any description/bug/design doc?

    Hao A Xu

    Sorry for missing the description. The purpose of the current CL is to embed the feedback slots for the bytecode "StrictEqual" in its bytecode rather than allocating the slots in the feedback vector. The CL itself can save some memory, and more importantly, we can do some further Sparkplug optimization based on this CL. For the details, please refer to this design doc. (And sure we will add some description in the commit message.)

    Here is the design doc.
    https://docs.google.com/document/d/1QmkY6LEZ7B6kEu1xAr3Dzn4O5gFljmRwvqcA5eMmLsw/edit?tab=t.0#heading=h.byzqhv7xsdrd

    Michael Lippautz

    Thanks, I checked the doc and security sgtm but we should update the text of the design doc a little :)

    Also, we still need add the HW sandbox primitives to make PKU bots pass. You can find various enter/exit pairs depending on your needs here: https://source.chromium.org/search?q=EnterSandbox&ss=chromium

    Let's use the following tracking bug: https://issues.chromium.org/u/1/issues/429351411

    Gerrit-Comment-Date: Fri, 24 Oct 2025 12:49:20 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
    Comment-In-Reply-To: Hao A Xu <hao....@intel.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages