linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@linux.ibm.com>
To: Kevin Brodsky <kevin.brodsky@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, aruna.ramakrishna@oracle.com,
	catalin.marinas@arm.com, dave.hansen@linux.intel.com,
	joey.gouly@arm.com, keith.lucas@oracle.com, ryan.roberts@arm.com,
	shuah@kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, x86@kernel.org,
	linux-s390@vger.kernel.org
Subject: Re: [PATCH 11/14] selftests/mm: Use sys_pkey helpers consistently
Date: Sun, 15 Dec 2024 23:09:27 +0100	[thread overview]
Message-ID: <Z19Tl30BuKTfL629@tuxmaker.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20241209095019.1732120-12-kevin.brodsky@arm.com>

On Mon, Dec 09, 2024 at 09:50:16AM +0000, Kevin Brodsky wrote:

Hi Kevin, Andrew,

> diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile
> index 814b17a43385..1f0743d9459d 100644
> --- a/tools/testing/selftests/mm/Makefile
> +++ b/tools/testing/selftests/mm/Makefile
> @@ -147,8 +147,8 @@ TEST_FILES += write_hugetlb_memory.sh
>  
>  include ../lib.mk
>  
> -$(TEST_GEN_PROGS): vm_util.c thp_settings.c
> -$(TEST_GEN_FILES): vm_util.c thp_settings.c
> +$(TEST_GEN_PROGS): vm_util.c thp_settings.c pkey_util.c
> +$(TEST_GEN_FILES): vm_util.c thp_settings.c pkey_util.c

This patch breaks s390 in -next with the below error messages:

In file included from pkey_util.c:5:
pkey-helpers.h:109:2: error: #error Architecture not supported
  109 | #error Architecture not supported
      |  ^~~~~
pkey-helpers.h: In function ‘set_pkey_bits’:
pkey-helpers.h:126:21: error: implicit declaration of function ‘pkey_bit_position’ [-Wimplicit-function-declaration]
  126 |         u32 shift = pkey_bit_position(pkey);
      |                     ^~~~~~~~~~~~~~~~~
pkey-helpers.h: In function ‘_read_pkey_reg’:
pkey-helpers.h:151:24: error: implicit declaration of function ‘__read_pkey_reg’; did you mean ‘_read_pkey_reg’? [-Wimplicit-function-declaration]
  151 |         u64 pkey_reg = __read_pkey_reg();
      |                        ^~~~~~~~~~~~~~~
      |                        _read_pkey_reg
pkey-helpers.h: In function ‘write_pkey_reg’:
pkey-helpers.h:165:18: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘int’ [-Wformat=]
  165 |         dprintf4("%s() changing %016llx to %016llx\n", __func__,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  166 |                         __read_pkey_reg(), pkey_reg);
      |                         ~~~~~~~~~~~~~~~~~
      |                         |
      |                         int
pkey-helpers.h:62:32: note: in definition of macro ‘dprintf_level’
   62 |                 sigsafe_printf(args);           \
      |                                ^~~~
