Re: [PATCH] of: address: Unify resource bounds overflow checking

2025-01-17 Thread Thomas Weißschuh
On Fri, Jan 17, 2025 at 12:23:53PM +0530, Basharath Hussain Khaja wrote: > >> >> Thomas Weißschuh writes: > >> >> > The members "start" and "end" of struct resource are of type > >> >> > "resource_size_t" which can be 32bit wide. > >> >> > Values read from OF however are always 64bit wide. > >> >>

Re: [PATCH] of: address: Unify resource bounds overflow checking

2025-01-16 Thread Basharath Hussain Khaja
>> >> Thomas Weißschuh writes: >> >> > The members "start" and "end" of struct resource are of type >> >> > "resource_size_t" which can be 32bit wide. >> >> > Values read from OF however are always 64bit wide. >> >> > >> >> > Refactor the diff overflow checks into a helper function. >> >> > Also

Re: [PATCH] of: address: Unify resource bounds overflow checking

2025-01-08 Thread Rob Herring
On Wed, Jan 8, 2025 at 8:04 AM Basharath Hussain Khaja wrote: > > Hi, > > >> Thomas Weißschuh writes: > >> > The members "start" and "end" of struct resource are of type > >> > "resource_size_t" which can be 32bit wide. > >> > Values read from OF however are always 64bit wide. > >> > > >> > Refac

Re: [PATCH] of: address: Unify resource bounds overflow checking

2025-01-08 Thread Basharath Hussain Khaja
Hi, >> Thomas Weißschuh writes: >> > The members "start" and "end" of struct resource are of type >> > "resource_size_t" which can be 32bit wide. >> > Values read from OF however are always 64bit wide. >> > >> > Refactor the diff overflow checks into a helper function. >> > Also extend the checks

Re: [PATCH] of: address: Unify resource bounds overflow checking

2024-09-13 Thread Michael Ellerman
Rob Herring writes: > On Fri, Sep 13, 2024 at 8:15 AM Michael Ellerman wrote: >> Thomas Weißschuh writes: >> > The members "start" and "end" of struct resource are of type >> > "resource_size_t" which can be 32bit wide. >> > Values read from OF however are always 64bit wide. >> > >> > Refactor t

Re: [PATCH] of: address: Unify resource bounds overflow checking

2024-09-13 Thread Rob Herring
On Fri, Sep 13, 2024 at 8:15 AM Michael Ellerman wrote: > > Thomas Weißschuh writes: > > The members "start" and "end" of struct resource are of type > > "resource_size_t" which can be 32bit wide. > > Values read from OF however are always 64bit wide. > > > > Refactor the diff overflow checks int

Re: [PATCH] of: address: Unify resource bounds overflow checking

2024-09-13 Thread Michael Ellerman
Thomas Weißschuh writes: > The members "start" and "end" of struct resource are of type > "resource_size_t" which can be 32bit wide. > Values read from OF however are always 64bit wide. > > Refactor the diff overflow checks into a helper function. > Also extend the checks to validate each calculat