Skip to content

Commit

Permalink
Fix sysret test for C3 machines.
Browse files Browse the repository at this point in the history
C3 machines have 5-level page tables enabled, which support 57 bits for virtual
addresses. So update `kNonCanonicalRsp` so it induces the SIGBUS failure for
5-level page table x86 systems too.

Suggested-by: Andrei Vagin <avagin@google.com>
PiperOrigin-RevId: 632581917
  • Loading branch information
ayushr2 authored and gvisor-bot committed May 11, 2024
1 parent f84a013 commit c057d39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/syscalls/linux/sysret.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace testing {
namespace {

constexpr uint64_t kNonCanonicalRip = 0xCCCC000000000000;
constexpr uint64_t kNonCanonicalRsp = 0xFFFF000000000000;
constexpr uint64_t kNonCanonicalRsp = 0xFE00000000000000;

class SysretTest : public ::testing::Test {
protected:
Expand Down

0 comments on commit c057d39

Please sign in to comment.