Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754656AbbG3RyX (ORCPT ); Thu, 30 Jul 2015 13:54:23 -0400 Received: from mga01.intel.com ([192.55.52.88]:47297 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753577AbbG3RyU (ORCPT ); Thu, 30 Jul 2015 13:54:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,577,1432623600"; d="scan'208";a="774683421" Date: Thu, 30 Jul 2015 10:54:13 -0700 (PDT) From: Vikas Shivappa X-X-Sender: vikas@vshiva-Udesk To: Peter Zijlstra cc: Vikas Shivappa , linux-kernel@vger.kernel.org, vikas.shivappa@intel.com, x86@kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, tj@kernel.org, matt.fleming@intel.com, will.auld@intel.com, glenn.p.williamson@intel.com, kanaka.d.juvva@intel.com Subject: Re: [PATCH 6/9] x86/intel_rdt: Add support for cache bit mask management In-Reply-To: <20150728163742.GT25159@twins.programming.kicks-ass.net> Message-ID: References: <1435789270-27010-1-git-send-email-vikas.shivappa@linux.intel.com> <1435789270-27010-7-git-send-email-vikas.shivappa@linux.intel.com> <20150728163742.GT25159@twins.programming.kicks-ass.net> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1102 Lines: 41 On Tue, 28 Jul 2015, Peter Zijlstra wrote: > On Wed, Jul 01, 2015 at 03:21:07PM -0700, Vikas Shivappa wrote: >> +static int cbm_validate(struct intel_rdt *ir, unsigned long cbmvalue) >> +{ >> + struct cgroup_subsys_state *css; >> + struct intel_rdt *par, *c; >> + unsigned long *cbm_tmp; >> + int err = 0; >> + >> + if (!cbm_is_contiguous(cbmvalue)) { >> + pr_err("bitmask should have >= 1 bit and be contiguous\n"); >> + err = -EINVAL; >> + goto out_err; >> + } > >> +static struct cftype rdt_files[] = { >> + { >> + .name = "l3_cache_mask", >> + .seq_show = intel_cache_alloc_cbm_read, >> + .write_u64 = intel_cache_alloc_cbm_write, >> + .mode = 0666, > > So this file is world writable? How is the above pr_err() not a DoS ? Will fix. the mode can be default and can remove pr_err Thanks, Vikas > >> + }, >> + { } /* terminate */ >> +}; > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/