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-next>] [day] [month] [year] [list]
Message-ID: <20210930162618.0c53ec33@jic23-huawei>
Date:   Thu, 30 Sep 2021 16:26:18 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Andriy Tryshnivskyy <andriy.tryshnivskyy@...nsynergy.com>
Cc:     jbhayana@...gle.com, lars@...afoo.de, linux-iio@...r.kernel.org,
        linux-kernel@...r.kernel.org, Vasyl.Vavrychuk@...nsynergy.com
Subject: Re: [PATCH 1/1] iio/scmi: Add reading "raw" attribute.


> >> +             /* Use 32-bit value, since practically there is no need in 64 bits */
> >> +             *val = (u32)readings[ch->scan_index].value;  
> > We should check it fits and if doesn't return an error rather than pretending all was fine.
> >  
> What kind of error to return in the case it does not fit - ENOEXEC (Exec format error) ?

That one is a bit obscure.

I'd go with either -ERANGE I think as we are reflecting that the clamp to 32 bit
is not representable.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