From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 08BE2305669; Fri, 15 May 2026 15:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778860759; cv=none; b=eSqkC30LPgO6GBeXy+VGFFC7FksvLni1TBiWwSp68Yj1ptBweiYQKo+wEmtTN4/+JterkzY6NyWf4wRCARff6YYONKBdogtbaNvFWnkYwBqF+OLWTpef6qMqHtmX6zOL5bXBqKprXKL4T7jT7vI66AG6aTcTCPGUYhJD7nefsio= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778860759; c=relaxed/simple; bh=okFSNRxOh2UOLW+G8pIya3ecyl33rs63bN7g4Tu5Al8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KTxn082cbwBYXy+aYW8vxEI7DN9ExGPHnD9kYfvmJ6ZHtwgaA+ulWqr//qnBPqQEpbbzPO8FLyu5P4ABoOJ9TBNNC4sbH24nrxVMmQDI0t9yFbZ39guvCu+bZTUO6AQcxtnHE5xpfYTsEdlYWQUV/U9jOUSmhwJOi23VkzvI69w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=a8DLCcKR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="a8DLCcKR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 935AFC2BCB3; Fri, 15 May 2026 15:59:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778860758; bh=okFSNRxOh2UOLW+G8pIya3ecyl33rs63bN7g4Tu5Al8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a8DLCcKRMjuDGRMbN7ZAkBSmb7hFLLokbSvFstbZyi/m7IR/GE/FAxljG3Vzm4+1w 8oBT5A7Kd81nZaYW4eY8LffRSe67RipGY5wv1oEqi4EGJ05M6nZJlOJViSWBeukxW/ HO9DTkpqlopZJ9syHSKskS0RKSlH35j0UqYkAG78= 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 6.6 026/474] um: drivers: call kernel_strrchr() explicitly in cow_user.c Date: Fri, 15 May 2026 17:42:15 +0200 Message-ID: <20260515154715.616584611@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260515154715.053014143@linuxfoundation.org> References: <20260515154715.053014143@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-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)) {