pttc: Add support for nasm assembler#120
Open
yktyagi wants to merge 1 commit intointel:stable/v2.2from
Open
Conversation
yktyagi
added a commit
to yktyagi/meta-intel
that referenced
this pull request
Feb 1, 2026
Replace yasm with nasm as yasm is no longer maintained and has unpatched CVEs (CVE-2024-45534, CVE-2024-45535). Nasm is actively maintained and generates compatible listing files. The patch includes: - Changed assembler invocation from yasm to nasm - Removed unsupported -L nasm parameter - Added dual-format parser for org directives (yasm and nasm syntax) - Implemented 1:1 line mapping fallback for nasm listing format - Updated documentation Both test cases (loop-tnt.ptt and dump-all-packets.ptt) now pass on target system. Upstream-Status: Submitted [intel/libipt#120] Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
yktyagi
added a commit
to yktyagi/meta-intel
that referenced
this pull request
Feb 1, 2026
Replace yasm with nasm as yasm is no longer maintained and has unpatched CVEs (CVE-2024-45534, CVE-2024-45535). Nasm is actively maintained and generates compatible listing files. The patch includes: - Changed assembler invocation from yasm to nasm - Removed unsupported -L nasm parameter - Added dual-format parser for org directives (yasm and nasm syntax) - Implemented 1:1 line mapping fallback for nasm listing format - Updated documentation Both test cases (loop-tnt.ptt and dump-all-packets.ptt) now pass on target system. Upstream-Status: Submitted [intel/libipt#120] Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
b75abed to
2a62be5
Compare
Replace yasm with nasm as the default assembler for pttc. Yasm is no longer actively maintained and has known security vulnerabilities, while nasm is actively developed and provides equivalent functionality. Key changes: 1. Update assembler invocation from 'yasm' to 'nasm' 2. Remove '-L nasm' option (nasm doesn't need this flag) 3. Adjust argv array indices after removing the flag 4. Support both yasm and nasm org directive formats: - yasm: [org 0x100000] - nasm: org 0x100000 5. Handle nasm's listing format which lacks %line directives by implementing 1:1 line mapping fallback for source correlation The changes maintain backward compatibility with existing .ptt test files while enabling nasm as the preferred assembler. Tested with: - test/src/loop-tnt.ptt - test/src/dump-all-packets.ptt Both tests generate valid PT traces that can be decoded with ptdump. Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
yktyagi
added a commit
to yktyagi/meta-intel
that referenced
this pull request
Feb 1, 2026
Replace yasm with nasm as yasm is no longer maintained and has unpatched CVEs (CVE-2024-45534, CVE-2024-45535). Nasm is actively maintained and generates compatible listing files. The patch includes: - Changed assembler invocation from yasm to nasm - Removed unsupported -L nasm parameter - Added dual-format parser for org directives (yasm and nasm syntax) - Implemented 1:1 line mapping fallback for nasm listing format - Updated documentation Both test cases (loop-tnt.ptt and dump-all-packets.ptt) now pass on target system. Upstream-Status: Submitted [intel/libipt#120] Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
Contributor
|
Thanks for your patch. Using nasm is a good idea.
How about the other tests? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace yasm with nasm as the default assembler for pttc. Yasm is no longer actively maintained and has known security vulnerabilities, while nasm is actively developed and provides equivalent functionality.
Key changes:
The changes maintain backward compatibility with existing .ptt test files while enabling nasm as the preferred assembler.
Tested with:
Both tests generate valid PT traces that can be decoded with ptdump.