Re: [PATCH v3] sched/core: Address classes via __begin_sched_classes
From: Kees Cook
Date: Tue May 17 2022 - 13:36:16 EST
On Tue, May 17, 2022 at 01:46:54PM +0200, Peter Zijlstra wrote:
> On Mon, May 16, 2022 at 08:33:25PM -0700, Kees Cook wrote:
>
> > I just need to start today over.
>
> :-)
>
> Also, even with this sorted, there's a ton array bound things left.
> Please don't just mangle the code until it stops complaining like in the
> previous postings of these patches.
Yeah, other code is much simpler. The sched code has been a bit tricky
to figure out.
> As such, I'm only barely ok with the below patch. Ideally I'd shoot GCC
> in the head. Its *really* tedious you cannot just tell it to shut up
> already.
What you've got below is almost exactly what I had in my first attempt
at this (that I never posted). What I was missing and couldn't track
down were the places you used sched_class_above(). I should have sent
_that_ patch and asked where the comparisons were that I couldn't find.
I think what you've got is much cleaner, as it makes the for loop use
the normal iterator idiom.
Thank you!
Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
--
Kees Cook