lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201119144026.opawwlgianhe2ptq@bogus>
Date:   Thu, 19 Nov 2020 14:40:26 +0000
From:   Sudeep Holla <sudeep.holla@....com>
To:     Cristian Marussi <cristian.marussi@....com>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        lukasz.luba@....com, Jonathan.Cameron@...wei.com,
        egranata@...gle.com, jbhayana@...gle.com,
        peter.hilber@...nsynergy.com, mikhail.golubev@...nsynergy.com,
        Igor.Skalkin@...nsynergy.com
Subject: Re: [PATCH v3 2/6] firmware: arm_scmi: add SCMIv3.0 Sensors
 descriptors extensions

On Thu, Nov 19, 2020 at 12:20:29PM +0000, Cristian Marussi wrote:
> Hi Sudeep
>

[...]

> > > +					S32_EXT(SENSOR_RES_EXP(ares));
> > > +				dsize += sizeof(adesc->resolution);
> > > +
> > > +				scmi_parse_range_attrs(&a->attrs,
> > > +						       &adesc->attrs);
> > > +				dsize += sizeof(adesc->attrs);
> > > +			}
> > > +
> > > +			adesc = (typeof(adesc))((u8 *)adesc + dsize);
> >
> > Just thinking if we can avoid this my having union comprising of v1 and v2
> > structures ?
> >
>
> Not sure to understand, axis_descr are only v3.0 and in fact this is
> called only for v > 2 I think, BUT the problem is that both this and the
> main sensor descriptor v3 msg payloads are runtime variable, so that it
> is stated in the msg->extended_attrs itself if that particular sensor desc
> response that I'm parsing has the additional extended fields or not:
> so the dance with dsize to keep track of where the current response ends
> and when the next starts...but maybe I've not got really what you meant.
>

No worries, we can always improve later if possible, you can keep it as
for now.

[...]

> > > +				 * retrieved via a dedicated (optional) command.
> > > +				 * Since the command is optional, on error carry
> > > +				 * on without any update interval.
> > > +				 */
> > > +				if (scmi_sensor_update_intervals(handle, s))
> > > +					dev_info(handle->dev,
> > > +						 "Update Intervals not available for sensor ID:%d\n",
> > > +						 s->id);
> >
> > Can we drop the logging or make it _dbg ? Make flood in a system with 100s of
> > sensors.
> >
>
> Sure, I was wondering in fact what to do with this: because the command
> is optional but it seemed odd to me that an SCMIv3.0 sensor does not
> expose any update interval so I wanted to log somehow this anomaly.
> (but maybe it's just not an anomaly)
>

Anything optional can never be anomaly, there is high chance that f/w
authors will drop it as it is optional unless it is absolutely necessary.

--
Regards,
Sudeep

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