From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754544AbcASNGA (ORCPT ); Tue, 19 Jan 2016 08:06:00 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34242 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752795AbcASNFr (ORCPT ); Tue, 19 Jan 2016 08:05:47 -0500 Date: Tue, 19 Jan 2016 15:05:43 +0200 From: "Kirill A. Shutemov" To: Dmitry Vyukov Cc: syzkaller , Vegard Nossum , Catalin Marinas , Tavis Ormandy , Will Deacon , LKML , Quentin Casasnovas , Kostya Serebryany , Eric Dumazet , Alexander Potapenko , Kees Cook , Bjorn Helgaas , Sasha Levin , Andrew Morton , David Drysdale , linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Andrey Ryabinin Subject: Re: [PATCH v4] kernel: add kcov code coverage Message-ID: <20160119130543.GB20984@node.shutemov.name> References: <1453145117-92868-1-git-send-email-dvyukov@google.com> <20160118225550.GE14531@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 19, 2016 at 01:55:43PM +0100, Dmitry Vyukov wrote: > >> +static int __init kcov_init(void) > >> +{ > >> + if (!debugfs_create_file("kcov", 0666, NULL, NULL, &kcov_fops)) { > > > > Why 0666? May be 0600?. > > The idea is that it can be useful to fuzz-test under a normal user as well. > This file is also guarded by debugfs mount permissions. Usually it is mounted > as 0700, so normal users can't get access to it. > However if one wants to fuzz-test under a normal user, he could mount > debugfs as 0777 and get access to this file. > > I am not very strong about this, though. If you say, I will change it to 0600. > I open this file as root at the moment. And we can change it back > if/when we better understand a potential use case. I think it's safer to make it 0600. It's up to system administrator to change permissions, if he wants give this capability to mortals. -- Kirill A. Shutemov