> > @@ -7137,10 +7161,13 @@ static const char *x86_cpu_feature_name(FeatureWord 
> > w, int bitnr)
> >       if (w == FEAT_XSAVE_XCR0_LO || w == FEAT_XSAVE_XCR0_HI) {
> >           int comp = (w == FEAT_XSAVE_XCR0_HI) ? bitnr + 32 : bitnr;
> > -        if (comp < ARRAY_SIZE(x86_ext_save_areas) &&
> > -            x86_ext_save_areas[comp].bits) {
> > -            w = x86_ext_save_areas[comp].feature;
> > -            bitnr = ctz32(x86_ext_save_areas[comp].bits);
> > +        if (comp < ARRAY_SIZE(x86_ext_save_areas)) {
> > +            /* Present the first feature as the default. */
> > +            const FeatureMask *fm = &x86_ext_save_areas[comp].features[0];
> 
> It doesn't look right to me.
> 
> E.g., when users are requesting IBT, thus CET_U and CET_S, they might get
> "shstk" not avaiable.

This was intentional. This patch only introduces a new dependency array
without attempting to change the existing state. The series is already
quite large, so I didn't include all the cleanup within it.



Reply via email to