From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55306 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732110AbeGaPBG (ORCPT ); Tue, 31 Jul 2018 11:01:06 -0400 From: David Howells In-Reply-To: References: <153271267980.9458.7640156373438016898.stgit@warthog.procyon.org.uk> <153271291017.9458.7827028432894772673.stgit@warthog.procyon.org.uk> To: Jann Horn Cc: dhowells@redhat.com, Al Viro , Linux API , Linus Torvalds , linux-fsdevel@vger.kernel.org, kernel list Subject: Re: [PATCH 34/38] vfs: syscall: Add fsinfo() to query filesystem information [ver #10] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11188.1533043246.1@warthog.procyon.org.uk> Date: Tue, 31 Jul 2018 14:20:46 +0100 Message-ID: <11189.1533043246@warthog.procyon.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Jann Horn wrote: > > + strcpy(p->f_fs_name, dentry->d_sb->s_type->name); > > Can you use strlcpy() instead? From a quick look, I don't see anything > that actually limits the size of filesystem names, even though > everything in-kernel probably fits into the 16 bytes you've allocated > for the name. Sure. Should I increase the field size to 32, I wonder? David