Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARCv2/EXCP] "ld.x" for data size >= 32-bit should throw exception #211

Open
shahab-vahedi opened this issue Jan 30, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@shahab-vahedi
Copy link
Member

shahab-vahedi commented Jan 30, 2024

Sign-extension during the load operation for data sizes greater or equal to register size does not make sense and is illegal.

A piece of code like

13f8 b048                ld.x    r8,[fp,-8]

must throw an exception with the following properties (see efa, ecr):

Illegal Insn (or Seq)
Path: /bin/busybox
CPU: 3 PID: 172 Comm: insmod Not tainted 6.7.0-rc6-00030-ga383ea83eccb #5
Illegal Insn
ECR: 0x00020000 EFA: 0x700ff5a0 ERET: 0x700ff5a0
STAT32: 0x80080802 [IE K     ]   BTA: 0x700ff56c
 SP: 0x807c3dc4  FP: 0x807c3dcc BLK: __run_one+0xe8/0x500 [test_bpf]
LPS: 0x90aa57c0 LPE: 0x90aa57c4 LPC: 0x00000000
r00: 0xdeadbeef r01: 0x00000000 r02: 0xdeadbeef
r03: 0xffffffff r04: 0x001954fc r05: 0x00000017
r06: 0x00800000 r07: 0xffffffff r08: 0x00000099
r09: 0xffffffff r10: 0x0001205d r11: 0x00000000
r12: 0x40000000 r13: 0x90478568 r14: 0xffffffff
r15: 0x5fd67a84 r16: 0x00000000 r17: 0x00000002
r18: 0x00000000 r19: 0x00000000 r20: 0x00000000
r21: 0x00000000 r22: 0x00000000 r23: 0x00000000
r24: 0x00000000 r25: 0x00000000

Stack Trace:

This is both for ld and ldd. ARCv3-32bit probably suffers from the same issue. Or ARCv3-64's ld.

@shahab-vahedi shahab-vahedi added the bug Something isn't working label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants