Re: [PATCH] kptr_restrict for hiding kernel pointers from unprivileged users

Eric Dumazet
2010-12-09T13:30:28Z

Le jeudi 09 décembre 2010 à 07:46 -0500, Dan Rosenberg a écrit :
> > > So caller can not block BH ?
> > >
> > > This seems wrong to me, please consider :
> > >
> > > normal process context :
> > >
> > > spin_lock_bh() ...
> > >
> > > for (...)
> > > {xxx}printf( ... "%pK" ...)
> > >
> > > spin_unlock_bh();
> > >
> >
> > I will think about this and address it.
>
> Would you be happier if I omitted the in_interrupt() check entirely?
>

Well, it seems difficult to make a check here, its a generic function
that happens to be used from different contexts.

Even using in_irq() might be a problem.