Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5147012imm; Tue, 31 Jul 2018 06:21:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe/Y5Np97+NRdZcE/2B0YIGmYF4BWIxd6y4or7VHSl/hZZSkK9f+/9uB3Nc+5rKsd2F4b72 X-Received: by 2002:a63:f804:: with SMTP id n4-v6mr20841889pgh.106.1533043311359; Tue, 31 Jul 2018 06:21:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533043311; cv=none; d=google.com; s=arc-20160816; b=Dc3whdSM8PCB6NDVLVBObiqiv3YEeRbDd25Xk7XAfaLo0JY5gARCAZQbUxxDs+p12o e8fc4xr8ifZ+qneX1ghRI98nOhSSS3/ole5e23O4X3QR3CJxeRgEYfvCNhsHaQvP/kW3 zxdd1dc3dSQlyKk7g4YSOL1ydD1tU0KXl9Sp+owV756IwrMg3MHlpyJd99e52iEzZJFt mDDOvS4us6uGUjL32a17Rf4p6SxgmVFpyi50hNhP/OEXdWFtzuk8mhsZryBCLNG/EQZI D1FnNuGiMGiUgMQG+30yxhd3ekMsFHzQNPo101Jd2nOhlf3gMnpgqlXEB5II423C8VbC cXOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization :arc-authentication-results; bh=IDVzXZhDv1/fvN9L/2uB6U5McRsU9iH9hJAEXkAZX4w=; b=DdzQWUnjz790OMtmGRz5lOcX7oniO2G0xADdjgDvudax6N46oeVg3boacNvfJjPhxc vaa4CelVU+PtYDpJQocTkb3+4jS5FVWUBkc77gmBukkYh/k9zNvN8aYYEqaq+8hDhmol EIP2pMEBHLLfHm/Gcbe5CgblVS+/JEWeCjS9mlWUthF1CRDnpY5CeHmckkDcyq8f/fbb K6UjTkXXKMePYjBZcMLhC8nvR0tDE3fBrbGNCcNIB19iTjfWF5UMrBawJcU2iKIpp0E7 CMzE6QSHpVy78EdrGbTZMBmHyo4pVq2dDZevpI4l4DMSlcZD3dojZ93Wou3YPhs8PA8k xHnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3-v6si12420414pld.457.2018.07.31.06.21.37; Tue, 31 Jul 2018 06:21:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732257AbeGaPBH (ORCPT + 99 others); Tue, 31 Jul 2018 11:01:07 -0400 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 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BE8278197023; Tue, 31 Jul 2018 13:20:47 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-116.rdu2.redhat.com [10.10.120.116]) by smtp.corp.redhat.com (Postfix) with ESMTP id C7A432026D68; Tue, 31 Jul 2018 13:20:46 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 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> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 31 Jul 2018 13:20:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 31 Jul 2018 13:20:47 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dhowells@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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