Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753143AbdF0NJF (ORCPT ); Tue, 27 Jun 2017 09:09:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35822 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752654AbdF0NI7 (ORCPT ); Tue, 27 Jun 2017 09:08:59 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8EC645AFC8 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=pbonzini@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8EC645AFC8 Subject: Re: [PATCH] KVM: Replaces symbolic permissions with numeric To: Roman Storozhenko , kvm@vger.kernel.org Cc: rkrcmar@redhat.com, linux-kernel@vger.kernel.org References: <20170627095118.GA19829@home> From: Paolo Bonzini Message-ID: Date: Tue, 27 Jun 2017 15:08:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170627095118.GA19829@home> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 27 Jun 2017 13:08:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1331 Lines: 40 On 27/06/2017 11:51, Roman Storozhenko wrote: > Replaces "S_IRUGO | S_IWUSR" with 0644. The reason is that symbolic > permissions considered harmful: > https://lwn.net/Articles/696229/ > > Signed-off-by: Roman Storozhenko > --- > virt/kvm/kvm_main.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index f0fe9d0..3863cf7 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -73,17 +73,17 @@ MODULE_LICENSE("GPL"); > > /* Architectures should define their poll value according to the halt latency */ > unsigned int halt_poll_ns = KVM_HALT_POLL_NS_DEFAULT; > -module_param(halt_poll_ns, uint, S_IRUGO | S_IWUSR); > +module_param(halt_poll_ns, uint, 0644); > EXPORT_SYMBOL_GPL(halt_poll_ns); > > /* Default doubles per-vcpu halt_poll_ns. */ > unsigned int halt_poll_ns_grow = 2; > -module_param(halt_poll_ns_grow, uint, S_IRUGO | S_IWUSR); > +module_param(halt_poll_ns_grow, uint, 0644); > EXPORT_SYMBOL_GPL(halt_poll_ns_grow); > > /* Default resets per-vcpu halt_poll_ns . */ > unsigned int halt_poll_ns_shrink; > -module_param(halt_poll_ns_shrink, uint, S_IRUGO | S_IWUSR); > +module_param(halt_poll_ns_shrink, uint, 0644); > EXPORT_SYMBOL_GPL(halt_poll_ns_shrink); > > /* > Queued, thanks.