From patchwork Tue Mar 28 16:20:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 13191342 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83436C6FD18 for ; Tue, 28 Mar 2023 16:20:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232732AbjC1QUk (ORCPT ); Tue, 28 Mar 2023 12:20:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233109AbjC1QUj (ORCPT ); Tue, 28 Mar 2023 12:20:39 -0400 Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A69CDBE0 for ; Tue, 28 Mar 2023 09:20:36 -0700 (PDT) Received: by mail-il1-x132.google.com with SMTP id l9so6612850iln.1 for ; Tue, 28 Mar 2023 09:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1680020436; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=Tb8vE9CVZdofxGXVlAjYvDgKBAc3WLUKxyRR2A+TD+Q=; b=FP/lr6w8sEFPr6Cyx6suPuJ0TeaarnfV88mDujzUw6o3H9VkoVPC16DEPOzyqbTXCr ypmP8Ccf1tPoqpuvLq670/nkMbCauwoQyD2GwCibMYgk3d/STgVrvnUuxeMbCrTI+2AF tfao+swjas47lH4xPy4k4uLl0NQM1BqRnWr8c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680020436; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Tb8vE9CVZdofxGXVlAjYvDgKBAc3WLUKxyRR2A+TD+Q=; b=a8ZT8MeaAC/RpqcxPZdGb0f5Vafr740T92ygzMzyl+VqGZlHgccXBPXxRBChoDRRvg YwT7U8GYM09hQKz8RvcYIKjAnzEPeRsw1pefbOIIr3DWwtd6GNIJbcB//6/H8G8kfO0C 9MBOhxpkr2lJ06v1KlbFsFFMLcekph8KctQ11pUBN9mwA/M3bzQlQpqw6BgyGckgj2wL yYgQXGciGqqMnTqx16xQhP0u2VxbaetjdvvCyBv9oRrKlXpSShBObuCLJwe3s1s0pqFU Xb8A8lHR6qXkLVwZRnOVHIqtps3KytBvBVr3VbWSBvRfQvPYpSA9YODL2lXlefBR2/UL iCSg== X-Gm-Message-State: AAQBX9fv2P5Wb6v/vlcdGM8b+z/sVEGFX0ZfHx1P8SN94Lh8PRoVeeRC lklt3HGn6AAyVsRPYPJwNjaqnhYAAsjCYm4TZBg= X-Google-Smtp-Source: AKy350b5T9b5uzPVHlA1UEYW3EdQ9M017C8aVxEUFL808tJVV9OaNRvrjCM/5YT/9FBEZ8ko9LAVlw== X-Received: by 2002:a05:6e02:1042:b0:323:504:cff6 with SMTP id p2-20020a056e02104200b003230504cff6mr8321618ilj.3.1680020435825; Tue, 28 Mar 2023 09:20:35 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id n24-20020a056638121800b00406132281e4sm9840164jas.109.2023.03.28.09.20.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Mar 2023 09:20:35 -0700 (PDT) Message-ID: Date: Tue, 28 Mar 2023 10:20:34 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Linus Torvalds Cc: skhan@linuxfoundation.org, shuah@kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org From: Shuah Khan Subject: [GIT PULL] Kselftest fixes update for Linux 6.3-rc5 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Hi Linus, Please pull the following Kselftest fixes update for Linux 6.3-rc5. This Kselftest fixes update for Linux 6.3-rc5 consists of one single fix for sigaltstack test -Wuninitialized warning found when building with clang. diff is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit 624c60f326c6e5a80b008e8a5c7feffe8c27dc72: selftests: fix LLVM build for i386 and x86_64 (2023-03-10 13:41:10 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-fixes-6.3-rc5 for you to fetch changes up to 05107edc910135d27fe557267dc45be9630bf3dd: selftests: sigaltstack: fix -Wuninitialized (2023-03-20 17:28:31 -0600) ---------------------------------------------------------------- linux-kselftest-fixes-6.3-rc5 This Kselftest fixes update for Linux 6.3-rc5 consists of one single fix for sigaltstack test -Wuninitialized warning found when building with clang. ---------------------------------------------------------------- Nick Desaulniers (1): selftests: sigaltstack: fix -Wuninitialized .../selftests/sigaltstack/current_stack_pointer.h | 23 ++++++++++++++++++++++ tools/testing/selftests/sigaltstack/sas.c | 7 +------ 2 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 tools/testing/selftests/sigaltstack/current_stack_pointer. ---------------------------------------------------------------- diff --git a/tools/testing/selftests/sigaltstack/current_stack_pointer.h b/tools/testing/selftests/sigaltstack/current_stack_pointer.h new file mode 100644 index 000000000000..ea9bdf3a90b1 --- /dev/null +++ b/tools/testing/selftests/sigaltstack/current_stack_pointer.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#if __alpha__ +register unsigned long sp asm("$30"); +#elif __arm__ || __aarch64__ || __csky__ || __m68k__ || __mips__ || __riscv +register unsigned long sp asm("sp"); +#elif __i386__ +register unsigned long sp asm("esp"); +#elif __loongarch64 +register unsigned long sp asm("$sp"); +#elif __ppc__ +register unsigned long sp asm("r1"); +#elif __s390x__ +register unsigned long sp asm("%15"); +#elif __sh__ +register unsigned long sp asm("r15"); +#elif __x86_64__ +register unsigned long sp asm("rsp"); +#elif __XTENSA__ +register unsigned long sp asm("a1"); +#else +#error "implement current_stack_pointer equivalent" +#endif diff --git a/tools/testing/selftests/sigaltstack/sas.c b/tools/testing/selftests/sigaltstack/sas.c index c53b070755b6..98d37cb744fb 100644 --- a/tools/testing/selftests/sigaltstack/sas.c +++ b/tools/testing/selftests/sigaltstack/sas.c @@ -20,6 +20,7 @@ #include #include "../kselftest.h" +#include "current_stack_pointer.h" #ifndef SS_AUTODISARM #define SS_AUTODISARM (1U << 31) @@ -46,12 +47,6 @@ void my_usr1(int sig, siginfo_t *si, void *u) stack_t stk; struct stk_data *p; -#if __s390x__ - register unsigned long sp asm("%15"); -#else - register unsigned long sp asm("sp"); -#endif - if (sp < (unsigned long)sstack || sp >= (unsigned long)sstack + stack_size) { ksft_exit_fail_msg("SP is not on sigaltstack\n");