From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753421AbbFHOwW (ORCPT ); Mon, 8 Jun 2015 10:52:22 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33667 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752765AbbFHOwM (ORCPT ); Mon, 8 Jun 2015 10:52:12 -0400 Date: Mon, 8 Jun 2015 20:22:01 +0530 From: Sudip Mukherjee To: Joe Perches Cc: Thomas Petazzoni , Noralf =?iso-8859-1?Q?Tr=F8nnes?= , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: fbtft: fix out of bound access Message-ID: <20150608145201.GA15145@sudip-PC> References: <1433424892-23333-1-git-send-email-sudipm.mukherjee@gmail.com> <1433450911.2658.6.camel@perches.com> <20150605045257.GA4012@sudip-PC> <1433483211.2658.22.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433483211.2658.22.camel@perches.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 04, 2015 at 10:46:51PM -0700, Joe Perches wrote: > On Fri, 2015-06-05 at 10:22 +0530, Sudip Mukherjee wrote: > > On Thu, Jun 04, 2015 at 01:48:31PM -0700, Joe Perches wrote: > [] > I looked at it a bit more and there's a macro that calls > write_register so there are actually many more call sites. > > It's a bit non trivial to change the macro as all the > called (*write_register) functions would need changing > and these functions use va_list. > > Maybe if you _really_ feel like it, but it's a bit of work. Hi Joe, I was doing this one today, and just changed write_reg8_bus8 to test. but when started compiling I found out another variation: #define write_reg(par, ...) \ par->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__) and there are only 870 calls to write_reg. :( I was making it like void write_reg8_bus8(struct fbtft_par *par, int len, int *sbuf) but if i have to add an integer array to the places where write_reg is called it will become a big change. Any simple idea? regards sudip >