From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE1B73A6B65 for ; Tue, 18 Aug 2026 10:11:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787047877; cv=none; b=dJnrhi2gXRTUCLfufXdCzWTETWwU61I1cicARyzNiMjKC3nDpNSm256qpIivw4NlI87i0dBBez2z454kkV4Hvy+gsyH8I3sUnzfgmEN8Rek1AvY62X6rKi3GwFq3MCi+uXUPnznldGLyd1rla2PjPrv+X8eOswExsjFKYitG8n8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787047877; c=relaxed/simple; bh=CRb+/GDGaTVniE3+kbPEe0gJUuOEfddvyPixUMU+uhg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OVuqOUFRPyfrjvbnqGh60NLTAUmtM+7gOhhuChDVfG4AUaU3C1wCRydM5jLyCafQE+Ik2sgJcWTz4e2LYd69Si4ybTNv2Q7wbkUWC+pw1Br1KS62e419M8xyQLavYUjoVSfrB2BdImM5K8EMjNOek38j8BfuKYJes+4BYSuPBGc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LFUqsCaJ; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LFUqsCaJ" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2cc891373e0so57621965ad.2 for ; Tue, 18 Aug 2026 03:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787047875; x=1787652675; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=CRb+/GDGaTVniE3+kbPEe0gJUuOEfddvyPixUMU+uhg=; b=LFUqsCaJmt1acpYO2dioNo5MuJ2S0Ch9AB8Vnel3mEaZD39vxqleybaI1TnZlXb78H texc2iaTaI0RhNfh16yXhw3bTKVFsDlQHhMs4aUXZ1JuNoUNqCgxZ7vPjpaMDd3+ecYP nRZpPc2l4eeezgep3Wsj2pb6ESzkSxwejNqP9EOxPv/78HRGJSWAn6dSwX5CsIcS6xoq asQpMEwNSTPDeRCSPfrqR64Bj9rLsoLkZjZhHXNVapCYXndMgJoitq5TVdICEVRkkUKh +UHIG2QBYEHXaMkRIFW7hJWnleOuNxl7fG4Oz41jO8mcY49I6PWTO0RnJM10VWv2AQL4 LqvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787047875; x=1787652675; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=CRb+/GDGaTVniE3+kbPEe0gJUuOEfddvyPixUMU+uhg=; b=siU3iMJS2xsQGExL8Ar8icYghumYwMImqM1jdPFDSKfwrhp70J4IMkzx3UwDI/9Jw5 kC5LhKo3/6dT5ZAjf4K7SqfvBPh5qXXXcwkT4ehKoZbCa/V2n6BdT7Sh0fX0V9fT5vS4 HoKOgHEmBg/ZDqoppoG5ZdFD8QV0VTZ3NBqpfsk0kkl0WEEoTSb6rDn3strYLGoXpwjy ixeAF+xm3fp/4zTDqivmskwefGMnAXWz+EK7Nigf5ilzKa49D2THGa3qtVQs8VKmEYJs b+c4UggQyOLZel+Y0JizBu11q8uNbjqyEXf0JJ2ghjNyj69qr+fxwfKD55+8QREdFqmc AUtw== X-Forwarded-Encrypted: i=1; AHgh+Rp/OryOrXe9O6d64+IgQWzGLubspZr19tDkJ3S4n9tFIXMKplHoxwQr9rJRYR3gBcil1QnJzckNeUuIC0Y=@vger.kernel.org X-Gm-Message-State: AOJu0YwnwWfnm7HExySrP0gdBrQh6bFaPxxXc4/Y+tAPRPZSD3hT3F+4 xCRb6PWnDaWtxJQ1ZXYjfbXWZo2cT2SyBsgGYSDuydSf7dRrwIg1R6tj X-Gm-Gg: AR+sD11JMO2ecxhJQth0oz9mmf/DuEqrJjOBjHAFKRN8Zro3UORESu+oKZtIOPezHvK BAaHk/H9mpNUYRCE+Tr0egJpTupd65tpjQnEjL2FYuUTgDytDTdyHhdX2BwvO/mG5vPiYHq+SFd lE0qbeV05fKXyhaZw6S4m45whY1nPKQCRvJMzAus72cTm1OjBO9nEbeRhAbbY4vqGiUojHIV04e G6aT76w+ipCf373+yxJr+/NQLUu8Eu8PyL6FWdCb6a5p3we8k6vd6HNcBmTqmWlvX2rghPH1a5x Vd7jHZNlGqtSo6HGbbSDx5Qu3GIj+e0Aj9u+VvGt0Y/9+XvbuX5bzXS7Lj17VdFAi1sgFegmc/O ccRGLDuNbkZKSvEAHUMNjliINYs+0KmfsmpWjnT0wVSaOuFkHUTaIczw+q37vAIB1yuPRaqCWlu 22jhFNfVk5olVcdkEHrCfv22lP4ENDYMNWocPLI4F/uJ8WnZu/zyTCEZbMtQKKlPnQpnjY8GTbm Zg= X-Received: by 2002:a17:903:1965:b0:2c0:e5ee:f55e with SMTP id d9443c01a7336-2d3b0db9f3cmr358155475ad.7.1787047874848; Tue, 18 Aug 2026 03:11:14 -0700 (PDT) Received: from ubuntu.. ([49.205.39.116]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-2d5c1e5506asm12784955ad.43.2026.08.18.03.11.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2026 03:11:13 -0700 (PDT) From: Ajith P V To: tung.quang.nguyen@est.tech, jmaloy@redhat.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org Cc: netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v3] tipc: replace deprecated strcpy with strscpy in tipc_bearer_get_name() Date: Tue, 18 Aug 2026 10:11:07 +0000 Message-ID: <20260818101107.460476-1-ajithpv.linux@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260817152350.573c4eff@pumpkin> References: <20260817152350.573c4eff@pumpkin> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Thank you Tung Quang Nguyen and David Laight for the suggestions. > Should the TIPC_MAX_BEARER_NAME requirement be spelled out in the comment > or in the prototype, so that the interface and the body agree? > In the current tree there is no behavioural change: the only caller is > __tipc_nl_add_monitor() in net/tipc/monitor.c, which declares > char bearer_name[TIPC_MAX_BEARER_NAME], and the source is > char name[TIPC_MAX_BEARER_NAME] in struct tipc_bearer, so the copy can > neither truncate nor overflow. > The strscpy() return value is also discarded, so a future caller passing a > smaller buffer would get a silently truncated name plus a return of 0. > Would passing a size_t len from the caller (sizeof(bearer_name)) and > forwarding strscpy()'s -E2BIG through the existing int return be preferable > to a hard-coded bound? I will update the patch with the above fixes and send the new version after Aug 31st. Regards, Ajith P V