[PATCH] hv: mark hv_driver read only after init

Stephen Hemminger stephen at networkplumber.org
Mon Aug 15 16:44:25 UTC 2016


On Mon, 15 Aug 2016 09:11:38 -0700
Kees Cook <keescook at chromium.org> wrote:

> On Mon, Aug 15, 2016 at 8:41 AM, Stephen Hemminger
> <stephen at networkplumber.org> wrote:
> > On Fri, 12 Aug 2016 20:05:27 -0700
> > Kees Cook <keescook at chromium.org> wrote:
> >  
> >> On Fri, Aug 12, 2016 at 4:35 PM, Stephen Hemminger
> >> <stephen at networkplumber.org> wrote:  
> >> >
> >> > For hardening, the driver structure containing function pointers can
> >> > be marked read only after initial registration is done.  
> >>
> >> Yay more __ro_after_init! (Minor nit below...)
> >>
> >> Also, I wonder if there's a way to do build-time section checking,
> >> e.g. adding "is this hv_driver marked __ro_after_init?" in
> >> __vmbus_driver_register...  
> >
> > Is there a macro or tool to check this?  
> 
> There isn't, no. That's what I was suggesting might be useful to create. :)
> 
> -Kees
> 

Maybe a sparse annotation like __rcu?
I am not a sparse expert maybe someone else is.


More information about the devel mailing list