Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5542324pxb; Wed, 26 Jan 2022 14:35:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxzWu6EE0GeSi1mnu4tcHtGjK1aTzpCdxKxx2hoponzNuqcoCe4bQo1Qjft+eYixhQ51OjA X-Received: by 2002:a17:907:1687:: with SMTP id hc7mr708653ejc.301.1643236539898; Wed, 26 Jan 2022 14:35:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643236539; cv=none; d=google.com; s=arc-20160816; b=naN/4xe9XwTRekjN/nmFtybS9BVVzuO63Rz3/q5gxKJc6LkFBhoSY5HlI8xgvu3QEa yO0z87sQqiAzBU69Jn3IKV6NsaA+onkXqOtSxzQPa4StSgBQm2obj4QFndiMoQIiO6gt MrnH3JcosuZNnlduuNsKbWF7NRjaVWNfBVqKZr3GBXz9Ni2bw5uyDMd3EBMYLB98prLD bt6b44OwO7LS12jAyaztB+eUX6ad4I3fUxuj9KrN4mhwKKJAilEDyHipD0yhURr+aLaK sw4V/OfvO2UECcAc51/hNdBwg5UWzxo8F69wHAo0xjUZ1g+N6akpePB1S4X4jpTIKQ2d 0wvw== 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=cnaHKagfwHGqaznD5wm3EjdQSvy1XNpSCppZJHrSIys=; b=Re+jO6DRFX1XibFt3MWEqoc4/aT9XQZMWACFFCY/PrtbD7sXNrExkuug2MaznKLzn1 PHobwqgJlIK3cZFLb4cz+IUWYOmpbAHuYRvUYkVL9qqVK1Br2jDkfGgqYcTAappl/ar9 nJlE4NKrnkzbTyBgVerZlKkyfaIMSO59x4UxkRcSiPq1PfdkffUyJ9OKSJIrQrwZ5DyI lynbT3Vk0s8GOfttKBTqMzZswFU3yO2ugQrGOiUzX5v4gzd//Ozpv6K1eWd8Bfivay0h vw9zU/WvteifoSrtyy2k8bVfJbwR4dY30S6af0MZ2iifUPMXALbeaB+CIwvB5tnlN4PV b0oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aGK97rak; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si258639ejl.58.2022.01.26.14.35.13; Wed, 26 Jan 2022 14:35:39 -0800 (PST) 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=@linaro.org header.s=google header.b=aGK97rak; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244508AbiAZTsn (ORCPT + 99 others); Wed, 26 Jan 2022 14:48:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232077AbiAZTsl (ORCPT ); Wed, 26 Jan 2022 14:48:41 -0500 Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B343C06161C for ; Wed, 26 Jan 2022 11:48:41 -0800 (PST) Received: by mail-qk1-x72b.google.com with SMTP id 13so545173qkd.13 for ; Wed, 26 Jan 2022 11:48:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cnaHKagfwHGqaznD5wm3EjdQSvy1XNpSCppZJHrSIys=; b=aGK97rakYCe9gtm+vNOzkSTyJolrONWbZ2NnD9qv8O+uupRm9HbODyTEdYDKGwqyfw eaJRbjvPqJlKnLVLWFxBfMNyyTuO+af5C/c11/hnXA/g57VtO+Y0nCxWYwFulgIoVFF7 YxD07u+wy/R+NlTHMhpICG1UdViVU9ig95K42g31xhHuB3swuZPH9AcqL4tJBURZDmNs NWQA5kPDpffdLTHusFW8rrzpTCjPhMMaSYL0GBQcIbMPxS+E87YuUaTmIjD5vCURAtP8 fZP2DLxhpLki+8DFHIpfVJwxW/A57IlJhbXvIompriWORNmJ40RTqWuXNVTc0KNHREzF Yf9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cnaHKagfwHGqaznD5wm3EjdQSvy1XNpSCppZJHrSIys=; b=19uE2QnNHfqjwLps0/QazJNDSIHoH5oH+8z4k1UEV9jfJN9GEBJl4jE6vMGwAruwkw l5ZxRcIM6izb/4NFvlH5ZdiBo7vZEkkvDsUZ4cNU0kZ0GkrY9e8zw/tD9VQN2yxvf0I7 bT/56uHpJgeAAvb7Iv6fmCCm1evQ7i6l15t+m4/v+2CnCfG+sV/peWdV+ldir6HsVqCQ mQOj4Dw3H/Ay1QxKlVE+ujdMqbphqm9JmaRlCOGuiceMbdcQmSeRGCLlg8d1tvCEAeLV o8eBO5Yz6IAZ/7kOdWWF9POZANfNXJx0s2lAo1Pw2aakv3vcjVY1Xh9ayzKNBH7gqBes XT6w== X-Gm-Message-State: AOAM533z8W0e7oMRDpGWMmaOrNNejKiL0anh/HQiqDqet4I0JD7VzZ/T g222eIOKTt/FsdXqNOtwL+Q9nF2kIlPwkA== X-Received: by 2002:a37:b0c:: with SMTP id 12mr211117qkl.667.1643226520231; Wed, 26 Jan 2022 11:48:40 -0800 (PST) Received: from localhost (rfs.netwinder.org. [206.248.184.2]) by smtp.gmail.com with ESMTPSA id f2sm101432qti.61.2022.01.26.11.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 11:48:39 -0800 (PST) Date: Wed, 26 Jan 2022 14:48:39 -0500 From: Ralph Siemsen To: Kees Cook Cc: Greg Kroah-Hartman , Andy Shevchenko , Arnd Bergmann , Jiri Prchal , Mark Brown , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH -next] eeprom: at25: Replace strncpy() with strscpy() Message-ID: <20220126194839.GA3763384@maple.netwinder.org> References: <20220118182047.3385295-1-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20220118182047.3385295-1-keescook@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kees, On Tue, Jan 18, 2022 at 10:20:47AM -0800, Kees Cook wrote: >Use strscpy() instead of strncpy(), since its use has been deprecated[1]. > >[1] >https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings Along with your other fix to restore the missing kzalloc(), I tested this change on 32-bit arm system, and it worked as expected. Tested-by: Ralph Siemsen Cheers, -Ralph