From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 58519F8D for ; Fri, 7 Sep 2018 14:33:31 +0000 (UTC) Received: from imap.thunk.org (imap.thunk.org [74.207.234.97]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 21EEEA8 for ; Fri, 7 Sep 2018 14:33:30 +0000 (UTC) Date: Fri, 7 Sep 2018 10:33:26 -0400 From: "Theodore Y. Ts'o" To: Kees Cook Message-ID: <20180907143326.GM5098@thunk.org> References: <20180906094158.1eba4f50@canb.auug.org.au> <20180905222437.5d2a1730@vmware.local.home> <20180907091842.6c55bd9a@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: ksummit Subject: Re: [Ksummit-discuss] [MAINTAINERS SUMMIT] API replacement/deprecation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, Sep 06, 2018 at 04:24:03PM -0700, Kees Cook wrote: > > Hopefully we can all agree on deprecating strcpy() and strncpy() in > favor of strscpy()? There are some places where I use strncpy for a character array which is *not* a null-terminated string. What is the preferred alternative for me? I can suppress the problem when gcc complains about it using: + __u8 s_first_error_func[32] __nonstring; /* function where the error happened */ But if we do a blanket deprecation, what should I use instead? - Ted