From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5463F25B0B3; Sat, 30 May 2026 18:27:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780165678; cv=none; b=QLeTie6i9mucoYx4j9RBQri0GVuN1JW8vGhXj8ucF9AYEnVFO9Lm08xYgjlD/3UGgeReX0xbb2jWrPCuSPqoju5CvO4mygNqIY3DkSdLl6w41pQ/YEEiVM0r/fUOW1IEDrNfuzySasIWKm/aqksElWOnAL3FNukjat55xdwzQAU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780165678; c=relaxed/simple; bh=kRjvHqzyjvVqfdQc/ReDX7KvRoA+KCjilkfpZaSU7N4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LO8/XF+CUPoadxf6wU5C+hGi+eqXc7wYSHg2kqH0owjDzDABnups9ExLADU/UWhFuu8hQCnUsGiyJ6Y7vQ2xBr0Dwqy081YoULHP6yjCkm/ceos5EcVVsi6ao2OtKG5synpzhgYP+EayTDqnInQ1jJ9JqKckygylWJ7r48cTL9o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=X4age79k; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="X4age79k" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92FA61F00893; Sat, 30 May 2026 18:27:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780165677; bh=jknEXlq4IFOvOUofzg428f1N0+ESSniuYsAMxcw3H88=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=X4age79kqOfDAw7LY+qmv1wzjlnCOM9YeF31hfJITOfj7c2SHKk3zH1GLly7uZkO+ ORqKox1nLncjdH1Uj+nd09aTVb8BVsJL17lNdBu7gunnhgDMCXHPE1UkDuxNlq0M2D EY+Jc8FVpDGXn5YTZthHciKBwyGgO7KYrRuhL1z8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Johannes Berg , Michael Bommarito , Johannes Berg Subject: [PATCH 5.10 150/589] um: drivers: call kernel_strrchr() explicitly in cow_user.c Date: Sat, 30 May 2026 18:00:31 +0200 Message-ID: <20260530160228.729037081@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260530160224.570625122@linuxfoundation.org> References: <20260530160224.570625122@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Bommarito commit 91e901c65b4da02a6fd543e3f0049829ae9645b7 upstream. Building ARCH=um on glibc >= 2.43 fails: arch/um/drivers/cow_user.c: error: implicit declaration of function 'strrchr' [-Wimplicit-function-declaration] glibc 2.43's C23 const-preserving strrchr() macro does not survive UML's global -Dstrrchr=kernel_strrchr remap from arch/um/Makefile. Call kernel_strrchr() directly in cow_user.c so the source no longer depends on the -D rewrite. Fixes: 2c51a4bc0233 ("um: fix strrchr() problems") Suggested-by: Johannes Berg Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-4-6 Assisted-by: Codex:gpt-5-4 Signed-off-by: Michael Bommarito Link: https://patch.msgid.link/20260408070102.2325572-1-michael.bommarito@gmail.com [remove unnecessary 'extern'] Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- arch/um/drivers/cow_user.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/arch/um/drivers/cow_user.c +++ b/arch/um/drivers/cow_user.c @@ -15,6 +15,12 @@ #include "cow.h" #include "cow_sys.h" +/* + * arch/um/Makefile remaps strrchr to kernel_strrchr; call the kernel + * name directly to avoid glibc >= 2.43's C23 strrchr macro. + */ +char *kernel_strrchr(const char *, int); + #define PATH_LEN_V1 256 /* unsigned time_t works until year 2106 */ @@ -153,7 +159,7 @@ static int absolutize(char *to, int size errno); return -1; } - slash = strrchr(from, '/'); + slash = kernel_strrchr(from, '/'); if (slash != NULL) { *slash = '\0'; if (chdir(from)) {