Re: [PATCH] resource: Fix integer overflow at reallocation

2018-04-05 Thread Ram Pai
ve the check into > resource_contains(). > > My concern is, however, that the resource validity check isn't a job > of resource_contains(). OTOH, this may avoid other similar cases, so > it might be worth. > > In anyway, if there is no objection, and anyone else doesn't wa

Re: [PATCH] resource: Fix integer overflow at reallocation

2018-04-05 Thread Ram Pai
ve the check into > resource_contains(). > > My concern is, however, that the resource validity check isn't a job > of resource_contains(). OTOH, this may avoid other similar cases, so > it might be worth. > > In anyway, if there is no objection, and anyone else doesn't want

Re: [PATCH] resource: Fix integer overflow at reallocation

2018-04-05 Thread Takashi Iwai
e is needed. Maybe not. FWIW, below is the revised one to move the check into resource_contains(). My concern is, however, that the resource validity check isn't a job of resource_contains(). OTOH, this may avoid other similar cases, so it might be worth. In anyway, if there is no objection, and a

Re: [PATCH] resource: Fix integer overflow at reallocation

2018-04-05 Thread Takashi Iwai
e is needed. Maybe not. FWIW, below is the revised one to move the check into resource_contains(). My concern is, however, that the resource validity check isn't a job of resource_contains(). OTOH, this may avoid other similar cases, so it might be worth. In anyway, if there is no objectio

Re: [PATCH] resource: Fix integer overflow at reallocation

2018-04-04 Thread Sasha Levin
Hi Takashi Iwai. [This is an automated email] This commit has been processed because it contains a "Fixes:" tag. fixing commit: 23c570a67448 resource: ability to resize an allocated resource. The bot has also determined it's probably a bug fixing patch. (score: 99.2157) The bot has tested the

Re: [PATCH] resource: Fix integer overflow at reallocation

2018-04-04 Thread Sasha Levin
Hi Takashi Iwai. [This is an automated email] This commit has been processed because it contains a "Fixes:" tag. fixing commit: 23c570a67448 resource: ability to resize an allocated resource. The bot has also determined it's probably a bug fixing patch. (score: 99.2157) The bot has tested the

Re: [PATCH] resource: Fix integer overflow at reallocation

2018-04-02 Thread Takashi Iwai
On Mon, 02 Apr 2018 21:09:03 +0200, Ram Pai wrote: > > On Mon, Apr 02, 2018 at 09:16:16AM +0200, Takashi Iwai wrote: > > We've got a bug report indicating a kernel panic at booting on an > > x86-32 system, and it turned out to be the invalid resource assigned > > after reallocation.

Re: [PATCH] resource: Fix integer overflow at reallocation

2018-04-02 Thread Takashi Iwai
On Mon, 02 Apr 2018 21:09:03 +0200, Ram Pai wrote: > > On Mon, Apr 02, 2018 at 09:16:16AM +0200, Takashi Iwai wrote: > > We've got a bug report indicating a kernel panic at booting on an > > x86-32 system, and it turned out to be the invalid resource assigned > > after reallocation.

Re: [PATCH] resource: Fix integer overflow at reallocation

2018-04-02 Thread Ram Pai
On Mon, Apr 02, 2018 at 09:16:16AM +0200, Takashi Iwai wrote: > We've got a bug report indicating a kernel panic at booting on an > x86-32 system, and it turned out to be the invalid resource assigned > after reallocation. __find_resource() first aligns the resource start > address and resets the

Re: [PATCH] resource: Fix integer overflow at reallocation

2018-04-02 Thread Ram Pai
On Mon, Apr 02, 2018 at 09:16:16AM +0200, Takashi Iwai wrote: > We've got a bug report indicating a kernel panic at booting on an > x86-32 system, and it turned out to be the invalid resource assigned > after reallocation. __find_resource() first aligns the resource start > address and resets the

[PATCH] resource: Fix integer overflow at reallocation

2018-04-02 Thread Takashi Iwai
We've got a bug report indicating a kernel panic at booting on an x86-32 system, and it turned out to be the invalid resource assigned after reallocation. __find_resource() first aligns the resource start address and resets the end address with start+size-1 accordingly, then checks whether it's

[PATCH] resource: Fix integer overflow at reallocation

2018-04-02 Thread Takashi Iwai
We've got a bug report indicating a kernel panic at booting on an x86-32 system, and it turned out to be the invalid resource assigned after reallocation. __find_resource() first aligns the resource start address and resets the end address with start+size-1 accordingly, then checks whether it's