Hi Greg, Yes, looks we only need this for linux-6.12.y. Maybe we could use the v1 version which does not include the linux-6.13.y tag. Or I can send a v3 with the linux-6.12.y only. Thank you Yifei
> On Feb 5, 2025, at 4:14 AM, Greg KH <[email protected]> wrote: > > On Tue, Feb 04, 2025 at 01:47:23PM -0800, Yifei Liu wrote: >> From: Kevin Brodsky <[email protected]> >> >> [ Upstream commit 46036188ea1f5266df23a6149dea0df1c77cd1c7 ] >> >> The mm kselftests are currently built with no optimisation (-O0). It's >> unclear why, and besides being obviously suboptimal, this also prevents >> the pkeys tests from working as intended. Let's build all the tests with >> -O2. >> >> [[email protected]: silence unused-result warnings] >> Link: >> https://urldefense.com/v3/__https://lkml.kernel.org/r/[email protected]__;!!ACWV5N9M2RV99hQ!JIxpb3_RVcibhnrztlfGaVeRUIlL7ftDa-hoIMVYb3IzJShJ_6Bqq0qNo_-LIwFSbbFw_UgU3BY0$ >> >> Link: >> https://urldefense.com/v3/__https://lkml.kernel.org/r/[email protected]__;!!ACWV5N9M2RV99hQ!JIxpb3_RVcibhnrztlfGaVeRUIlL7ftDa-hoIMVYb3IzJShJ_6Bqq0qNo_-LIwFSbbFw_cKwGHfl$ >> >> Signed-off-by: Kevin Brodsky <[email protected]> >> Cc: Aruna Ramakrishna <[email protected]> >> Cc: Catalin Marinas <[email protected]> >> Cc: Dave Hansen <[email protected]> >> Cc: Joey Gouly <[email protected]> >> Cc: Keith Lucas <[email protected]> >> Cc: Ryan Roberts <[email protected]> >> Cc: Shuah Khan <[email protected]> >> Signed-off-by: Andrew Morton <[email protected]> >> (cherry picked from commit 46036188ea1f5266df23a6149dea0df1c77cd1c7) >> [Yifei: This commit also fix the failure of pkey_sighandler_tests_64, >> which is also in linux-6.12.y and linux-6.13.y, thus backport this commit] >> Signed-off-by: Yifei Liu <[email protected]> >> --- >> tools/testing/selftests/mm/Makefile | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) >> >> diff --git a/tools/testing/selftests/mm/Makefile >> b/tools/testing/selftests/mm/Makefile >> index 02e1204971b0..c0138cb19705 100644 >> --- a/tools/testing/selftests/mm/Makefile >> +++ b/tools/testing/selftests/mm/Makefile >> @@ -33,9 +33,16 @@ endif >> # LDLIBS. >> MAKEFLAGS += --no-builtin-rules >> >> -CFLAGS = -Wall -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) >> $(TOOLS_INCLUDES) >> +CFLAGS = -Wall -O2 -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) >> $(TOOLS_INCLUDES) >> LDLIBS = -lrt -lpthread -lm >> >> +# Some distributions (such as Ubuntu) configure GCC so that _FORTIFY_SOURCE >> is >> +# automatically enabled at -O1 or above. This triggers various unused-result >> +# warnings where functions such as read() or write() are called and their >> +# return value is not checked. Disable _FORTIFY_SOURCE to silence those >> +# warnings. >> +CFLAGS += -U_FORTIFY_SOURCE >> + >> TEST_GEN_FILES = cow >> TEST_GEN_FILES += compaction_test >> TEST_GEN_FILES += gup_longterm > > This does not apply to 6.13 :( >
