From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:51084 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753504AbdIDNVJ (ORCPT ); Mon, 4 Sep 2017 09:21:09 -0400 Date: Mon, 4 Sep 2017 14:21:07 +0100 From: Al Viro To: Tetsuo Handa Cc: linux-fsdevel@vger.kernel.org Subject: Re: fs: Uninitialized memory read at take_dentry_name_snapshot Message-ID: <20170904132106.GU5426@ZenIV.linux.org.uk> References: <201709042112.BFB76862.FQVFMSOtOJFHOL@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201709042112.BFB76862.FQVFMSOtOJFHOL@I-love.SAKURA.ne.jp> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Sep 04, 2017 at 09:12:38PM +0900, Tetsuo Handa wrote: > Hello. > > I hit kmemcheck splat on commit 49d31c2f389acfe8 ("dentry name snapshots") using linux-next-20170901. > Changing to strncpy() fixes this problem, but using strncpy() only if CONFIG_KMEMCHECK=y is better > for performance? *shrug* If anything, use dentry->d_name.len + 1 instead of DNAME_INLINE_LEN there, but that's really a false positive.