On Fri, Sep 1, 2023 at 5:24 AM Rob Landley wrote:
>
> On 8/31/23 13:38, Michael Shavit wrote:
> > On Thu, Aug 31, 2023 at 8:26 PM Michael Shavit wrote:
> >>
> >> On Thu, Aug 31, 2023 at 6:57 PM Rob Landley wrote:
> >> >
> >> >// DATA? Report out of range values as errors rather than truncati
On Fri, Sep 1, 2023 at 5:13 AM Rob Landley wrote:
>
> On 8/31/23 07:26, Michael Shavit wrote:
> > On Thu, Aug 31, 2023 at 6:57 PM Rob Landley wrote:
> >> Could you send me the test case you hit that motivated this change? (I
> >> haven't
> >> got a tests/devmem.test yet and am not 100% sure how
On 8/31/23 13:38, Michael Shavit wrote:
> On Thu, Aug 31, 2023 at 8:26 PM Michael Shavit wrote:
>>
>> On Thu, Aug 31, 2023 at 6:57 PM Rob Landley wrote:
>> >
>> >// DATA? Report out of range values as errors rather than truncating.
>> > - if (writing) data = atolx_range(toys.optargs[2], 0,
On 8/31/23 07:26, Michael Shavit wrote:
> On Thu, Aug 31, 2023 at 6:57 PM Rob Landley wrote:
>> Could you send me the test case you hit that motivated this change? (I
>> haven't
>> got a tests/devmem.test yet and am not 100% sure how I'd even set that up in
>> mkroot under qemu, but I should work
Replace the left-shift method of computing the maximum allowed write as
it may exibit undefined behavior.
Add and use an unsigned version of atolx to support writing any 64bit
value.
* When bytes equals 8, devmem will left-shift an unsigned long long by
64 bits which is undefined behavior if siz
On Thu, Aug 31, 2023 at 6:57 PM Rob Landley wrote:
>
> On 8/31/23 02:00, Michael Shavit wrote:
> > Replace the left-shift method of computing the maximum allowed write as
> > it may exibit undefined behavior.
> > Add and use an unsigned version of atolx to support writing any 64bit
> > value.
> >
On Thu, Aug 31, 2023 at 8:26 PM Michael Shavit wrote:
>
> On Thu, Aug 31, 2023 at 6:57 PM Rob Landley wrote:
> >
> >// DATA? Report out of range values as errors rather than truncating.
> > - if (writing) data = atolx_range(toys.optargs[2], 0, (1ULL<<(8*bytes))-1);
> > + if (writing && (dat
On 8/31/23 02:00, Michael Shavit wrote:
> Replace the left-shift method of computing the maximum allowed write as
> it may exibit undefined behavior.
> Add and use an unsigned version of atolx to support writing any 64bit
> value.
>
> * When bytes equals 8, devmem will left-shift an unsigned long