This is a note to let you know that I've just added the patch titled selftests/resctrl: Move _GNU_SOURCE define into Makefile to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: selftests-resctrl-move-_gnu_source-define-into-makefile.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 3a1e4a91aa454a1c589a9824d54179fdbfccde45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@xxxxxxxxxxxxxxx> Date: Mon, 2 Oct 2023 12:48:10 +0300 Subject: selftests/resctrl: Move _GNU_SOURCE define into Makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> commit 3a1e4a91aa454a1c589a9824d54179fdbfccde45 upstream. _GNU_SOURCE is defined in resctrl.h. Defining _GNU_SOURCE has a large impact on what gets defined when including headers either before or after it. This can result in compile failures if .c file decides to include a standard header file before resctrl.h. It is safer to define _GNU_SOURCE in Makefile so it is always defined regardless of in which order includes are done. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> Tested-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx> Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx> Reviewed-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/resctrl/Makefile | 2 +- tools/testing/selftests/resctrl/resctrl.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) --- a/tools/testing/selftests/resctrl/Makefile +++ b/tools/testing/selftests/resctrl/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -CFLAGS = -g -Wall -O2 -D_FORTIFY_SOURCE=2 +CFLAGS = -g -Wall -O2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE CFLAGS += $(KHDR_INCLUDES) TEST_GEN_PROGS := resctrl_tests --- a/tools/testing/selftests/resctrl/resctrl.h +++ b/tools/testing/selftests/resctrl/resctrl.h @@ -1,5 +1,4 @@ /* SPDX-License-Identifier: GPL-2.0 */ -#define _GNU_SOURCE #ifndef RESCTRL_H #define RESCTRL_H #include <stdio.h> Patches currently in stable-queue which might be from ilpo.jarvinen@xxxxxxxxxxxxxxx are queue-6.6/pci-mvebu-use-field_prep-with-link-width.patch queue-6.6/platform-x86-thinkpad_acpi-add-battery-quirk-for-thi.patch queue-6.6/pci-do-error-check-on-own-line-to-split-long-if-cond.patch queue-6.6/selftests-resctrl-reduce-failures-due-to-outliers-in-mba-mbm-tests.patch queue-6.6/media-cobalt-use-field_get-to-extract-link-width.patch queue-6.6/pci-use-field_get-in-sapphire-rx-5600-xt-pulse-quirk.patch queue-6.6/pci-tegra194-use-field_get-field_prep-with-link-widt.patch queue-6.6/atm-iphase-do-pci-error-checks-on-own-line.patch queue-6.6/selftests-resctrl-fix-uninitialized-.sa_flags.patch queue-6.6/pci-use-field_get-to-extract-link-width.patch queue-6.6/selftests-resctrl-fix-feature-checks.patch queue-6.6/selftests-resctrl-move-_gnu_source-define-into-makefile.patch queue-6.6/rdma-hfi1-use-field_get-to-extract-link-width.patch queue-6.6/selftests-resctrl-remove-duplicate-feature-check-from-cmt-test.patch queue-6.6/selftests-resctrl-refactor-feature-check-to-use-resource-and-feature-name.patch