mbox series

[v2,0/6] selftests/x86: fix build errors and warnings found via clang

Message ID 20240527210042.220315-1-jhubbard@nvidia.com
Headers show
Series selftests/x86: fix build errors and warnings found via clang | expand

Message

John Hubbard May 27, 2024, 9 p.m. UTC
Hi,

Just a bunch of build and warnings fixes that show up when
building with clang. Some of these depend on each other, so
I'm sending them as a series.

Changes since the first version:

1) Rebased onto Linux 6.10-rc1

Enjoy!

thanks,
John Hubbard

John Hubbard (6):
  selftests/x86: build test_FISTTP.c with clang
  selftests/x86: build fsgsbase_restore.c with clang
  selftests/x86: build sysret_rip.c with clang
  selftests/x86: avoid -no-pie warnings from clang during compilation
  selftests/x86: remove (or use) unused variables and functions
  selftests/x86: fix printk warnings reported by clang

 tools/testing/selftests/x86/Makefile          | 10 +++++++
 tools/testing/selftests/x86/amx.c             | 16 -----------
 .../testing/selftests/x86/clang_helpers_32.S  | 11 ++++++++
 .../testing/selftests/x86/clang_helpers_64.S  | 28 +++++++++++++++++++
 tools/testing/selftests/x86/fsgsbase.c        |  6 ----
 .../testing/selftests/x86/fsgsbase_restore.c  | 11 ++++----
 tools/testing/selftests/x86/sigreturn.c       |  2 +-
 .../testing/selftests/x86/syscall_arg_fault.c |  1 -
 tools/testing/selftests/x86/sysret_rip.c      | 20 ++++---------
 tools/testing/selftests/x86/test_FISTTP.c     |  8 +++---
 tools/testing/selftests/x86/test_vsyscall.c   | 15 ++++------
 tools/testing/selftests/x86/vdso_restorer.c   |  2 ++
 12 files changed, 72 insertions(+), 58 deletions(-)
 create mode 100644 tools/testing/selftests/x86/clang_helpers_32.S
 create mode 100644 tools/testing/selftests/x86/clang_helpers_64.S


base-commit: 2bfcfd584ff5ccc8bb7acde19b42570414bf880b
prerequisite-patch-id: 39d606b9b165077aa1a3a3b0a3b396dba0c20070

Comments

Dave Hansen May 30, 2024, 7:46 p.m. UTC | #1
On 5/27/24 14:00, John Hubbard wrote:
> John Hubbard (6):
>   selftests/x86: build test_FISTTP.c with clang
>   selftests/x86: build fsgsbase_restore.c with clang
>   selftests/x86: build sysret_rip.c with clang
>   selftests/x86: avoid -no-pie warnings from clang during compilation
>   selftests/x86: remove (or use) unused variables and functions
>   selftests/x86: fix printk warnings reported by clang

John, could you and Muhammad have a chat and perhaps settle on a series
series that gets acks from both of you?

> https://lore.kernel.org/all/20240501122918.3831734-1-usama.anjum@collabora.com/

I had Muhammad's in my queue and didn't realize we had two overlapping
series' bouncing around until now.
Muhammad Usama Anjum May 31, 2024, 5:12 a.m. UTC | #2
On 5/31/24 1:00 AM, John Hubbard wrote:
> On 5/30/24 12:46 PM, Dave Hansen wrote:
>> On 5/27/24 14:00, John Hubbard wrote:
>>> John Hubbard (6):
>>>    selftests/x86: build test_FISTTP.c with clang
>>>    selftests/x86: build fsgsbase_restore.c with clang
>>>    selftests/x86: build sysret_rip.c with clang
>>>    selftests/x86: avoid -no-pie warnings from clang during compilation
>>>    selftests/x86: remove (or use) unused variables and functions
>>>    selftests/x86: fix printk warnings reported by clang
>>
>> John, could you and Muhammad have a chat and perhaps settle on a series
>> series that gets acks from both of you?
>>
>>> https://lore.kernel.org/all/20240501122918.3831734-1-usama.anjum@collabora.com/
>>
>> I had Muhammad's in my queue and didn't realize we had two overlapping
>> series' bouncing around until now.
> 
> Aha OK. Muhummad, after looking through this, I see that our
> test_FISTTP.c fix is identical, and that's about it. My series goes
> a bit deeper IMHO and completely fixes all the errors; the tradeoff
> is that it is more intrusive. Which I think is appropriate.
> 
> Would you be OK with my posting v3 that uses your patch for
> test_FISTTP.c [1], and the rest of my patches for the rest?
Yeah, sure go ahead. I'll test/review the v3 series.

> 
> 
> [1]
> https://lore.kernel.org/all/20240501122918.3831734-7-usama.anjum@collabora.com/
> 
> thanks,