From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932330AbcBJDOb (ORCPT ); Tue, 9 Feb 2016 22:14:31 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:52794 "EHLO e37.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753263AbcBJDO3 (ORCPT ); Tue, 9 Feb 2016 22:14:29 -0500 X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: sukadev@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Tue, 9 Feb 2016 19:14:10 -0800 From: Sukadev Bhattiprolu To: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: powerpc/perf/hv-gpci: Increase request buffer size Message-ID: <20160210031410.GA1483@us.ibm.com> References: <20160209030830.GA4815@us.ibm.com> <20160209094518.B91C7140B9A@ozlabs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160209094518.B91C7140B9A@ozlabs.org> X-Operating-System: Linux 2.0.32 on an i486 User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16021003-0025-0000-0000-00002136DF68 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michael Ellerman [mpe@ellerman.id.au] wrote: > Here you read from bytes[i] where i can be > 1 (AFAICS). Yes, buffer is large enough and I thought this construct of array was used in a several places. Maybe they are being changed out now (struct pid has one such usage). > > That's fishy at best, and newer GCCs just don't allow it. Ah, ok. > > I think you could do this and it would work, but untested: > > struct hv_gpci_request_buffer { > struct hv_get_perf_counter_info_params params; > uint8_t bytes[4096 - sizeof(struct hv_get_perf_counter_info_parms)]; There is a macro for this computation in that file. I could have used that. Will change it and repost. Thanks, Sukadev