[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, midr_el1)

2024-05-13 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

--- Comment #32 from Matthias Brugger  ---
It's good to see that this got fixed. That said it seems that the community
process in valgrind is somewhat broken. I sent a fix, it went silent for nearly
6 years. You took up the work, did a small change and pushed that right away,
no review or possibility to fix it myself.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2024-04-30 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

Matthias Brugger  changed:

   What|Removed |Added

 CC||mbrug...@suse.com

--- Comment #22 from Matthias Brugger  ---
(In reply to Paul Floyd from comment #13)
> Do you have any tests for this?

Unfortunately after such a long time I'm not able to find the reproducer. At
that time I remeber that is was some code in glibc that invoked reads of
MDIR_EL1.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2024-03-18 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

--- Comment #14 from Matthias Brugger  ---
I used to have a test for this, but I lost that over the last 6 years.

But under "Implementation" https://bugs.kde.org/show_bug.cgi?id=482013 gives a
code snipped that can be easily used to create a test.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-11-07 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

Matthias Brugger  changed:

   What|Removed |Added

   Assignee|matthias@gmail.com  |jsew...@acm.org

--- Comment #11 from Matthias Brugger  ---
Julian, Peter, any comments on this patch?

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-07-16 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

--- Comment #10 from Matthias Brugger  ---
any comments on that?

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-06-06 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

--- Comment #9 from Matthias Brugger  ---
Please provide some feedback about the patch.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-06-06 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

Matthias Brugger  changed:

   What|Removed |Added

 Attachment #112966|0   |1
is obsolete||

--- Comment #8 from Matthias Brugger  ---
Created attachment 113113
  --> https://bugs.kde.org/attachment.cgi?id=113113=edit
Implement emulated system registers. Fixes #392146.

Updated version of the patch. I flip the registers of the bits which are not
supported in the emulation environment in the dirty helper. Following the
example of amd's cpuid.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-05-30 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

Matthias Brugger  changed:

   What|Removed |Added

   Assignee|jsew...@acm.org |matthias@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-05-30 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

Matthias Brugger  changed:

   What|Removed |Added

 Attachment #111541|0   |1
is obsolete||

--- Comment #7 from Matthias Brugger  ---
Created attachment 112966
  --> https://bugs.kde.org/attachment.cgi?id=112966=edit
implementation of system register emulation

Emulate all system register accesses. Return only the bits that are supported
by the emulation environment.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-03-29 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

--- Comment #5 from Matthias Brugger <matthias@gmail.com> ---
the following system registers are emulated by the kernel:
MIDR_EL1
MPIDR_EL1
REVIDR_EL1
ID_AA64PFR0_EL1
ID_AA64PFR1_EL1
ID_AA64ZFR0_EL1
ID_AA64DFR0_EL1
ID_AA64DFR1_EL1
ID_AA64AFR0_EL1
ID_AA64AFR1_EL1
ID_AA64ISAR0_EL1
ID_AA64ISAR1_EL1
ID_AA64MMFR0_EL1
ID_AA64MMFR1_EL1
ID_AA64MMFR2_EL1

I have a patch which just puts faked values into the registers in
guest_arm64_toIR.c

But I wonder if we would need to actually provide the real values, as this may
have influence on the program flow of the code under inspection.

The registers give information about the underlying HW, like manufacturer, but
also about which HW enhancements are present.

Is my assumption correct, that we will need to provide the host values of this
registers? Can anyone give guidance in which file/data structure this should be
done.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-03-22 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

--- Comment #4 from Matthias Brugger <matthias@gmail.com> ---
(In reply to Peter Maydell from comment #3)
> Hi; your patch consistently typos the register name -- it is MIDR_EL1 (for
> Main ID Register).
> 

Uups, thanks for noting. 

> This register is only accessible at EL1 in hardware, though -- I guess your
> host kernel is emulating accesses to it? Are there other ID register
> accesses that also now need to be emulated in valgrind because the kernel
> passes them through to userspace?

I'll have to investigate further on this.

I'll update the after I can confirm that we only need MIDR access, or I'll add
the necessary parts as well.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-03-21 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

Matthias Brugger <matthias@gmail.com> changed:

   What|Removed |Added

   Assignee|matthias@gmail.com  |jsew...@acm.org

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-03-21 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

--- Comment #2 from Matthias Brugger <matthias@gmail.com> ---
Created attachment 111541
  --> https://bugs.kde.org/attachment.cgi?id=111541=edit
Iplements "mrs , mdir_el1" for VEX aarch64

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-03-21 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

Matthias Brugger <matthias@gmail.com> changed:

   What|Removed |Added

 CC||matthias@gmail.com
 Ever confirmed|1   |0
 Status|CONFIRMED   |UNCONFIRMED

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-03-21 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

Matthias Brugger <matthias@gmail.com> changed:

   What|Removed |Added

 CC||t...@compton.nu

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-03-21 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

Matthias Brugger <matthias@gmail.com> changed:

   What|Removed |Added

 CC||jsew...@acm.org

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-03-21 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

Matthias Brugger <matthias@gmail.com> changed:

   What|Removed |Added

 Status|UNCONFIRMED |CONFIRMED
 Ever confirmed|0   |1
   Assignee|jsew...@acm.org |matthias@gmail.com

--- Comment #1 from Matthias Brugger <matthias@gmail.com> ---
I will provide a patch

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 392146] New: aarch64: unhandled instruction 0xD5380001 (MRS rT, mdir_el1)

2018-03-21 Thread Matthias Brugger
https://bugs.kde.org/show_bug.cgi?id=392146

Bug ID: 392146
   Summary: aarch64: unhandled instruction 0xD5380001 (MRS rT,
mdir_el1)
   Product: valgrind
   Version: 3.14 SVN
  Platform: Other
OS: Linux
Status: UNCONFIRMED
  Severity: normal
  Priority: NOR
 Component: vex
  Assignee: jsew...@acm.org
  Reporter: matthias@gmail.com
  Target Milestone: ---

Tested with kernel v4.12, valgrind crashes when trying to check for memory
leaks:

# valgrind --leak-check=yes ../test 
==23307== Memcheck, a memory error detector
==23307== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==23307== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==23307== Command: ../test
==23307== 
ARM64 front end: branch_etc
disInstr(arm64): unhandled instruction 0xD5380001
disInstr(arm64): 1101'0101 0011'1000 ' '0001
==23307== valgrind: Unrecognised instruction at address 0x4015734.

Root cause is missing support for reads of MDIR_EL1

-- 
You are receiving this mail because:
You are watching all bug changes.