From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759504AbaJ3Lw2 (ORCPT ); Thu, 30 Oct 2014 07:52:28 -0400 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.232]:27628 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759446AbaJ3Lw0 (ORCPT ); Thu, 30 Oct 2014 07:52:26 -0400 Date: Thu, 30 Oct 2014 07:52:23 -0400 From: Steven Rostedt To: Russell King - ARM Linux Cc: Christoph Hellwig , Rabin Vincent , linux-arm-kernel@lists.infradead.org, Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH] tracing/syscalls: ignore numbers outside NR_syscalls' range Message-ID: <20141030075223.721e23d6@gandalf.local.home> In-Reply-To: <20141030071039.37633bf5@gandalf.local.home> References: <1414620418-29472-1-git-send-email-rabin@rab.in> <20141030082606.GA7945@infradead.org> <20141030101808.GO27405@n2100.arm.linux.org.uk> <20141030071039.37633bf5@gandalf.local.home> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.142:25 X-Cloudmark-Score: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 30 Oct 2014 07:10:39 -0400 Steven Rostedt wrote: > On Thu, 30 Oct 2014 10:18:08 +0000 > Russell King - ARM Linux wrote: > > > On Thu, Oct 30, 2014 at 01:26:06AM -0700, Christoph Hellwig wrote: > > > On Wed, Oct 29, 2014 at 11:06:58PM +0100, Rabin Vincent wrote: > > > > ARM has some private syscalls (for example, set_tls(2)) which lie > > > > outside the range of NR_syscalls. If any of these are called while > > > > syscall tracing is being performed, out-of-bounds array access will > > > > occur in the ftrace and perf sys_{enter,exit} handlers. > > > > > > While this patch looks like good caution, having syscalls outside of > > > NR_syscalls seems like a receipe for a disaster. Can you try to fix > > > that issue as ell, please? > > > > No. We've had them since the inception of Linux on ARM. They predate > > this tracing crap by more than a decade. We're not changing them > > because that would be a massive user API breakage. > > > > Since syscall tracing is only broken on ARM, then the fix needs to be > ARM specific, and not remove the check for all other architectures that > have a sane NR_syscalls variable. Bah, I misread the patch. I shouldn't read patches before having my morning coffee :-/ I read it backwards. I thought it was removing the checks for NR_syscalls, and not adding them. I'm fine with the patch as is, and will take it. But I agree that the syscall tracing code needs a rewrite to handle these types of issues. It has problems with compat calls as well, which we simply ignore. Sorry for the confusion. -- Steve