* [PATCH v4 06/66] selftests/cachestat: Drop define _GNU_SOURCE
[not found] <20240510000842.410729-1-edliaw@google.com>
@ 2024-05-10 0:06 ` Edward Liaw
2024-05-10 0:06 ` [PATCH v4 08/66] selftests/cgroup: " Edward Liaw
` (3 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: Edward Liaw @ 2024-05-10 0:06 UTC (permalink / raw)
To: shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, Nhat Pham, Johannes Weiner
Cc: linux-kernel, linux-kselftest, kernel-team, Edward Liaw,
linux-security-module, netdev, linux-riscv, bpf, John Hubbard,
Muhammad Usama Anjum, linux-mm
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
redefinition warnings.
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Edward Liaw <edliaw@google.com>
---
tools/testing/selftests/cachestat/test_cachestat.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/testing/selftests/cachestat/test_cachestat.c b/tools/testing/selftests/cachestat/test_cachestat.c
index b171fd53b004..c1a6ce7b0912 100644
--- a/tools/testing/selftests/cachestat/test_cachestat.c
+++ b/tools/testing/selftests/cachestat/test_cachestat.c
@@ -1,6 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#define _GNU_SOURCE
-
#include <stdio.h>
#include <stdbool.h>
#include <linux/kernel.h>
--
2.45.0.118.g7fe29c98d7-goog
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v4 08/66] selftests/cgroup: Drop define _GNU_SOURCE
[not found] <20240510000842.410729-1-edliaw@google.com>
2024-05-10 0:06 ` [PATCH v4 06/66] selftests/cachestat: Drop define _GNU_SOURCE Edward Liaw
@ 2024-05-10 0:06 ` Edward Liaw
2024-05-13 17:02 ` Tejun Heo
2024-05-10 0:06 ` [PATCH v4 11/66] selftests/damon: " Edward Liaw
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Edward Liaw @ 2024-05-10 0:06 UTC (permalink / raw)
To: shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, Tejun Heo, Zefan Li, Johannes Weiner,
Muchun Song, Michal Hocko, Roman Gushchin, Shakeel Butt,
Yosry Ahmed, Nhat Pham, Chengming Zhou
Cc: linux-kernel, linux-kselftest, kernel-team, Edward Liaw,
linux-security-module, netdev, linux-riscv, bpf, cgroups,
linux-mm
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
redefinition warnings.
Signed-off-by: Edward Liaw <edliaw@google.com>
---
tools/testing/selftests/cgroup/cgroup_util.c | 3 ---
tools/testing/selftests/cgroup/test_core.c | 2 --
tools/testing/selftests/cgroup/test_cpu.c | 2 --
tools/testing/selftests/cgroup/test_hugetlb_memcg.c | 2 --
tools/testing/selftests/cgroup/test_kmem.c | 2 --
tools/testing/selftests/cgroup/test_memcontrol.c | 2 --
tools/testing/selftests/cgroup/test_zswap.c | 2 --
7 files changed, 15 deletions(-)
diff --git a/tools/testing/selftests/cgroup/cgroup_util.c b/tools/testing/selftests/cgroup/cgroup_util.c
index 432db923bced..ce16a50ecff8 100644
--- a/tools/testing/selftests/cgroup/cgroup_util.c
+++ b/tools/testing/selftests/cgroup/cgroup_util.c
@@ -1,7 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
-
-#define _GNU_SOURCE
-
#include <errno.h>
#include <fcntl.h>
#include <linux/limits.h>
diff --git a/tools/testing/selftests/cgroup/test_core.c b/tools/testing/selftests/cgroup/test_core.c
index a5672a91d273..de8baad46022 100644
--- a/tools/testing/selftests/cgroup/test_core.c
+++ b/tools/testing/selftests/cgroup/test_core.c
@@ -1,6 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
-
-#define _GNU_SOURCE
#include <linux/limits.h>
#include <linux/sched.h>
#include <sys/types.h>
diff --git a/tools/testing/selftests/cgroup/test_cpu.c b/tools/testing/selftests/cgroup/test_cpu.c
index dad2ed82f3ef..5a4a314f6af7 100644
--- a/tools/testing/selftests/cgroup/test_cpu.c
+++ b/tools/testing/selftests/cgroup/test_cpu.c
@@ -1,6 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-
-#define _GNU_SOURCE
#include <linux/limits.h>
#include <sys/sysinfo.h>
#include <sys/wait.h>
diff --git a/tools/testing/selftests/cgroup/test_hugetlb_memcg.c b/tools/testing/selftests/cgroup/test_hugetlb_memcg.c
index 856f9508ea56..80d05d50a42d 100644
--- a/tools/testing/selftests/cgroup/test_hugetlb_memcg.c
+++ b/tools/testing/selftests/cgroup/test_hugetlb_memcg.c
@@ -1,6 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#define _GNU_SOURCE
-
#include <linux/limits.h>
#include <sys/mman.h>
#include <stdio.h>
diff --git a/tools/testing/selftests/cgroup/test_kmem.c b/tools/testing/selftests/cgroup/test_kmem.c
index 96693d8772be..2e453ac50c0d 100644
--- a/tools/testing/selftests/cgroup/test_kmem.c
+++ b/tools/testing/selftests/cgroup/test_kmem.c
@@ -1,6 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#define _GNU_SOURCE
-
#include <linux/limits.h>
#include <fcntl.h>
#include <stdio.h>
diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c b/tools/testing/selftests/cgroup/test_memcontrol.c
index 41ae8047b889..c871630d62a3 100644
--- a/tools/testing/selftests/cgroup/test_memcontrol.c
+++ b/tools/testing/selftests/cgroup/test_memcontrol.c
@@ -1,6 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
-#define _GNU_SOURCE
-
#include <linux/limits.h>
#include <linux/oom.h>
#include <fcntl.h>
diff --git a/tools/testing/selftests/cgroup/test_zswap.c b/tools/testing/selftests/cgroup/test_zswap.c
index 190096017f80..cfaa94e0a175 100644
--- a/tools/testing/selftests/cgroup/test_zswap.c
+++ b/tools/testing/selftests/cgroup/test_zswap.c
@@ -1,6 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#define _GNU_SOURCE
-
#include <linux/limits.h>
#include <unistd.h>
#include <stdio.h>
--
2.45.0.118.g7fe29c98d7-goog
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v4 11/66] selftests/damon: Drop define _GNU_SOURCE
[not found] <20240510000842.410729-1-edliaw@google.com>
2024-05-10 0:06 ` [PATCH v4 06/66] selftests/cachestat: Drop define _GNU_SOURCE Edward Liaw
2024-05-10 0:06 ` [PATCH v4 08/66] selftests/cgroup: " Edward Liaw
@ 2024-05-10 0:06 ` Edward Liaw
2024-05-10 0:06 ` [PATCH v4 13/66] selftests/exec: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-10 0:06 ` [PATCH v4 30/66] selftests/mm: Drop define _GNU_SOURCE Edward Liaw
4 siblings, 0 replies; 13+ messages in thread
From: Edward Liaw @ 2024-05-10 0:06 UTC (permalink / raw)
To: shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, SeongJae Park
Cc: linux-kernel, linux-kselftest, kernel-team, Edward Liaw,
linux-security-module, netdev, linux-riscv, bpf, damon, linux-mm
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
redefinition warnings.
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Edward Liaw <edliaw@google.com>
---
tools/testing/selftests/damon/debugfs_target_ids_pid_leak.c | 2 --
.../damon/debugfs_target_ids_read_before_terminate_race.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/tools/testing/selftests/damon/debugfs_target_ids_pid_leak.c b/tools/testing/selftests/damon/debugfs_target_ids_pid_leak.c
index 0cc2eef7d142..3f0dd30f61ef 100644
--- a/tools/testing/selftests/damon/debugfs_target_ids_pid_leak.c
+++ b/tools/testing/selftests/damon/debugfs_target_ids_pid_leak.c
@@ -3,8 +3,6 @@
* Author: SeongJae Park <sj@kernel.org>
*/
-#define _GNU_SOURCE
-
#include <fcntl.h>
#include <stdbool.h>
#include <stdint.h>
diff --git a/tools/testing/selftests/damon/debugfs_target_ids_read_before_terminate_race.c b/tools/testing/selftests/damon/debugfs_target_ids_read_before_terminate_race.c
index b06f52a8ce2d..611396076420 100644
--- a/tools/testing/selftests/damon/debugfs_target_ids_read_before_terminate_race.c
+++ b/tools/testing/selftests/damon/debugfs_target_ids_read_before_terminate_race.c
@@ -2,7 +2,6 @@
/*
* Author: SeongJae Park <sj@kernel.org>
*/
-#define _GNU_SOURCE
#include <fcntl.h>
#include <stdbool.h>
--
2.45.0.118.g7fe29c98d7-goog
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v4 13/66] selftests/exec: Drop duplicate -D_GNU_SOURCE
[not found] <20240510000842.410729-1-edliaw@google.com>
` (2 preceding siblings ...)
2024-05-10 0:06 ` [PATCH v4 11/66] selftests/damon: " Edward Liaw
@ 2024-05-10 0:06 ` Edward Liaw
2024-05-10 17:44 ` Kees Cook
2024-05-10 0:06 ` [PATCH v4 30/66] selftests/mm: Drop define _GNU_SOURCE Edward Liaw
4 siblings, 1 reply; 13+ messages in thread
From: Edward Liaw @ 2024-05-10 0:06 UTC (permalink / raw)
To: shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, Eric Biederman, Kees Cook
Cc: linux-kernel, linux-kselftest, kernel-team, Edward Liaw,
linux-security-module, netdev, linux-riscv, bpf, linux-mm
-D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk.
Signed-off-by: Edward Liaw <edliaw@google.com>
---
tools/testing/selftests/exec/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
index fb4472ddffd8..c5bdb653422b 100644
--- a/tools/testing/selftests/exec/Makefile
+++ b/tools/testing/selftests/exec/Makefile
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
CFLAGS = -Wall
CFLAGS += -Wno-nonnull
-CFLAGS += -D_GNU_SOURCE
TEST_PROGS := binfmt_script.py
TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216 non-regular
--
2.45.0.118.g7fe29c98d7-goog
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v4 30/66] selftests/mm: Drop define _GNU_SOURCE
[not found] <20240510000842.410729-1-edliaw@google.com>
` (3 preceding siblings ...)
2024-05-10 0:06 ` [PATCH v4 13/66] selftests/exec: Drop duplicate -D_GNU_SOURCE Edward Liaw
@ 2024-05-10 0:06 ` Edward Liaw
4 siblings, 0 replies; 13+ messages in thread
From: Edward Liaw @ 2024-05-10 0:06 UTC (permalink / raw)
To: shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, Andrew Morton
Cc: linux-kernel, linux-kselftest, kernel-team, Edward Liaw,
linux-security-module, netdev, linux-riscv, bpf, linux-mm
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
redefinition warnings.
Signed-off-by: Edward Liaw <edliaw@google.com>
---
tools/testing/selftests/mm/cow.c | 1 -
tools/testing/selftests/mm/gup_longterm.c | 1 -
tools/testing/selftests/mm/hugepage-mmap.c | 1 -
tools/testing/selftests/mm/hugepage-mremap.c | 2 --
tools/testing/selftests/mm/hugetlb-madvise.c | 2 --
tools/testing/selftests/mm/hugetlb-read-hwpoison.c | 2 --
tools/testing/selftests/mm/khugepaged.c | 1 -
tools/testing/selftests/mm/ksm_functional_tests.c | 1 -
tools/testing/selftests/mm/madv_populate.c | 1 -
tools/testing/selftests/mm/map_populate.c | 2 --
tools/testing/selftests/mm/mdwe_test.c | 1 -
tools/testing/selftests/mm/memfd_secret.c | 2 --
tools/testing/selftests/mm/mlock2-tests.c | 1 -
tools/testing/selftests/mm/mrelease_test.c | 1 -
tools/testing/selftests/mm/mremap_dontunmap.c | 1 -
tools/testing/selftests/mm/mremap_test.c | 2 --
tools/testing/selftests/mm/mseal_test.c | 1 -
tools/testing/selftests/mm/pagemap_ioctl.c | 1 -
tools/testing/selftests/mm/pkey-helpers.h | 1 -
tools/testing/selftests/mm/protection_keys.c | 1 -
tools/testing/selftests/mm/seal_elf.c | 1 -
tools/testing/selftests/mm/split_huge_page_test.c | 2 --
tools/testing/selftests/mm/thuge-gen.c | 2 --
tools/testing/selftests/mm/uffd-common.h | 1 -
24 files changed, 32 deletions(-)
diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c
index 32c6ccc2a6be..8747ffef200f 100644
--- a/tools/testing/selftests/mm/cow.c
+++ b/tools/testing/selftests/mm/cow.c
@@ -6,7 +6,6 @@
*
* Author(s): David Hildenbrand <david@redhat.com>
*/
-#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c
index 9423ad439a61..53c257f6159c 100644
--- a/tools/testing/selftests/mm/gup_longterm.c
+++ b/tools/testing/selftests/mm/gup_longterm.c
@@ -6,7 +6,6 @@
*
* Author(s): David Hildenbrand <david@redhat.com>
*/
-#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
diff --git a/tools/testing/selftests/mm/hugepage-mmap.c b/tools/testing/selftests/mm/hugepage-mmap.c
index 267eea2e0e0b..edb46888222f 100644
--- a/tools/testing/selftests/mm/hugepage-mmap.c
+++ b/tools/testing/selftests/mm/hugepage-mmap.c
@@ -16,7 +16,6 @@
* range.
* Other architectures, such as ppc64, i386 or x86_64 are not so constrained.
*/
-#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
diff --git a/tools/testing/selftests/mm/hugepage-mremap.c b/tools/testing/selftests/mm/hugepage-mremap.c
index c463d1c09c9b..8e22822bb754 100644
--- a/tools/testing/selftests/mm/hugepage-mremap.c
+++ b/tools/testing/selftests/mm/hugepage-mremap.c
@@ -11,8 +11,6 @@
* To make sure the test triggers pmd sharing and goes through the 'unshare'
* path in the mremap code use 1GB (1024) or more.
*/
-
-#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
diff --git a/tools/testing/selftests/mm/hugetlb-madvise.c b/tools/testing/selftests/mm/hugetlb-madvise.c
index e74107185324..70c40c67bc5d 100644
--- a/tools/testing/selftests/mm/hugetlb-madvise.c
+++ b/tools/testing/selftests/mm/hugetlb-madvise.c
@@ -11,8 +11,6 @@
* filesystem. Therefore, a hugetlbfs filesystem must be mounted on some
* directory.
*/
-
-#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
diff --git a/tools/testing/selftests/mm/hugetlb-read-hwpoison.c b/tools/testing/selftests/mm/hugetlb-read-hwpoison.c
index ba6cc6f9cabc..6b8b41b4f754 100644
--- a/tools/testing/selftests/mm/hugetlb-read-hwpoison.c
+++ b/tools/testing/selftests/mm/hugetlb-read-hwpoison.c
@@ -1,6 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-
-#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c
index 829320a519e7..d18bf400dae6 100644
--- a/tools/testing/selftests/mm/khugepaged.c
+++ b/tools/testing/selftests/mm/khugepaged.c
@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/tools/testing/selftests/mm/ksm_functional_tests.c b/tools/testing/selftests/mm/ksm_functional_tests.c
index 37de82da9be7..b0af40ddb0fb 100644
--- a/tools/testing/selftests/mm/ksm_functional_tests.c
+++ b/tools/testing/selftests/mm/ksm_functional_tests.c
@@ -6,7 +6,6 @@
*
* Author(s): David Hildenbrand <david@redhat.com>
*/
-#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
diff --git a/tools/testing/selftests/mm/madv_populate.c b/tools/testing/selftests/mm/madv_populate.c
index ef7d911da13e..f2c8223ff3d4 100644
--- a/tools/testing/selftests/mm/madv_populate.c
+++ b/tools/testing/selftests/mm/madv_populate.c
@@ -6,7 +6,6 @@
*
* Author(s): David Hildenbrand <david@redhat.com>
*/
-#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
diff --git a/tools/testing/selftests/mm/map_populate.c b/tools/testing/selftests/mm/map_populate.c
index 5c8a53869b1b..ff4d4079bd0e 100644
--- a/tools/testing/selftests/mm/map_populate.c
+++ b/tools/testing/selftests/mm/map_populate.c
@@ -4,8 +4,6 @@
*
* MAP_POPULATE | MAP_PRIVATE should COW VMA pages.
*/
-
-#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <sys/mman.h>
diff --git a/tools/testing/selftests/mm/mdwe_test.c b/tools/testing/selftests/mm/mdwe_test.c
index 1e01d3ddc11c..200bedcdc32e 100644
--- a/tools/testing/selftests/mm/mdwe_test.c
+++ b/tools/testing/selftests/mm/mdwe_test.c
@@ -7,7 +7,6 @@
#include <linux/mman.h>
#include <linux/prctl.h>
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <sys/auxv.h>
diff --git a/tools/testing/selftests/mm/memfd_secret.c b/tools/testing/selftests/mm/memfd_secret.c
index 9a0597310a76..0ba721d45d35 100644
--- a/tools/testing/selftests/mm/memfd_secret.c
+++ b/tools/testing/selftests/mm/memfd_secret.c
@@ -4,8 +4,6 @@
*
* Author: Mike Rapoport <rppt@linux.ibm.com>
*/
-
-#define _GNU_SOURCE
#include <sys/uio.h>
#include <sys/mman.h>
#include <sys/wait.h>
diff --git a/tools/testing/selftests/mm/mlock2-tests.c b/tools/testing/selftests/mm/mlock2-tests.c
index 7f0d50fa361d..99dc39bf2fec 100644
--- a/tools/testing/selftests/mm/mlock2-tests.c
+++ b/tools/testing/selftests/mm/mlock2-tests.c
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#define _GNU_SOURCE
#include <sys/mman.h>
#include <stdint.h>
#include <unistd.h>
diff --git a/tools/testing/selftests/mm/mrelease_test.c b/tools/testing/selftests/mm/mrelease_test.c
index 100370a7111d..d78bf686e99f 100644
--- a/tools/testing/selftests/mm/mrelease_test.c
+++ b/tools/testing/selftests/mm/mrelease_test.c
@@ -2,7 +2,6 @@
/*
* Copyright 2022 Google LLC
*/
-#define _GNU_SOURCE
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
diff --git a/tools/testing/selftests/mm/mremap_dontunmap.c b/tools/testing/selftests/mm/mremap_dontunmap.c
index 1d75084b9ca5..934fa6b441b2 100644
--- a/tools/testing/selftests/mm/mremap_dontunmap.c
+++ b/tools/testing/selftests/mm/mremap_dontunmap.c
@@ -5,7 +5,6 @@
*
* Copyright 2020, Brian Geffon <bgeffon@google.com>
*/
-#define _GNU_SOURCE
#include <sys/mman.h>
#include <linux/mman.h>
#include <errno.h>
diff --git a/tools/testing/selftests/mm/mremap_test.c b/tools/testing/selftests/mm/mremap_test.c
index 1b03bcfaefdf..0d8dc16b63be 100644
--- a/tools/testing/selftests/mm/mremap_test.c
+++ b/tools/testing/selftests/mm/mremap_test.c
@@ -2,8 +2,6 @@
/*
* Copyright 2020 Google LLC
*/
-#define _GNU_SOURCE
-
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c
index 41998cf1dcf5..d35ee37311a7 100644
--- a/tools/testing/selftests/mm/mseal_test.c
+++ b/tools/testing/selftests/mm/mseal_test.c
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#define _GNU_SOURCE
#include <linux/mman.h>
#include <sys/mman.h>
#include <stdint.h>
diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c b/tools/testing/selftests/mm/pagemap_ioctl.c
index 2d785aca72a5..50d6bfc8db05 100644
--- a/tools/testing/selftests/mm/pagemap_ioctl.c
+++ b/tools/testing/selftests/mm/pagemap_ioctl.c
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#define _GNU_SOURCE
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
diff --git a/tools/testing/selftests/mm/pkey-helpers.h b/tools/testing/selftests/mm/pkey-helpers.h
index 1af3156a9db8..37d6b01ce90a 100644
--- a/tools/testing/selftests/mm/pkey-helpers.h
+++ b/tools/testing/selftests/mm/pkey-helpers.h
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _PKEYS_HELPER_H
#define _PKEYS_HELPER_H
-#define _GNU_SOURCE
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
diff --git a/tools/testing/selftests/mm/protection_keys.c b/tools/testing/selftests/mm/protection_keys.c
index 48dc151f8fca..9f7de92caeda 100644
--- a/tools/testing/selftests/mm/protection_keys.c
+++ b/tools/testing/selftests/mm/protection_keys.c
@@ -21,7 +21,6 @@
* gcc -mxsave -o protection_keys -O2 -g -std=gnu99 -pthread -Wall protection_keys.c -lrt -ldl -lm
* gcc -mxsave -m32 -o protection_keys_32 -O2 -g -std=gnu99 -pthread -Wall protection_keys.c -lrt -ldl -lm
*/
-#define _GNU_SOURCE
#define __SANE_USERSPACE_TYPES__
#include <errno.h>
#include <linux/elf.h>
diff --git a/tools/testing/selftests/mm/seal_elf.c b/tools/testing/selftests/mm/seal_elf.c
index f2babec79bb6..0438695bc45a 100644
--- a/tools/testing/selftests/mm/seal_elf.c
+++ b/tools/testing/selftests/mm/seal_elf.c
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#define _GNU_SOURCE
#include <sys/mman.h>
#include <stdint.h>
#include <unistd.h>
diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/selftests/mm/split_huge_page_test.c
index d3c7f5fb3e7b..ae6ac950d7a1 100644
--- a/tools/testing/selftests/mm/split_huge_page_test.c
+++ b/tools/testing/selftests/mm/split_huge_page_test.c
@@ -3,8 +3,6 @@
* A test of splitting PMD THPs and PTE-mapped THPs from a specified virtual
* address range in a process via <debugfs>/split_huge_pages interface.
*/
-
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
diff --git a/tools/testing/selftests/mm/thuge-gen.c b/tools/testing/selftests/mm/thuge-gen.c
index ea7fd8fe2876..28a5c31bd791 100644
--- a/tools/testing/selftests/mm/thuge-gen.c
+++ b/tools/testing/selftests/mm/thuge-gen.c
@@ -12,8 +12,6 @@
ipcrm -m by hand, like this
sudo ipcs | awk '$1 == "0x00000000" {print $2}' | xargs -n1 sudo ipcrm -m
(warning this will remove all if someone else uses them) */
-
-#define _GNU_SOURCE 1
#include <sys/mman.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/tools/testing/selftests/mm/uffd-common.h b/tools/testing/selftests/mm/uffd-common.h
index cc5629c3d2aa..abb44319264a 100644
--- a/tools/testing/selftests/mm/uffd-common.h
+++ b/tools/testing/selftests/mm/uffd-common.h
@@ -7,7 +7,6 @@
#ifndef __UFFD_COMMON_H__
#define __UFFD_COMMON_H__
-#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
--
2.45.0.118.g7fe29c98d7-goog
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v4 13/66] selftests/exec: Drop duplicate -D_GNU_SOURCE
2024-05-10 0:06 ` [PATCH v4 13/66] selftests/exec: Drop duplicate -D_GNU_SOURCE Edward Liaw
@ 2024-05-10 17:44 ` Kees Cook
0 siblings, 0 replies; 13+ messages in thread
From: Kees Cook @ 2024-05-10 17:44 UTC (permalink / raw)
To: Edward Liaw
Cc: shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, Eric Biederman, linux-kernel, linux-kselftest,
kernel-team, linux-security-module, netdev, linux-riscv, bpf,
linux-mm
On Fri, May 10, 2024 at 12:06:30AM +0000, Edward Liaw wrote:
> -D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk.
>
> Signed-off-by: Edward Liaw <edliaw@google.com>
Thanks!
Acked-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v4 08/66] selftests/cgroup: Drop define _GNU_SOURCE
2024-05-10 0:06 ` [PATCH v4 08/66] selftests/cgroup: " Edward Liaw
@ 2024-05-13 17:02 ` Tejun Heo
2024-05-16 15:50 ` Shuah Khan
0 siblings, 1 reply; 13+ messages in thread
From: Tejun Heo @ 2024-05-13 17:02 UTC (permalink / raw)
To: Edward Liaw
Cc: shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, Zefan Li, Johannes Weiner, Muchun Song,
Michal Hocko, Roman Gushchin, Shakeel Butt, Yosry Ahmed,
Nhat Pham, Chengming Zhou, linux-kernel, linux-kselftest,
kernel-team, linux-security-module, netdev, linux-riscv, bpf,
cgroups, linux-mm
On Fri, May 10, 2024 at 12:06:25AM +0000, Edward Liaw wrote:
> _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
> redefinition warnings.
>
> Signed-off-by: Edward Liaw <edliaw@google.com>
Applied to cgroup/for-6.10.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v4 08/66] selftests/cgroup: Drop define _GNU_SOURCE
2024-05-13 17:02 ` Tejun Heo
@ 2024-05-16 15:50 ` Shuah Khan
2024-05-16 16:21 ` Tejun Heo
0 siblings, 1 reply; 13+ messages in thread
From: Shuah Khan @ 2024-05-16 15:50 UTC (permalink / raw)
To: Tejun Heo, Edward Liaw
Cc: shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, Zefan Li, Johannes Weiner, Muchun Song,
Michal Hocko, Roman Gushchin, Shakeel Butt, Yosry Ahmed,
Nhat Pham, Chengming Zhou, linux-kernel, linux-kselftest,
kernel-team, linux-security-module, netdev, linux-riscv, bpf,
cgroups, linux-mm, Shuah Khan, Linus Torvalds
On 5/13/24 11:02, Tejun Heo wrote:
> On Fri, May 10, 2024 at 12:06:25AM +0000, Edward Liaw wrote:
>> _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
>> redefinition warnings.
>>
>> Signed-off-by: Edward Liaw <edliaw@google.com>
>
> Applied to cgroup/for-6.10.
>
> Thanks.
>
Hi Tejun,
Please don't include this in your PR to Linus. This patch series needs
to go together as it is causing several build warns and some errors.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v4 08/66] selftests/cgroup: Drop define _GNU_SOURCE
2024-05-16 15:50 ` Shuah Khan
@ 2024-05-16 16:21 ` Tejun Heo
2024-05-16 16:31 ` Shuah Khan
0 siblings, 1 reply; 13+ messages in thread
From: Tejun Heo @ 2024-05-16 16:21 UTC (permalink / raw)
To: Shuah Khan
Cc: Edward Liaw, shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, Zefan Li, Johannes Weiner, Muchun Song,
Michal Hocko, Roman Gushchin, Shakeel Butt, Yosry Ahmed,
Nhat Pham, Chengming Zhou, linux-kernel, linux-kselftest,
kernel-team, linux-security-module, netdev, linux-riscv, bpf,
cgroups, linux-mm, Linus Torvalds
On Thu, May 16, 2024 at 09:50:06AM -0600, Shuah Khan wrote:
> On 5/13/24 11:02, Tejun Heo wrote:
> > On Fri, May 10, 2024 at 12:06:25AM +0000, Edward Liaw wrote:
> > > _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
> > > redefinition warnings.
> > >
> > > Signed-off-by: Edward Liaw <edliaw@google.com>
> >
> > Applied to cgroup/for-6.10.
> >
> > Thanks.
> >
>
> Hi Tejun,
>
> Please don't include this in your PR to Linus. This patch series needs
> to go together as it is causing several build warns and some errors.
I'm afraid it's too late. The PR is too late. Do you want me to send an
amended PR with the commit reverted? If it's just temporary issues in
selftests, maybe we can just wait it out?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v4 08/66] selftests/cgroup: Drop define _GNU_SOURCE
2024-05-16 16:21 ` Tejun Heo
@ 2024-05-16 16:31 ` Shuah Khan
2024-05-16 17:45 ` Tejun Heo
0 siblings, 1 reply; 13+ messages in thread
From: Shuah Khan @ 2024-05-16 16:31 UTC (permalink / raw)
To: Tejun Heo
Cc: Edward Liaw, shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, Zefan Li, Johannes Weiner, Muchun Song,
Michal Hocko, Roman Gushchin, Shakeel Butt, Yosry Ahmed,
Nhat Pham, Chengming Zhou, linux-kernel, linux-kselftest,
kernel-team, linux-security-module, netdev, linux-riscv, bpf,
cgroups, linux-mm, Linus Torvalds, Shuah Khan
On 5/16/24 10:21, Tejun Heo wrote:
> On Thu, May 16, 2024 at 09:50:06AM -0600, Shuah Khan wrote:
>> On 5/13/24 11:02, Tejun Heo wrote:
>>> On Fri, May 10, 2024 at 12:06:25AM +0000, Edward Liaw wrote:
>>>> _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
>>>> redefinition warnings.
>>>>
>>>> Signed-off-by: Edward Liaw <edliaw@google.com>
>>>
>>> Applied to cgroup/for-6.10.
>>>
>>> Thanks.
>>>
>>
>> Hi Tejun,
>>
>> Please don't include this in your PR to Linus. This patch series needs
>> to go together as it is causing several build warns and some errors.
>
> I'm afraid it's too late. The PR is too late. Do you want me to send an
> amended PR with the commit reverted? If it's just temporary issues in
> selftests, maybe we can just wait it out?
>
I am exploring options and leaning towards reverting the patch
daef47b89efd ("selftests: Compile kselftest headers with -D_GNU_SOURCE")
Your amending the PR helps me if I have to send revert. I am sorry
for the trouble.
I can all of them together in a second update or after the merge window
closes.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v4 08/66] selftests/cgroup: Drop define _GNU_SOURCE
2024-05-16 16:31 ` Shuah Khan
@ 2024-05-16 17:45 ` Tejun Heo
2024-05-16 18:05 ` Shuah Khan
0 siblings, 1 reply; 13+ messages in thread
From: Tejun Heo @ 2024-05-16 17:45 UTC (permalink / raw)
To: Shuah Khan
Cc: Edward Liaw, shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, Zefan Li, Johannes Weiner, Muchun Song,
Michal Hocko, Roman Gushchin, Shakeel Butt, Yosry Ahmed,
Nhat Pham, Chengming Zhou, linux-kernel, linux-kselftest,
kernel-team, linux-security-module, netdev, linux-riscv, bpf,
cgroups, linux-mm, Linus Torvalds
Hello,
On Thu, May 16, 2024 at 10:31:13AM -0600, Shuah Khan wrote:
> I am exploring options and leaning towards reverting the patch
>
> daef47b89efd ("selftests: Compile kselftest headers with -D_GNU_SOURCE")
>
> Your amending the PR helps me if I have to send revert. I am sorry
> for the trouble.
>
> I can all of them together in a second update or after the merge window
> closes.
The cgroup commit is already pulled in unfortunately. Can you please handle
the revert and whatever's necessary to fix up the situation? I'll ask you
what to do with selftest patches from now on.
Thank you.
--
tejun
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v4 08/66] selftests/cgroup: Drop define _GNU_SOURCE
2024-05-16 17:45 ` Tejun Heo
@ 2024-05-16 18:05 ` Shuah Khan
2024-05-17 3:47 ` Shuah Khan
0 siblings, 1 reply; 13+ messages in thread
From: Shuah Khan @ 2024-05-16 18:05 UTC (permalink / raw)
To: Tejun Heo
Cc: Edward Liaw, shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, Zefan Li, Johannes Weiner, Muchun Song,
Michal Hocko, Roman Gushchin, Shakeel Butt, Yosry Ahmed,
Nhat Pham, Chengming Zhou, linux-kernel, linux-kselftest,
kernel-team, linux-security-module, netdev, linux-riscv, bpf,
cgroups, linux-mm, Linus Torvalds, Shuah Khan
On 5/16/24 11:45, Tejun Heo wrote:
> Hello,
>
> On Thu, May 16, 2024 at 10:31:13AM -0600, Shuah Khan wrote:
>> I am exploring options and leaning towards reverting the patch
>>
>> daef47b89efd ("selftests: Compile kselftest headers with -D_GNU_SOURCE")
>>
>> Your amending the PR helps me if I have to send revert. I am sorry
>> for the trouble.
>>
>> I can all of them together in a second update or after the merge window
>> closes.
>
> The cgroup commit is already pulled in unfortunately. Can you please handle
> the revert and whatever's necessary to fix up the situation? I'll ask you
> what to do with selftest patches from now on.
>
Thanks for the update. Yes I am working on fixing the situation and
will send revert for cgroup test patch as well if necessary.
No worries. It is not a problem for you to handle cgroup test patches
in general. I will need your review anyway and letting you handle them
reduces the overhead.
This kind of framework change causes needs to be coordinated.
I should have held back on the framework change on my part.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v4 08/66] selftests/cgroup: Drop define _GNU_SOURCE
2024-05-16 18:05 ` Shuah Khan
@ 2024-05-17 3:47 ` Shuah Khan
0 siblings, 0 replies; 13+ messages in thread
From: Shuah Khan @ 2024-05-17 3:47 UTC (permalink / raw)
To: Tejun Heo
Cc: Edward Liaw, shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend, Zefan Li, Johannes Weiner, Muchun Song,
Michal Hocko, Roman Gushchin, Shakeel Butt, Yosry Ahmed,
Nhat Pham, Chengming Zhou, linux-kernel, linux-kselftest,
kernel-team, linux-security-module, netdev, linux-riscv, bpf,
cgroups, linux-mm, Linus Torvalds, Shuah Khan
On 5/16/24 12:05, Shuah Khan wrote:
> On 5/16/24 11:45, Tejun Heo wrote:
>> Hello,
>>
>> On Thu, May 16, 2024 at 10:31:13AM -0600, Shuah Khan wrote:
>>> I am exploring options and leaning towards reverting the patch
>>>
>>> daef47b89efd ("selftests: Compile kselftest headers with -D_GNU_SOURCE")
>>>
>>> Your amending the PR helps me if I have to send revert. I am sorry
>>> for the trouble.
>>>
>>> I can all of them together in a second update or after the merge window
>>> closes.
>>
>> The cgroup commit is already pulled in unfortunately. Can you please handle
>> the revert and whatever's necessary to fix up the situation? I'll ask you
>> what to do with selftest patches from now on.
>>
>
> Thanks for the update. Yes I am working on fixing the situation and
> will send revert for cgroup test patch as well if necessary.
>
> No worries. It is not a problem for you to handle cgroup test patches
> in general. I will need your review anyway and letting you handle them
> reduces the overhead.
>
> This kind of framework change causes needs to be coordinated.
> I should have held back on the framework change on my part.
>
As mentioned in the other thread
https://lore.kernel.org/linux-kselftest/24975952-b1fa-44a5-bac5-aef538ad0c09@linuxfoundation.org/T/#t
I reverted the following patch and the framework change patch.
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/log/?h=next
Will send PR to Linus this weekend.
"selftests/cgroup: Drop define _GNU_SOURCE"
commit c1457d9aad5ee2feafcf85aa9a58ab50500159d2
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-05-17 3:47 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20240510000842.410729-1-edliaw@google.com>
2024-05-10 0:06 ` [PATCH v4 06/66] selftests/cachestat: Drop define _GNU_SOURCE Edward Liaw
2024-05-10 0:06 ` [PATCH v4 08/66] selftests/cgroup: " Edward Liaw
2024-05-13 17:02 ` Tejun Heo
2024-05-16 15:50 ` Shuah Khan
2024-05-16 16:21 ` Tejun Heo
2024-05-16 16:31 ` Shuah Khan
2024-05-16 17:45 ` Tejun Heo
2024-05-16 18:05 ` Shuah Khan
2024-05-17 3:47 ` Shuah Khan
2024-05-10 0:06 ` [PATCH v4 11/66] selftests/damon: " Edward Liaw
2024-05-10 0:06 ` [PATCH v4 13/66] selftests/exec: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-10 17:44 ` Kees Cook
2024-05-10 0:06 ` [PATCH v4 30/66] selftests/mm: Drop define _GNU_SOURCE Edward Liaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox