Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1330873

Re: powerpc/perf/hv-gpci: Increase request buffer size

From Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: powerpc/perf/hv-gpci: Increase request buffer size
Date 2016-02-10 04:20 +0100
Message-ID <r0ttU-51J-3@gated-at.bofh.it> (permalink)
References <r06QG-6k0-7@gated-at.bofh.it> <r0d5M-2cL-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: powerpc/perf/hv-gpci: Increase request buffer size Michael Ellerman <mpe@ellerman.id.au> - 2016-02-09 10:50 +0100
  Re: powerpc/perf/hv-gpci: Increase request buffer size Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> - 2016-02-10 04:20 +0100

csiph-web