Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3635629pxt; Tue, 10 Aug 2021 08:01:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw844ymzl0vaZfToqUvkxv541/QlnS2u5lxE4J/gOnhNSKQOleOAyR8CVmY5DRSuedFpexj X-Received: by 2002:a5d:6904:: with SMTP id t4mr31215054wru.187.1628607679308; Tue, 10 Aug 2021 08:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628607679; cv=none; d=google.com; s=arc-20160816; b=HopwP0EUkTHtaeGFLVxgYJrK5P+wulEhK4i0XkqYXOge9unPvdSgBQvjELaW0+Z0MS hhhnt92Zbe1NyLDUWiGI8tUcfdDb1tbIlzBZbj1BbwI1z4vv09T2G6q13V/2NeUSLFl+ CETP6csZjQH0jarsxXUoGrLTD9ODXH47lu8Ko1XoOqgDKNcYoNwcvBnISnUrLRJEN5Jv IPMA3nKyPkQ70eyS5UeeW7d0XzKUZJNnxqywbaob99NwIXikAoerAV4k8eGUzWhMJMMR f3wUi2MfS4SGpWy7AaX7dQSJMcthYYbH2U+WtkxYpMzmmxCCeFJl8qF1t6hwqXOdnY5D bRzg== 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=ABqs84wKaUA3FByRyPz8v+wtP3BKrfJzJu/RCm8D2Ns=; b=HJ02uu8r4B4uwZjcW/dlpHtmxCu/dBVE1CjdLGL2uMPhXKphWDaIBp+v452rHwzIYk EB8xAZNMHE1lrp52lv4MceE+dopXtVJcEUR8KHJtDVZauCQsYf0ZMFybEexYoxOK2R6M NUFivOaYFe1TF1yc0ZGSbSwZTz5/GqA4lpG8Ey5LgMS3VxKmTC1DiL2FB5EEirlu5ar+ wvb0r2B39HFDgo9qekPbyhNgQRl2fNkJqm5z0k4KUM3ZiLwLPCaRhQ1mDd7hANPjG3+Z V889LpSgjEaDpHAOMluKNfJNMgI9eFYPUy4t4NL5e0fpQMGC4oXnwdcojzXzZiAzPlGW P0Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tnMmTlYP; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si4574058edx.30.2021.08.10.08.00.03; Tue, 10 Aug 2021 08:01:19 -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=@kernel.org header.s=k20201202 header.b=tnMmTlYP; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240805AbhHJOgp (ORCPT + 99 others); Tue, 10 Aug 2021 10:36:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:58786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237490AbhHJOgo (ORCPT ); Tue, 10 Aug 2021 10:36:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 410BB60EB5; Tue, 10 Aug 2021 14:36:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628606182; bh=ABqs84wKaUA3FByRyPz8v+wtP3BKrfJzJu/RCm8D2Ns=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tnMmTlYPtbMjowAzEOmV/NIhYmZfApYgdV5s/JLl5d4j6aQDcoY/FVPk4kTDWjvhe lLFSd1kaqo0joYIwZj/S1k7o/0ihHd8At7bwyS55M/ksf8xofcKco0LSMUSSPOzLyy zP43WWqXDJ2U/y1uRSZnmT84RigA4ULEdOJJxqst//wjsOiDio2IcU/EI1RAsmMZJw QkA4bYBsIIbJIIKcg4CVxaMqOigT904GRlqSe90RwsijWz+X/DWyeCTZdWzYqFYVsu tRncrUBw/vqgZyhaCG5RKslAwIN2dxhMFjaz8D0rLgWZGGGG36GJPGf5zL1waM/sxl BuNFWfiQxBCQA== Date: Tue, 10 Aug 2021 16:36:16 +0200 From: Robert Richter To: Joe Perches Cc: Len Baker , Borislav Petkov , Mauro Carvalho Chehab , Tony Luck , James Morse , Kees Cook , linux-hardening@vger.kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] drivers/edac/edac_mc: Remove all strcpy() uses Message-ID: References: <20210807155957.10069-1-len.baker@gmx.com> <20210808112617.GA1927@titan> <99448ef29830fda9b19409bc23b0e7513b22f7b7.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99448ef29830fda9b19409bc23b0e7513b22f7b7.camel@perches.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.08.21 10:18:58, Joe Perches wrote: > strscpy and scnprintf have different return values and it's simpler > and much more common to use scnprintf for appended strings that are > limited to a specific buffer length. Calculating the bytes written from the return value is a oneliner. -Robert