From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out4.electric.net ([192.162.216.182]:63787 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754663AbdLFKLR (ORCPT ); Wed, 6 Dec 2017 05:11:17 -0500 From: David Laight To: 'Arnd Bergmann' , Alexander Viro , Ingo Molnar , Peter Zijlstra CC: Kees Cook , Serge Hallyn , "James Morris" , Andrew Morton , Aleksa Sarai , "Eric W. Biederman" , Frederic Weisbecker , Thomas Gleixner , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2] exec: avoid gcc-8 warning for get_task_comm Date: Wed, 6 Dec 2017 10:11:27 +0000 Message-ID: References: <20171205151724.1764896-1-arnd@arndb.de> In-Reply-To: <20171205151724.1764896-1-arnd@arndb.de> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: From: Arnd Bergmann > Sent: 05 December 2017 15:17 > gcc-8 warns about using strncpy() with the source size as the limit: Hmmm... Someone 'fixed' some of those in the NetBSD tree a few years back. There was one place where the code was correct. A potentially unterminated string was being copied into a buffer that was one byte longer. David