lkml.org 
[lkml]   [2022]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] openvswitch: Change the return type for vport_ops.send function hook to int
Date


On 14 Sep 2022, at 1:07, Nathan Huckleberry wrote:

> All usages of the vport_ops struct have the .send field set to
> dev_queue_xmit or internal_dev_recv. Since most usages are set to
> dev_queue_xmit, the function hook should match the signature of
> dev_queue_xmit.
>
> The only call to vport_ops->send() is in net/openvswitch/vport.c and it
> throws away the return value.
>
> This mismatched return type breaks forward edge kCFI since the underlying
> function definition does not match the function hook definition.
>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Link: https://github.com/ClangBuiltLinux/linux/issues/1703
> Cc: llvm@lists.linux.dev
> Signed-off-by: Nathan Huckleberry <nhuck@google.com>

The changes look good to me.

Acked-by: Eelco Chaudron <echaudro@redhat.com>

\
 
 \ /
  Last update: 2022-09-19 15:21    [W:0.052 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site