Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752158AbbHZVMf (ORCPT ); Wed, 26 Aug 2015 17:12:35 -0400 Received: from smtpauth03.mfg.siteprotect.com ([64.26.60.137]:41810 "EHLO smtpauth03.mfg.siteprotect.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbbHZVMe (ORCPT ); Wed, 26 Aug 2015 17:12:34 -0400 Date: Wed, 26 Aug 2015 17:14:10 -0400 (EDT) From: Vince Weaver X-X-Sender: vince@pianoman.cluster.toy To: Andrew Morton cc: Peter Zijlstra , Ingo Molnar , Johannes Berg , Linus Torvalds , Thomas Gleixner , adrian.hunter@intel.com, Ingo Molnar , Borislav Petkov , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, Alexander Shishkin , "H. Peter Anvin" , Stephane Eranian Subject: Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting In-Reply-To: <20150826135616.c96aeed77efbb412d72b8f00@linux-foundation.org> Message-ID: References: <20150825091740.GA23488@gmail.com> <1440495246.2192.13.camel@sipsolutions.net> <20150825100728.GA1820@gmail.com> <1440497981.2192.39.camel@sipsolutions.net> <20150826044948.GC14584@gmail.com> <1440572775.1932.1.camel@sipsolutions.net> <20150826072020.GA19081@gmail.com> <20150826072656.GA19305@gmail.com> <20150826114111.01675d8eadda78d82933d8a5@linux-foundation.org> <20150826200513.GX16853@twins.programming.kicks-ass.net> <20150826132249.fbb2aa602525c7df4a1f86ed@linux-foundation.org> <20150826135616.c96aeed77efbb412d72b8f00@linux-foundation.org> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-CTCH-Spam: Unknown X-CTCH-RefID: str=0001.0A020205.55DE2BC1.0183,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1605 Lines: 37 On Wed, 26 Aug 2015, Andrew Morton wrote: > On Wed, 26 Aug 2015 16:50:33 -0400 (EDT) Vince Weaver wrote: > > I often have to resort to sprinkling the kernel with printks to find the > > source of errors, which is a pain. It's even more fun when the user's > > setup is slightly different enough that I can't reproduce the issue on a > > local machine, which happens often (due to different kernels, distros > > backporting perf fixes, different hardware, different security settings, > > etc). > > Suppose you were to tell them "please do `echo 1 > /proc/whatever' then > send me the kernel logs". Would this be good enough? would /proc/whatever require CAP_SYS_ADMIN? If so, then no, probably not good enough. Many of the users are trying to run things on large computing clusters, etc, and won't have root permissions. They quite possibly won't have access to the syslog either. I realize that the userbase affected by this is very tiny compared to the amount of bloat introduced to fix it. It would have been easier if event validation were done in userspace (ala perfmon2) rather than having everything in the kernel like perf_event does, but too late for that. Although at some point once you start re-using the limited number of error return codes more than once things can get confusing very quickly. Vince -- 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/