public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: fbtft: fix out of bound access
Date: Mon, 8 Jun 2015 20:22:01 +0530	[thread overview]
Message-ID: <20150608145201.GA15145@sudip-PC> (raw)
In-Reply-To: <1433483211.2658.22.camel@perches.com>

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:
> []
<snip>
> 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 
> 

  reply	other threads:[~2015-06-08 14:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04 13:34 [PATCH v2] staging: fbtft: fix out of bound access Sudip Mukherjee
2015-06-04 20:48 ` Joe Perches
2015-06-05  4:52   ` Sudip Mukherjee
2015-06-05  5:46     ` Joe Perches
2015-06-08 14:52       ` Sudip Mukherjee [this message]
2015-06-08 15:57         ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150608145201.GA15145@sudip-PC \
    --to=sudipm.mukherjee@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noralf@tronnes.org \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox