Re: [PATCH] livepatch: robustify klp_register_patch() API error checking

2016-04-07 Thread Jiri Kosina
On Thu, 7 Apr 2016, Jiri Kosina wrote: > From: Jiri Kosina > > Commit 425595a7fc20 ("livepatch: reuse module loader code to write > relocations") adds a possibility of dereferncing pointers supplied by the > consumer of the livepatch API before sanity (NULL) checking them

Re: [PATCH] livepatch: robustify klp_register_patch() API error checking

2016-04-07 Thread Jiri Kosina
On Thu, 7 Apr 2016, Jiri Kosina wrote: > From: Jiri Kosina > > Commit 425595a7fc20 ("livepatch: reuse module loader code to write > relocations") adds a possibility of dereferncing pointers supplied by the > consumer of the livepatch API before sanity (NULL) checking them (patch > and

Re: [PATCH] livepatch: robustify klp_register_patch() API error checking

2016-04-07 Thread Josh Poimboeuf
On Thu, Apr 07, 2016 at 06:06:25PM +0200, Jiri Kosina wrote: > From: Jiri Kosina > > Commit 425595a7fc20 ("livepatch: reuse module loader code to write > relocations") adds a possibility of dereferncing pointers supplied by the > consumer of the livepatch API before sanity

Re: [PATCH] livepatch: robustify klp_register_patch() API error checking

2016-04-07 Thread Josh Poimboeuf
On Thu, Apr 07, 2016 at 06:06:25PM +0200, Jiri Kosina wrote: > From: Jiri Kosina > > Commit 425595a7fc20 ("livepatch: reuse module loader code to write > relocations") adds a possibility of dereferncing pointers supplied by the > consumer of the livepatch API before sanity (NULL) checking them

[PATCH] livepatch: robustify klp_register_patch() API error checking

2016-04-07 Thread Jiri Kosina
From: Jiri Kosina Commit 425595a7fc20 ("livepatch: reuse module loader code to write relocations") adds a possibility of dereferncing pointers supplied by the consumer of the livepatch API before sanity (NULL) checking them (patch and patch->mod). Spotted by smatch tool.

[PATCH] livepatch: robustify klp_register_patch() API error checking

2016-04-07 Thread Jiri Kosina
From: Jiri Kosina Commit 425595a7fc20 ("livepatch: reuse module loader code to write relocations") adds a possibility of dereferncing pointers supplied by the consumer of the livepatch API before sanity (NULL) checking them (patch and patch->mod). Spotted by smatch tool. Reported-by: Dan