From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934447AbcAZSI6 (ORCPT ); Tue, 26 Jan 2016 13:08:58 -0500 Received: from host.buserror.net ([209.198.135.123]:42412 "EHLO host.buserror.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932586AbcAZSI4 (ORCPT ); Tue, 26 Jan 2016 13:08:56 -0500 Message-ID: <1453831729.27129.35.camel@buserror.net> From: Scott Wood To: Thomas Gleixner , Zhao Qiang Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, leoyang.li@nxp.com, xiaobo.xie@nxp.com Date: Tue, 26 Jan 2016 12:08:49 -0600 In-Reply-To: References: <1453338364-45129-1-git-send-email-qiang.zhao@nxp.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 50.157.106.250 X-SA-Exim-Mail-From: oss@buserror.net X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -15 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Subject: Re: [PATCH] qe_ic: fix a buffer overflow error and add check elsewhere X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:57:07 +0000) X-SA-Exim-Scanned: Yes (on host.buserror.net) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-01-26 at 18:31 +0100, Thomas Gleixner wrote: > On Thu, 21 Jan 2016, Zhao Qiang wrote: > > > 127 is the theoretical up boundary of QEIC number, > > in fact there only be 44 qe_ic_info now. > > add check to overflow for qe_ic_info > > How do you trigger that overflow? The above does not explain WHY we need > these > checks. The check in qe_ic_host_map can be triggered by bad data in a device tree. The set_priority functions do not appear to be used at all. > > > diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c > > index 5419527..90c00b7 100644 > > --- a/drivers/soc/fsl/qe/qe_ic.c > > +++ b/drivers/soc/fsl/qe/qe_ic.c > > Sigh. Another dump ground for SOC stuff? Another? Where are the others, besides arch? > irq chip drivers belong into drivers/irqchip. Yes. This stuff was recently moved out of arch/powerpc to work toward being able to use it on ARM. I'm expecting followup patches to move things like this that belong elsewhere. -Scott