Skip to content

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

@shahab-vahedi

Description

@shahab-vahedi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions