[PATCH] evh_bytechan: fix out of bounds accesses

Stephen Rothwell sfr at canb.auug.org.au
Thu Jan 16 06:42:34 AEDT 2020


Hi Timur,

On Wed, 15 Jan 2020 07:25:45 -0600 Timur Tabi <timur at kernel.org> wrote:
>
> On 1/14/20 12:31 AM, Stephen Rothwell wrote:
> > +/**
> > + * ev_byte_channel_send - send characters to a byte stream
> > + * @handle: byte stream handle
> > + * @count: (input) num of chars to send, (output) num chars sent
> > + * @bp: pointer to chars to send
> > + *
> > + * Returns 0 for success, or an error code.
> > + */
> > +static unsigned int ev_byte_channel_send(unsigned int handle,
> > +	unsigned int *count, const char *bp)  
> 
> Well, now you've moved this into the .c file and it is no longer 
> available to other callers.  Anything wrong with keeping it in the .h file?

There are currently no other callers - are there likely to be in the
future?  Even if there are, is it time critical enough that it needs to
be inlined everywhere?

-- 
Cheers,
Stephen Rothwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20200116/83491e4c/attachment.sig>


More information about the Linuxppc-dev mailing list