Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4463865pxf; Tue, 16 Mar 2021 14:18:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJUUNaTpQQBPf+1bGuo+uOTO+sNOkCqIIb1tL4t8x7rp2DLgtwNfBq88QYM7grRaundGZt X-Received: by 2002:a05:6402:5255:: with SMTP id t21mr38581018edd.91.1615929527675; Tue, 16 Mar 2021 14:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615929527; cv=none; d=google.com; s=arc-20160816; b=xAZVE//ERIX67OBWRu/8szwlfYP9xZXK9UHf/C429t0oea4k23kRkMm1TAh6wVbnCx G1C9IxfW5Zd0dUZuGE8AcID0WXA/4rcxC2hRWis+Z3WLI+JtEKNZ233iJ5N9xylTSuHP G8CBpo4qORv/RA7pHLC1+9ca6WtmLBysgiuAgoxORRGrUOSYRM8S1Zd1tXwXXQIKzPBW YXMllxa5ZZ+IXm+XCHs/toOY4PHOtOQ9BV6Q7iCwIad1/ILuKAQ3VWCBl1LYxuKqCUVk 5hmEjSCxTnEA7K/e2duK+ewu/aVZ07f+gPKJgUZufvPKKQXmcdeq3chyN2PQkUyirUI5 oLzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=et+8M4fnfpbY0GeGG05MXy/pGLb3+RZRFKGCfdaC3Sc=; b=EL/Z3Hwtuicxt5FZqTFhwM9Baw2jz4GMVJMuKzUBsJOVldNtBUvmqaoT/S7IVtOhe2 k1uRcPH7l0rxkZbCjRkyHjoh7fRf83G4ZWrGguBXt3T8ZSSZCGIoSUCVdRXdmCMZYHzh gHE4FP7H41I7ililqBRljD6uwf29KP9gTNTIPCYkoULoPJhOIN37u9VWKe5h2NURJ2w6 CNLHhNMrMIDr70/IViq4lDhjAnaL5sk5jETUY5cklTWCaafL0gH+06hTqDwUDWfB1Q7y n72KtSbzAwOnrLPib0F+cbtYYSf7GURmWj6GkhQJz1NHQLMn9MaRAsbrpw7073Mm7WQw cUQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dRepZzYg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bz20si2412931ejc.70.2021.03.16.14.18.25; Tue, 16 Mar 2021 14:18:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dRepZzYg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239452AbhCPRzk (ORCPT + 99 others); Tue, 16 Mar 2021 13:55:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23354 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239451AbhCPRzI (ORCPT ); Tue, 16 Mar 2021 13:55:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615917307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=et+8M4fnfpbY0GeGG05MXy/pGLb3+RZRFKGCfdaC3Sc=; b=dRepZzYg9PffAi9n/MCR37OApoL+T18R/mBWoaZJH/9XjjlvVMLb1eAKmINFOuwVXrSFIE AMYHy4wAJLvZzwqk1I1vuzYtlF2Usr5h9ubFvBm/5CAH2C4Q6JU1aRI//W4oP5Ypo+Nnhc BLvepVxQ2Uy5YbJms3CWkKvxJfHDDuQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-525-X_-hKvDyOCOief-DATOHdQ-1; Tue, 16 Mar 2021 13:55:03 -0400 X-MC-Unique: X_-hKvDyOCOief-DATOHdQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2E413760C7; Tue, 16 Mar 2021 17:55:01 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.40.192.135]) by smtp.corp.redhat.com (Postfix) with SMTP id 744255D9C0; Tue, 16 Mar 2021 17:54:57 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Tue, 16 Mar 2021 18:55:00 +0100 (CET) Date: Tue, 16 Mar 2021 18:54:56 +0100 From: Oleg Nesterov To: Walter Wu Cc: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Matthias Brugger , Andrey Konovalov , Andrew Morton , Jens Axboe , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, wsd_upstream , linux-mediatek@lists.infradead.org Subject: Re: [PATCH v2] task_work: kasan: record task_work_add() call stack Message-ID: <20210316175455.GA25881@redhat.com> References: <20210316024410.19967-1-walter-zh.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210316024410.19967-1-walter-zh.wu@mediatek.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/16, Walter Wu wrote: > > --- a/kernel/task_work.c > +++ b/kernel/task_work.c > @@ -34,6 +34,9 @@ int task_work_add(struct task_struct *task, struct callback_head *work, > { > struct callback_head *head; > > + /* record the work call stack in order to print it in KASAN reports */ > + kasan_record_aux_stack(work); > + > do { > head = READ_ONCE(task->task_works); > if (unlikely(head == &work_exited)) Acked-by: Oleg Nesterov