Re: linux-next: build failure after merge of the akpm-current tree

2020-12-22 Thread Kuan-Ying Lee
On Mon, 2020-12-21 at 13:55 +1100, Stephen Rothwell wrote: > Hi Kuan-Ying, > > On Mon, 21 Dec 2020 10:31:38 +0800 Kuan-Ying Lee > wrote: > > > > On Mon, 2020-12-21 at 13:10 +1100, Stephen Rothwell wrote: > > > > > > After merging the akpm-curr

Re: linux-next: build failure after merge of the akpm-current tree

2020-12-20 Thread Kuan-Ying Lee
On Mon, 2020-12-21 at 13:10 +1100, Stephen Rothwell wrote: > Hi all, > > After merging the akpm-current tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > mm/kasan/quarantine.c: In function 'quarantine_put': > mm/kasan/quarantine.c:207:15: error: 'info' undeclared (first

[PATCH v2 0/1] kasan: fix memory leak of kasan quarantine

2020-12-17 Thread Kuan-Ying Lee
uan-Ying Lee (1): kasan: fix memory leak of kasan quarantine mm/kasan/quarantine.c | 1 + 1 file changed, 1 insertion(+) -- 2.18.0

[PATCH v2 1/1] kasan: fix memory leak of kasan quarantine

2020-12-17 Thread Kuan-Ying Lee
ine per-cpu quarantine) Signed-off-by: Kuan-Ying Lee Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Andrew Morton Cc: Matthias Brugger Cc: [5.10-] --- mm/kasan/quarantine.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantin

Re: [PATCH 1/1] kasan: fix memory leak of kasan quarantine

2020-12-17 Thread Kuan-Ying Lee
On Tue, 2020-12-15 at 19:28 +0800, Kuan-Ying Lee wrote: > When cpu is going offline, set q->offline as true > and interrupt happened. The interrupt may call the > quarantine_put. But quarantine_put do not free the > the object. The object will cause memory leak. > > Add qli

[PATCH 1/1] kasan: fix memory leak of kasan quarantine

2020-12-15 Thread Kuan-Ying Lee
When cpu is going offline, set q->offline as true and interrupt happened. The interrupt may call the quarantine_put. But quarantine_put do not free the the object. The object will cause memory leak. Add qlink_free() to free the object. Signed-off-by: Kuan-Ying Lee Cc: Andrey Ryabinin

[PATCH 0/1] kasan: fix memory leak of kasan quarantine

2020-12-15 Thread Kuan-Ying Lee
When cpu is going offline, set q->offline as true and interrupt happened. The interrupt may call the quarantine_put. But quarantine_put do not free the the object. The object will cause memory leak. Add qlink_free() to free the object. Kuan-Ying Lee (1): kasan: fix memory leak of ka

[PATCH v4 0/1] Fix object remain in offline per-cpu quarantine

2020-12-07 Thread Kuan-Ying Lee
message Kuan-Ying Lee (1): kasan: fix object remain in offline per-cpu quarantine mm/kasan/quarantine.c | 39 +++ 1 file changed, 39 insertions(+) -- 2.18.0

[PATCH v4 1/1] kasan: fix object remain in offline per-cpu quarantine

2020-12-07 Thread Kuan-Ying Lee
r a cpu hotplug function to remove all objects in the offline per-cpu quarantine when cpu is going offline. Set a per-cpu variable to indicate this cpu is offline. Signed-off-by: Kuan-Ying Lee Signed-off-by: Zqiang Suggested-by: Dmitry Vyukov Reported-by: Guangye Yang Reviewed-by: Dmitry Vyukov Cc:

Re: [PATCH] kasan: fix slab double free when cpu-hotplug

2020-12-06 Thread Kuan-Ying Lee
On Mon, 2020-12-07 at 10:06 +0800, Kuan-Ying Lee wrote: > On Sat, 2020-12-05 at 17:09 -0800, Andrew Morton wrote: > > On Sun, 6 Dec 2020 00:17:15 +0800 Kuan-Ying Lee > > wrote: > > > > > On Fri, 2020-12-04 at 17:25 -0800, Andrew Morton wrote: > > > > O

Re: [PATCH] kasan: fix slab double free when cpu-hotplug

2020-12-06 Thread Kuan-Ying Lee
On Sat, 2020-12-05 at 17:09 -0800, Andrew Morton wrote: > On Sun, 6 Dec 2020 00:17:15 +0800 Kuan-Ying Lee > wrote: > > > On Fri, 2020-12-04 at 17:25 -0800, Andrew Morton wrote: > > > On Fri, 4 Dec 2020 20:01:35 +0800 Kuan-Ying Lee > > > wrote: >

Re: [PATCH] kasan: fix slab double free when cpu-hotplug

2020-12-05 Thread Kuan-Ying Lee
On Fri, 2020-12-04 at 17:25 -0800, Andrew Morton wrote: > On Fri, 4 Dec 2020 20:01:35 +0800 Kuan-Ying Lee > wrote: > > > > diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c > > > index d98b516f372f..55783125a767 100644 > > > --- a/mm/kasan/quarantine

Re: [PATCH] kasan: fix slab double free when cpu-hotplug

2020-12-04 Thread Kuan-Ying Lee
On Fri, 2020-12-04 at 18:22 +0800, qiang.zh...@windriver.com wrote: > From: Zqiang > > When a CPU offline, the per-cpu quarantine's offline be set true, > after this, if the quarantine_put be called in this CPU, the objects > will be free and return false, free objects doesn't to be done, due > t

