boostorg / boostorg/lockfree

x86-64 pointer tagging is unsound on most recent Intel CPUs (Ice Lake)

Open
#56 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
160
Forks
99
PR merge metrics
No merged PRs in 30d

Description

According to the boost::lockfree [documentation](https://www.boost.org/doc/libs/1_72_0/doc/html/lockfree/rationale.html) and from what I can see from boost/lockfree/detail/tagged_ptr_ptrcompression.hpp, the implementation of the free-list stores a 16-bit tag value in the upper bits of a 64-bit pointer.

Most recent Intel x86_48 microarchs (Ice Lake) use 5-level page tables and 57-bit virtual addresses, meaning this technique of pointer tagging can fail unexpectedly when used on such a processor.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with boost/lockfree/detail/tagged_ptr_ptrcompression.hpp and compare its pointer-tagging assumptions with the linked Boost.Lockfree rationale documentation. Determine how the implementation behaves with 57-bit virtual addresses on Ice Lake; done means the free-list no longer relies on an invalid upper-bit assumption and the behavior is documented or covered by an appropriate validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.