[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-04-04 Thread Carl Love
https://bugs.kde.org/show_bug.cgi?id=451827

Carl Love  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

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

[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-04-04 Thread Carl Love
https://bugs.kde.org/show_bug.cgi?id=451827

Carl Love  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REOPENED|RESOLVED

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

[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-04-04 Thread Carl Love
https://bugs.kde.org/show_bug.cgi?id=451827

--- Comment #9 from Carl Love  ---
FIx for 32-bit systems committed.

commit bc4dc04d5f23e363a79bade6dee475e9c2287c93 (HEAD -> master)
Author: Carl Love 
Date:   Mon Apr 4 21:31:33 2022 -0400

Powerpc 32bit, fix the vbpermq support

Passing the two 128-bit vA and vB arguments doesn't work in 32-bit mode.
The clean helper was changed to compute the result for 8 indexes.  The
helper is then called twice to get the result for the upper 64-bits of the
vB register and the lower 64-bits of the vB register.

The patch is an additional fix for bugzilla 451827.

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

[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-04-04 Thread Carl Love
https://bugs.kde.org/show_bug.cgi?id=451827

--- Comment #8 from Carl Love  ---
Fix for 32-bit systems was tested on Power 8 BE, 32-bit and 64-bit, Power 8 LE
84-bit, Power 9, Power 10.  No regressions were found.

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

[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-04-04 Thread Carl Love
https://bugs.kde.org/show_bug.cgi?id=451827

--- Comment #7 from Carl Love  ---
Created attachment 147972
  --> https://bugs.kde.org/attachment.cgi?id=147972=edit
Fix for 32-bit Powerpc

The patch fixes the instruction support on 32-bit Powerpc.

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

[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-04-04 Thread Carl Love
https://bugs.kde.org/show_bug.cgi?id=451827

Carl Love  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|CLOSED  |REOPENED
 Resolution|FIXED   |---

--- Comment #6 from Carl Love  ---
Issue found with Powerpc 32-bit.

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

[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-03-25 Thread Carl Love
https://bugs.kde.org/show_bug.cgi?id=451827

Carl Love  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

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

[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-03-25 Thread Carl Love
https://bugs.kde.org/show_bug.cgi?id=451827

Carl Love  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REPORTED|RESOLVED

--- Comment #5 from Carl Love  ---
Patch committed to Valgrind mainline

commit 00017cda521fb3aa3e5d8b892941dbb6bd6c3c25 (HEAD -> master)
Author: Carl Love 
Date:   Wed Mar 23 13:41:16 2022 -0500

Powerpc, re-implement the vbpermq instruction support

The instruction support generates too many Iops when multiple vbpermq
instructions occur together in the binary. This patch changes the
implementation to use a clean helper and thus avoid overflowing the
internal Valgrind buffer.

bugzilla 451827

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

[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-03-25 Thread Jesus Checa
https://bugs.kde.org/show_bug.cgi?id=451827

--- Comment #4 from Jesus Checa  ---
Hi Carl,

Thanks for the quick patch. I verified it with a fresh valgrind repo and all
looks good now. FTR, these are the steps I followed for the verification:
```
$ gcc reproducer.c -o reproducer # This is the reproducer presented in bug
description
$ curl https://bugsfiles.kde.org/attachment.cgi?id=147709 > vbpermq.patch
$ git clone git://sourceware.org/git/valgrind.git && cd valgrind
$ git apply ../vbpermq.patch
$ ./autogen.sh && ./configure && make -j$(nproc)
$ ./vg-in-place ../reproducer
```

No temporary storage exhausted messages now. To give it a twist, I added a
ridiculously high number of vbpermq instructions (~1000) to the reproducer, and
valgrind still runs perfectly, so the patch is fine from my side.

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

[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-03-24 Thread Will Schmidt
https://bugs.kde.org/show_bug.cgi?id=451827

Will Schmidt  changed:

   What|Removed |Added

 CC||jsew...@acm.org

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

[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-03-24 Thread Carl Love
https://bugs.kde.org/show_bug.cgi?id=451827

Carl Love  changed:

   What|Removed |Added

   Assignee|jsew...@acm.org |c...@us.ibm.com

--- Comment #3 from Carl Love  ---
Created attachment 147709
  --> https://bugs.kde.org/attachment.cgi?id=147709=edit
patch to re-implement the vbpermq instruction using a clean helper

The attached patch against current Valgrind mainline changes the support for
the vbpermq instruction from using just Iops to use a clean helper.  The clean
helper significantly reduces the number of Iops thus allowing a series of
multiple vbpermq instructions to be decoded without overflowing the Valgrind
buffer.

Please pull down the Valgrind mainline tree, apply the patch and test it on
your application to make sure it works for me.  Contact me if you need help
with building a patched version of Valgrind. 

Please let me know if you see any additional issues with this patch.  Assuming
everything is fine, I will commit the patch to mainline.  Thanks.

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

[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-03-23 Thread Carl Love
https://bugs.kde.org/show_bug.cgi?id=451827

--- Comment #2 from Carl Love  ---
Yes, it is probably generating too many iops.  I will need to re-implement the
support with a clean helper.

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

[valgrind] [Bug 451827] [ppc64le] VEX temporary storage exhausted with several vbpermq instructions

2022-03-23 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=451827

Mark Wielaard  changed:

   What|Removed |Added

 CC||c...@us.ibm.com,
   ||m...@klomp.org,
   ||will_schm...@vnet.ibm.com

--- Comment #1 from Mark Wielaard  ---
If you look at VEX/priv/guest_ppc_toIR.c and search for vbpermq you'll see it
has a loop in which it generates VEX IR.
for (i = 0; i < 16; i++) { ... I count at least 20 ops ... } so each vbpermq
generates at least 320 operations.
So 3 in a row generate more than a thousand VEX ops... And I wouldn't be
surprised if that hits some limit

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