Re: [PATCH v3 1/1] kasan: fix object remain in offline per-cpu quarantine

2020-12-03 Thread Kuan-Ying Lee
On Thu, 2020-12-03 at 12:28 -0800, Andrew Morton wrote: > On Thu, 3 Dec 2020 13:46:59 +0100 Andrey Konovalov > wrote: > > > > #define QLIST_INIT { NULL, NULL, 0 } > > > @@ -188,6 +190,11 @@ void quarantine_put(struct kasan_free_meta *info, > > > struct kmem_cache *cache) > > > local_ir

[PATCH v3 0/1] Fix object remain in offline per-cpu quarantine

2020-12-01 Thread Kuan-Ying Lee
Dmitry suggestion - Remove unnecessary code - Put offline variable into cpu_quarantine - Use single qlist_free_all call instead of iteration over all slabs - Add bug reporter in commit message Kuan-Ying Lee (1): kasan: fix object remain in offline per-cpu quarantine mm/kasan/quarantine.c | 40

[PATCH v3 1/1] kasan: fix object remain in offline per-cpu quarantine

2020-12-01 Thread Kuan-Ying Lee
r a cpu hotplug function to remove all objects in the offline per-cpu quarantine when cpu is going offline. Set a per-cpu variable to indicate this cpu is offline. Signed-off-by: Kuan-Ying Lee Suggested-by: Dmitry Vyukov Reported-by: Guangye Yang Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: An

Re: [PATCH v2 1/1] kasan: fix object remain in offline per-cpu quarantine

2020-11-19 Thread Kuan-Ying Lee
On Tue, 2020-11-17 at 08:13 +0100, Dmitry Vyukov wrote: > On Tue, Nov 17, 2020 at 7:46 AM Kuan-Ying Lee > wrote: > > > > On Mon, 2020-11-16 at 10:26 +0100, Dmitry Vyukov wrote: > > > On Mon, Nov 16, 2020 at 7:30 AM Kuan-Ying Lee > > > wrote: > > > >

Re: [PATCH v2 1/1] kasan: fix object remain in offline per-cpu quarantine

2020-11-16 Thread Kuan-Ying Lee
On Mon, 2020-11-16 at 10:26 +0100, Dmitry Vyukov wrote: > On Mon, Nov 16, 2020 at 7:30 AM Kuan-Ying Lee > wrote: > > > > We hit this issue in our internal test. > > When enabling generic kasan, a kfree()'d object is put into per-cpu > > quarantine first. If

[PATCH v2 0/1] Fix object remain in offline per-cpu quarantine

2020-11-15 Thread Kuan-Ying Lee
- Use single qlist_free_all call instead of iteration over all slabs - Add bug reporter in commit message Kuan-Ying Lee (1): kasan: fix object remain in offline per-cpu quarantine mm/kasan/quarantine.c | 35 +++ 1 file changed, 35 insertions(+) -- 2.18.0

[PATCH v2 1/1] kasan: fix object remain in offline per-cpu quarantine

2020-11-15 Thread Kuan-Ying Lee
r a cpu hotplug function to remove all objects in the offline per-cpu quarantine when cpu is going offline. Set a per-cpu variable to indicate this cpu is offline. Signed-off-by: Kuan-Ying Lee Suggested-by: Dmitry Vyukov Reported-by: Guangye Yang Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: An

Re: [PATCH 1/1] kasan: fix object remain in offline per-cpu quarantine

2020-11-15 Thread Kuan-Ying Lee
On Fri, 2020-11-13 at 08:03 +0100, Dmitry Vyukov wrote: > On Fri, Nov 13, 2020 at 3:32 AM Kuan-Ying Lee > wrote: > > > > On Thu, 2020-11-12 at 09:39 +0100, Dmitry Vyukov wrote: > > > On Thu, Nov 12, 2020 at 7:25 AM Kuan-Ying Lee > > > wrote: > > > >

Re: [PATCH 1/1] kasan: fix object remain in offline per-cpu quarantine

2020-11-12 Thread Kuan-Ying Lee
On Thu, 2020-11-12 at 09:39 +0100, Dmitry Vyukov wrote: > On Thu, Nov 12, 2020 at 7:25 AM Kuan-Ying Lee > wrote: > > > > We hit this issue in our internal test. > > When enabling generic kasan, a kfree()'d object is put into per-cpu > > quarantine first. If

[PATCH 0/1] Fix objects remain in the offline per-cpu quarantine

2020-11-11 Thread Kuan-Ying Lee
error. Register a cpu hotplug function to remove all objects in the offline per-cpu quarantine when cpu is going offline. Set a per-cpu variable to indicate this cpu is offline. Kuan-Ying Lee (1): kasan: fix object remain in offline per-cpu quarantine mm/kasan/quarantine.c | 59

[PATCH 1/1] kasan: fix object remain in offline per-cpu quarantine

2020-11-11 Thread Kuan-Ying Lee
r a cpu hotplug function to remove all objects in the offline per-cpu quarantine when cpu is going offline. Set a per-cpu variable to indicate this cpu is offline. Signed-off-by: Kuan-Ying Lee --- mm/kasan/quarantine.c | 59 +-- 1 file changed, 57 insertions(