Fix ptrace07 hardcoded xstate size issue
Get series with b4
b4 am [email protected]Versions newest first
- v3 Latest2 patches 0 repliesNew
Changes in v3 from the cover letter
- Thanks Richard Palethorpe's report, should not use old API cpuid function in LTP, and provide the __cpuid_count() function instead
- Thanks Richard Palethorpe's suggestion, put __cpuid_count() in include/lapi/cpuid.h
- Add the aligned_alloc() successfully check in ptrace07.c
- Add the cpuid output check prints as Richard Palethorpe's suggestion
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | cpuid.h: Provide the macro definition __cpuid_count()include/ | +24 | 0 replies | |
| 2/2 | ptrace07: fix the broken case caused by hardcoded xstate sizetestcases/ | +25 | 0 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Chang S. Bae |
|---|---|
| 1/2 | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [LTP] [PATCH v3 0/2] Fix ptrace07 hardcoded xstate size issue
Should not use a hardcoded xstate size(512 * 8 = 4096 bytes), and use maximum XSAVE size specified by CPUID.(EAX=0DH, ECX=0H):EBX instead.
If the CPU's maximum XSAVE size exceeds the hard-coded xstate size 4096 bytes, it will cause the ptrace07 case to break as below:
"
./ptrace07
tst_test.c:1528: TINFO: Timeout per run is 0h 00m 30s ptrace07.c:142: TBROK: PTRACE_SETREGSET failed with unexpected error: EFAULT (14) tst_test.c:1571: TINFO: Killed the leftover descendant processes
Summary:
passed 0 failed 0 broken 1 skipped 0
warnings 0
"
And there is no proper cpuid() function in LTP, so provides the cpuid() function first in previous commit.
=========
v2 -> v3:
- Thanks Richard Palethorpe's report, should not use old API cpuid function in LTP, and provide the __cpuid_count() function instead
- Thanks Richard Palethorpe's suggestion, put __cpuid_count() in include/lapi/cpuid.h
- Add the aligned_alloc() successfully check in ptrace07.c
- Add the cpuid output check prints as Richard Palethorpe's suggestion
Pengfei Xu (2):
cpuid.h: Provide the macro definition __cpuid_count()
ptrace07: fix the broken case caused by hardcoded xstate size
include/lapi/cpuid.h | 24 +++++++++++++++++ testcases/kernel/syscalls/ptrace/ptrace07.c | 29 ++++++++++++++++++--- 2 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 include/lapi/cpuid.h
Signature · 5 lines
2.31.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp