Re: [PATCH] kptr_restrict for hiding kernel pointers fromunprivileged users

From: Eric Dumazet
Date: Thu Dec 09 2010 - 08:30:43 EST


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.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/