lkml.org 
[lkml]   [2022]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] counter: Adjust final parameter type in function and signal callbacks
On Wed, Nov 02, 2022 at 01:23:51PM -0700, Nathan Chancellor wrote:
> Right, I am not the biggest fan of this change myself and it is entirely
> possible that I am misreading the warnings from the commit message but I
> do not see how
>
> comp_node.comp.signal_u32_read = counter->ops->signal_read;
>
> and
>
> comp_node.comp.count_u32_read = counter->ops->function_read;
>
> in counter_add_watch(),
>
> comp.signal_u32_read = counter->ops->signal_read;
>
> in counter_signal_attrs_create(), and
>
> comp.count_u32_read = counter->ops->function_read;
> comp.count_u32_write = counter->ops->function_write;
>
> in counter_count_attrs_create() are currently safe under kCFI, since the
> final parameter type of the prototypes in 'struct counter_ops' does not
> match the final parameter type of the prototypes in 'struct
> counter_comp'. I would expect the indirect calls in counter_get_data()
> and counter_comp_u32_show() to fail currently.

Ah! Thank you -- those were the places I couldn't find.

--
Kees Cook

\
 
 \ /
  Last update: 2022-11-02 23:03    [W:0.141 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site