pkey-helpers.h:165:9: note: in expansion of macro ‘dprintf4’
  165 |         dprintf4("%s() changing %016llx to %016llx\n", __func__,
      |         ^~~~~~~~
pkey-helpers.h:165:39: note: format string is defined here
  165 |         dprintf4("%s() changing %016llx to %016llx\n", __func__,
      |                                 ~~~~~~^
      |                                       |
      |                                       long long unsigned int
      |                                 %016x
pkey-helpers.h:169:9: error: implicit declaration of function ‘__write_pkey_reg’; did you mean ‘write_pkey_reg’? [-Wimplicit-function-declaration]
  169 |         __write_pkey_reg(pkey_reg);
      |         ^~~~~~~~~~~~~~~~
      |         write_pkey_reg
pkey-helpers.h:171:18: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘int’ [-Wformat=]
  171 |         dprintf4("%s(%016llx) pkey_reg: %016llx\n", __func__,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  172 |                         pkey_reg, __read_pkey_reg());
      |                                   ~~~~~~~~~~~~~~~~~
      |                                   |
      |                                   int
pkey-helpers.h:62:32: note: in definition of macro ‘dprintf_level’
   62 |                 sigsafe_printf(args);           \
      |                                ^~~~
pkey-helpers.h:171:9: note: in expansion of macro ‘dprintf4’
  171 |         dprintf4("%s(%016llx) pkey_reg: %016llx\n", __func__,
      |         ^~~~~~~~
pkey-helpers.h:171:47: note: format string is defined here
  171 |         dprintf4("%s(%016llx) pkey_reg: %016llx\n", __func__,
      |                                         ~~~~~~^
      |                                               |
      |                                               long long unsigned int
      |                                         %016x
pkey-helpers.h: In function ‘is_pkeys_supported’:
pkey-helpers.h:207:14: error: implicit declaration of function ‘cpu_has_pkeys’; did you mean ‘kernel_has_pkeys’? [-Wimplicit-function-declaration]
  207 |         if (!cpu_has_pkeys()) {
      |              ^~~~~~~~~~~~~
      |              kernel_has_pkeys

Please, let me know if I am missing something.

>  $(OUTPUT)/uffd-stress: uffd-common.c
>  $(OUTPUT)/uffd-unit-tests: uffd-common.c

Thanks!


  reply	other threads:[~2024-12-15 22:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09  9:50 [PATCH 00/14] pkeys kselftests improvements Kevin Brodsky
2024-12-09  9:50 ` [PATCH 01/14] selftests/mm: Fix condition in uffd_move_test_common() Kevin Brodsky
2024-12-09  9:50 ` [PATCH 02/14] selftests/mm: Fix -Wmaybe-uninitialized warnings Kevin Brodsky
2024-12-09  9:50 ` [PATCH 03/14] selftests/mm: Fix strncpy() length Kevin Brodsky
2024-12-09  9:50 ` [PATCH 04/14] selftests/mm: Fix -Warray-bounds warnings in pkey_sighandler_tests Kevin Brodsky
2024-12-18 15:36   ` [PATCH] selftests/mm: Fix -Wnull-dereference on Clang Kevin Brodsky
2024-12-09  9:50 ` [PATCH 05/14] selftests/mm: Build with -O2 Kevin Brodsky
2025-01-07 17:01   ` [PATCH] selftests/mm: silence unused-result warnings Kevin Brodsky
2024-12-09  9:50 ` [PATCH 06/14] selftests/mm: Remove unused pkey helpers Kevin Brodsky
2024-12-09  9:50 ` [PATCH 07/14] selftests/mm: Define types using typedef in pkey-helpers.h Kevin Brodsky
2024-12-09  9:50 ` [PATCH 08/14] selftests/mm: Ensure pkey-*.h define inline functions only Kevin Brodsky
2024-12-09  9:50 ` [PATCH 09/14] selftests/mm: Remove empty pkey helper definition Kevin Brodsky
2024-12-09  9:50 ` [PATCH 10/14] selftests/mm: Ensure non-global pkey symbols are marked static Kevin Brodsky
2024-12-09  9:50 ` [PATCH 11/14] selftests/mm: Use sys_pkey helpers consistently Kevin Brodsky
2024-12-15 22:09   ` Alexander Gordeev [this message]
2024-12-16  9:28     ` [PATCH] selftests/mm: fix dependency on pkey_util.c Kevin Brodsky
2024-12-09  9:50 ` [PATCH 12/14] selftests/mm: Rename pkey register macro Kevin Brodsky
2024-12-09  9:50 ` [PATCH 13/14] selftests/mm: Skip pkey_sighandler_tests if support is missing Kevin Brodsky
2024-12-09  9:50 ` [PATCH 14/14] selftests/mm: Remove X permission from sigaltstack mapping Kevin Brodsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z19Tl30BuKTfL629@tuxmaker.boeblingen.de.ibm.com \
    --to=agordeev@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=aruna.ramakrishna@oracle.com \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=joey.gouly@arm.com \
    --cc=keith.lucas@oracle.com \
    --cc=kevin.brodsky@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=shuah@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox