RE: [PATCH 4/4] MSR: msr Batch processing feature

From: Mcfadden, Marty Jay
Date: Thu Mar 03 2016 - 18:09:23 EST


> From: One Thousand Gnomes [mailto:gnomes@xxxxxxxxxxxxxxxxxxx]
> Sent: Thursday, March 03, 2016 9:21 AM
>
> That strikes me as a very bad idea btw. If your opener was privileged and leaks
> the handle via exec or anything else to another process that process inherits the
> powers which means it can own the system trivially.
>

Agreed, definitely a bad idea on my part. I will revert these particular changes.

>
> So a user can fill your log because you have lots of pr_err() calls etc

Thanks, I will scrub out the unnecessary pr_err() calls.

> > + err = msrbatch_apply_whitelist(&koa, myinfo);
>
> Two threads doing this at once will break if they issue overlapping
> requests with and/or (plus whatever carnage if you clash with
> any other kernel used MSR)

Good point. I'll add protection around the whitelist.

Thank you for your review and comments,

Marty