Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1321801ybg; Thu, 4 Jun 2020 06:56:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjkuK76CyrAGhbiRc01BuWBar9PgNA99/+9SNV6oym66QrvSTMRNcbSOKn7k64dp1ibpTs X-Received: by 2002:a17:906:4d13:: with SMTP id r19mr3969495eju.45.1591278966300; Thu, 04 Jun 2020 06:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591278966; cv=none; d=google.com; s=arc-20160816; b=aM45nMCGjbkfzqKsF6lG1NIdPdEV7nO7B8UIAavIc+F4mfoydGMn5fa4gLswk9hqls AyrmWXzfz917NY55+cTIJ8SUg/xqAk9EDd6pq3+9lI5VWLxtLtoYB3i470bGdwQ0J46p 7ebEa5iLieFAzgBQZmBQ5E81hV0YsbdgBwC2rAX5feiFnCa+91vIJId//KvvHfccmpo+ PhRC1JJmDbMUTGZoi76j//ons8wi90tAYjxR6GE4n4qjh7G+LgFoVcGGeGyFK/XG5zjX wkDBZgkCYStGDeImBANndBDeu0s6XrOJIX4rOCuiureQ3PkgVkyB8YaoJyZCWiTn5LH3 P+RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=XhFzRRriVq45JWFxNcxulJeXNUyA8OJ7xO61PQEiMIo=; b=LCkEw5v05+fQIBt+NB+/wdEwSVi8a5uH0eaZvPy2nR39T/TC9b/Djlrhfw2cbMX1Ll tFMUfcUCBwShWnrSo0eYJ/iz9Oi0Tdu5MJfOWa6WanC6jyq1VNK3JsBLKbM4HocKFL03 d4ZstW1xZoBsGz5krMcgRZMC04qFCVqi9USMGQPySwg32Hcu1y/2Nt/0TshBQVnmHlmL 9lnJz1+iokXwuVyMxm3N3kfqal2LrI50wZZJFcOPJKxABzgFNVATqqma6vbN03OPdNF5 wKpat4AeEROEsBakywFlshBNMNYx5spLUlO5TxhWgFf2WIwWKU6MXb8fyVzEOnh+SM1V DU7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si1680042edn.68.2020.06.04.06.55.34; Thu, 04 Jun 2020 06:56:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728688AbgFDNxG (ORCPT + 99 others); Thu, 4 Jun 2020 09:53:06 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:60582 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728666AbgFDNxG (ORCPT ); Thu, 4 Jun 2020 09:53:06 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D4DCC29C3458C616DBC9; Thu, 4 Jun 2020 21:53:03 +0800 (CST) Received: from [10.63.139.185] (10.63.139.185) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Thu, 4 Jun 2020 21:52:55 +0800 Subject: Re: [PATCH] crypto: hisilicon - fix strncpy warning with strlcpy To: Herbert Xu , Zhangfei Gao References: <202006032110.BEbKqovX%lkp@intel.com> <1591241524-6452-1-git-send-email-zhangfei.gao@linaro.org> <20200604033918.GA2286@gondor.apana.org.au> <20200604061811.GA28759@gondor.apana.org.au> <20200604065009.GA29822@gondor.apana.org.au> CC: Greg Kroah-Hartman , Jonathan Cameron , , , From: Zhou Wang Message-ID: <5ED8FCB7.1020305@hisilicon.com> Date: Thu, 4 Jun 2020 21:52:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20200604065009.GA29822@gondor.apana.org.au> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.63.139.185] X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 2020/6/4 14:50, Herbert Xu wrote: > On Thu, Jun 04, 2020 at 02:44:16PM +0800, Zhangfei Gao wrote: >> >> I think it is fine. >> 1. Currently the name size is 64, bigger enough. >> Simply grep in driver name, 64 should be enough. >> We can make it larger when there is a request. >> 2. it does not matter what the name is, since it is just an interface. >> cat /sys/class/uacce/hisi_zip-0/flags >> cat /sys/class/uacce/his-0/flags >> should be both fine to app only they can be distinguished. >> 3. It maybe a hard restriction to fail just because of a long name. > > I think we should err on the side of caution. IOW, unless you > know that you need it to succeed when it exceeds the limit, then > you should just make it fail. Yes. We need make it fail to avoid silent truncation. > > Thanks, >