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 31D361CD1F; Mon, 14 Jul 2025 18:45:26 +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=1752518726; cv=none; b=LJMoub09eTyglqMLIGgROsoL1ho//+QZI3Oz/DdJNd+I+gZvfRybhBL3iYMzjN10qbSVGk/Gmx1nkJBfUrvUs2O6boKI7DescuMaB9LRu3URnic/qMitAQb7t1NcTnAmDGlG0CT7C+/DYpUsv8Azl4a3VZmLLzPbZsVajdu/+XA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752518726; c=relaxed/simple; bh=mkpQ3SjUZuzSBpcCMEJAh4f3+IiQc0MR12vYVr0izPA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GymRNzjMNfPTqVV67zCSpsKNmaWu6w52ZCsOWfxszBIKRUgi32jiYoDMqD2mZpO2SZ3VYPTt6ZHBTiJJMs4OLtCuM4K90Kfbe/nDdBXCQHwyPRuiwramVNwaNxnkK+7licNEpW+UxXwZMFlsz6IvwY4VRxSTotaRdXz3zQfKnI4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PMLguTZI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PMLguTZI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDEC0C4CEED; Mon, 14 Jul 2025 18:45:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752518726; bh=mkpQ3SjUZuzSBpcCMEJAh4f3+IiQc0MR12vYVr0izPA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=PMLguTZIfuSAlhRXgxbxdIv6FYa9mnfTGMRZovZMsONUBXMqcjd9l41MANCjz3p9r TnkuyJCXt5XpvDAtCF9Qloreesj56qE51fugmopuait9e6Z22P2FaYnmWCpry2WAfJ NQdUudhGCJS9jJ8S0puifJ3kdUQBBaqzg5Ql65lQ9Cs+hQh1MZSYgUYDhvoqVCgmFo iC+/fWiq/UkM4Qdq12kkbqHfqV8bP/s4o7CPf+s6kYGGpc8wDWwnt+pu+6TJ91sAI4 7ezhxX3IP8YxwUB0omuRJEPDB210Wa2b3wREV3mT6NGtpj7ffwErI0L0BAQJZbJEc7 nwVFZVe0NlP8g== Message-ID: <9618808a-d63b-4eec-b744-471586e270e2@kernel.org> Date: Mon, 14 Jul 2025 19:45:22 +0100 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH bpf-next] bpf: Replace deprecated strcpy() with strscpy() To: Thorsten Blum , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250714182358.238422-1-thorsten.blum@linux.dev> From: Quentin Monnet Content-Language: en-GB In-Reply-To: <20250714182358.238422-1-thorsten.blum@linux.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 2025-07-14 20:23 UTC+0200 ~ Thorsten Blum > strcpy() is deprecated; use strscpy() instead. > > No functional changes intended. > > Link: https://github.com/KSPP/linux/issues/88 > Signed-off-by: Thorsten Blum > --- > kernel/bpf/disasm.c | 2 +- Hi and thank you for the patch, The disassembler file is also part of bpftool's source code [0][1], where it is compiled as user space code, and where strscpy() is not defined. So I'd rather not replace this particular occurrence of strcpy(). We could add a comment in the file to mention this, though. Thanks, Quentin [0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/bpf/bpftool/Makefile#n246 [1]: https://github.com/libbpf/bpftool/blob/v7.5.0/src/kernel/bpf/disasm.c#L340