Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1530201pxb; Fri, 27 Aug 2021 10:55:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUTvncOjfYI8TXcUqSZphqfsJDN0RS2wR6j36XTP6rlO6dY2vFKFbF/mfvXQYJYgX9fHMM X-Received: by 2002:a17:906:6815:: with SMTP id k21mr11269050ejr.371.1630086926162; Fri, 27 Aug 2021 10:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630086926; cv=none; d=google.com; s=arc-20160816; b=XuPYLH2QDdJUz1me/UfbuTFCOzf4ncXmWKcThKO0Sa4vcK5z/OMUC9f2fY6xkwT5+K 29peXZVaOBcF39bgNjxd9MiK2WZLg0FIheJrhsKRMyrsanqACuHwz1Uz3adWnbB/lnhz 00MlwpScTp8YaXCKuzjGk8sXPEFlSWv5RmkbV+JSunHJtoIhbUa9tDPum49h5ljoncj2 ko4Z0LeYJX7FLTHsqfOBacfH8t6s89iAJmtflvFwgDBFp+0BGENyk9vHwX1bDIzCdNDe 1/UZPKxbpcvdwli6T5bby9IC/OJ6bPFrtdtpOH0cyDhPNJB5TLxnKUL1iKn9ebfp2+4m Z7Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Vnzi8i4BEi+cvl2op6fLcbMnIqawCJJ9n45UwHm3acc=; b=D/+HKsYyDmdU2jcxStAJ5pjdYVaeLE70G8q16kacCD7vNjEr9Rat80CtSfEbigsKkj NqVO0DUQv2pjnyH/CpDnTbEWy6yTd4GJLWAMnlMe9233x1Y/EG1ZfIqoGjWvgwQpKSpi 1IupK3etNnTHMUqWWiMe5NJGoWbtAbea4Ss6Gu/pyJUR0wAfK9ZCwX7Rn6l+tTWyW7MS olR+X61MKHY9Y+aYpYT+WhRsrv5HCJqUqeNtB+OVoh5AOtARzPnbooadQxftZORZUB/B BHVKYmx8mDNWUxJpiyGfajmiKYCzuaZwM2KdFz6lwwAcGDbvkaoknpJcbrjupnSO4wvF IiOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="dE/4cW7J"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l12si249216ejo.331.2021.08.27.10.55.01; Fri, 27 Aug 2021 10:55:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="dE/4cW7J"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237395AbhH0Ry0 (ORCPT + 99 others); Fri, 27 Aug 2021 13:54:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231349AbhH0RyY (ORCPT ); Fri, 27 Aug 2021 13:54:24 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8698C061757; Fri, 27 Aug 2021 10:53:31 -0700 (PDT) Received: from zn.tnic (p200300ec2f111700cf40790d4c46ba75.dip0.t-ipconnect.de [IPv6:2003:ec:2f11:1700:cf40:790d:4c46:ba75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id C0D781EC0464; Fri, 27 Aug 2021 19:53:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1630086805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=Vnzi8i4BEi+cvl2op6fLcbMnIqawCJJ9n45UwHm3acc=; b=dE/4cW7JIYkODgbdUOgqYWF853o0YXGEMA5Vs0UV4nyXDhklFT5wPwDMO8d42wsyIDh5L8 03OTw4N2uUvYWb0eoiVLN4YFaDAT5e59Ge8dIewEO6WY+HjqER9WJ6zSPSmtouSFZVtbKb Vv30fIMAPxzc3cFG7H+3NN/vD7XmHJY= Date: Fri, 27 Aug 2021 19:54:07 +0200 From: Borislav Petkov To: Len Baker Cc: Mauro Carvalho Chehab , Tony Luck , James Morse , Robert Richter , Joe Perches , David Laight , Kees Cook , linux-hardening@vger.kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] EDAC/mc: Prefer strscpy over strcpy Message-ID: References: <20210814075527.5999-1-len.baker@gmx.com> <20210824090338.GB7999@titan> <20210827173633.GA3040@titan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210827173633.GA3040@titan> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 27, 2021 at 07:36:33PM +0200, Len Baker wrote: > Well, the main purpose is to clean up the proliferation of str*cpy functions. > One task is to remove the strcpy uses: The first step (previous step) would > be to remove all the strcpy uses. Then, as a second step remove all the > strcpy implementations. > > I hope that this clarify your question. Yes, it does. Now lemme clarify why I'm asking: when your patch is committed to the kernel tree and someone reads its commit message months or even years from now - and those who do that are mostly maintainers trying to figure out why stuff was done the way it was - they will read: "This is a previous step in the path to remove the strcpy() function entirely from the kernel." and wonder what previous step that is what the following step is... So, long story short, your commit message should be complete on its own and understandable without any references to things which might not be as clear and self-evident in the future as they are now. Makes sense? Also, if you're wondering if you should send the patch with the error checking of strscpy() added, as I requested, even if it might look superfluous now, yes you should. Even if it looks impossible now, we might change some of those defines in the future and forget to touch the logic which generates e->label and we might end up exhausting that string. So it would be a lot more robust if something would catch that change, albeit seemingly redundant now. I sincerely hope that clears up things. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette