From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83DA2C433F5 for ; Sun, 9 Oct 2022 18:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230250AbiJISSD (ORCPT ); Sun, 9 Oct 2022 14:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbiJISRh (ORCPT ); Sun, 9 Oct 2022 14:17:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8639CE1A; Sun, 9 Oct 2022 11:17:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C35D9B80D13; Sun, 9 Oct 2022 18:17:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 093F1C433D6; Sun, 9 Oct 2022 18:17:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1665339428; bh=WlUVYWcv0RSfNrnisKDi/OW/RV7h0cjuQQ19bFBOoog=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Rw38q9pBwLqsPyZDDYNCUJVBM/wQdBpInwfKXrazRDvratMB1+6APuHPbMdcHL+tR alh1uFrcM2QaDGYEEa9Ik0BNxthXgmQq9lBiv8sDxOxB4YOspqrAFf70S0yVAsH5yg DoiwdVTyLl225YVSwhFR/J3E6MuPtUqjH3skq9iE= Date: Sun, 9 Oct 2022 20:17:51 +0200 From: 'Greg Kroah-Hartman' To: Krzysztof Kozlowski Cc: David Laight , Andrew Chernyakov , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , "linux-arm-msm@vger.kernel.org" , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , "lvc-project@linuxtesting.org" , Stephen Boyd , Bjorn Andersson Subject: Re: [PATCH 5.10 1/1] rpmsg: qcom: glink: replace strncpy() with strscpy_pad() Message-ID: References: <20221007132931.123755-1-acherniakov@astralinux.ru> <20221007132931.123755-2-acherniakov@astralinux.ru> <36f776cbc16f4e988d96b7bcb77cd559@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 09, 2022 at 05:23:06PM +0200, Krzysztof Kozlowski wrote: > On 08/10/2022 23:11, David Laight wrote: > >>> --- > >>> drivers/rpmsg/qcom_glink_native.c | 2 +- > >>> drivers/rpmsg/qcom_smd.c | 4 ++-- > >>> 2 files changed, 3 insertions(+), 3 deletions(-) > >> > >> Why just this specific kernel branch? We can't add patches to an older > >> tree and have someone upgrade to a newer one and hit the same issue. > >> > >> So please provide backports for all active versions. In this case that > >> would be 5.15.y and 5.19.y. > > > > If it is only fixing a compile warning is it even stable material? > > The generic commit message doesn't say whether the old code was > > actually right or wrong. > > > > At least one of these 'replace strncpy()' changes was definitely > > broken (the copy needed to be equivalent to memcpy()). > > > > So applying ANY of them to stable unless they actually fix > > a real bug seems dubious. > > Except the warning from GCC, there was no bug to fix. The warning is > about discouraged and risky practice, but no actual real risk was > identified, so for me it matches stable rules poorly. > > It's basically backporting to silence automated code checkers... Are you sure? Look at the code path here, there might be a way to overflow the string, from the virtio interface, but I might be wrong... Anyway, I need all the backports before I can take this one, sorry. greg k-h