Skip to content

Conversation

@yktyagi
Copy link

@yktyagi yktyagi commented Feb 1, 2026

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.

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>
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>
@markus-metzger
Copy link
Contributor

Thanks for your patch. Using nasm is a good idea.

Tested with:

test/src/loop-tnt.ptt
test/src/dump-all-packets.ptt

How about the other tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants