Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4271824pxf; Tue, 16 Mar 2021 09:25:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3rZNbU+2ZCJ0ZaGECOfOctXPXl9cg9kX/mB6q0D4ZT7E6tbRmLMiJ7uVDyFOyYcvC7BLW X-Received: by 2002:a17:906:8447:: with SMTP id e7mr31299427ejy.523.1615911907415; Tue, 16 Mar 2021 09:25:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615911907; cv=none; d=google.com; s=arc-20160816; b=UDJkt/pIrAKO+sDBiBjWUCDQneWMBuYCLbYt1nWxXV0N26vZIzWUIUYlfEU8o0C1oR mpzKv2PWNRpLCIZqYxFsaOBD8OuodvRudRDG2xBFSsCORuWTSDUEBznbhWv5L3vZnQy5 TSYMycEoinm9jAaBDvApPVazFe/2hIxM4lzLlWf7uiugyVTZYhb0xVUACxLEXBvpJg2C nXi5STyuC3unLUnIpaMgJ/mhSiLNKbm5HapmSKarvIofbNWiVZt7dbh0USH1qZmoSNjt oUQrMaOFby/R0KZhiTz5HJ/o3MvRC62Ae25s/yvbQTnzX04a1qtYv9O6iJhO57doFaDQ I1Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=q/7bUx2ojAKrW6WgffbugKW8m/FPOBCZYXbC80AEUMc=; b=JL6e+5hnzl6sFVL3ZPR8sxRO9nTHtUUtcNpqONsXRLNiSrfGcCY5xgxg3WPROGwB9s TMf3PSKPPl9DvN4zgBc/11eCytpbfQFfhNDCc2lLUd24zL0jcIO4Zy5MhVRSmIwFvvbp y+xYQFH5TR1bR2lX9lFatpI1kdwUF9+qBvj5p3uX1p9Z7DouojIM7jXcltCpi+NZdYJa ezZUHYIGn47UJW4BU5ilAE1k5YtSg7yuDQ/J7CmNpXdcOIoaFges45bw1/ArKROEVLH5 uhCRgHiuCdv4YkKpBtZXG2eIanBp0iN0yXDHgMocrVLd4rX/HUMS68/G/4MKf1Yyub9i Oyuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=z76CH+We; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hc39si14627393ejc.125.2021.03.16.09.24.43; Tue, 16 Mar 2021 09:25:07 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=z76CH+We; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235180AbhCPOdv (ORCPT + 99 others); Tue, 16 Mar 2021 10:33:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233532AbhCPOdW (ORCPT ); Tue, 16 Mar 2021 10:33:22 -0400 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43413C06174A for ; Tue, 16 Mar 2021 07:33:22 -0700 (PDT) Received: by mail-io1-xd2a.google.com with SMTP id n132so37380807iod.0 for ; Tue, 16 Mar 2021 07:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=q/7bUx2ojAKrW6WgffbugKW8m/FPOBCZYXbC80AEUMc=; b=z76CH+WeqlQ+pu7RK+WzjqujAOQ6/CmXvi4GjO0DCt3fs5AYzWpny3D1bjIokaY/pC JA3rYTf4VVtgGp3EdjZ78U9ODvIVKbq5hBBWF6VDrqqVuGrScMLGFVToGl3B+E+njJGO QpvtNAWnjUJUakiX5mY5bypyERM2o3TTfIa79bYsVMew23xqPtea7cPnWoQ1QtEPI63C coIscGADK9JfYQyGe6Qv9ozlIFwHwszMW50AXhUyBVEAnaSM6GiEfoq6xEI9668T9t5M 8o1IFbAf89Mf+YxlXhe0kYgymsD+N4lCX0jPg8BfgvJdzlYX/UwHVXE9PaQusIxkVlmF uy8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=q/7bUx2ojAKrW6WgffbugKW8m/FPOBCZYXbC80AEUMc=; b=TIpCgaelGWLjsJtLXUSZLjmOZ6RrBvqNN1dMCsH5kWm5vYImGlNN1BQFhdGMaBxx34 iRrWrQqB+xyavu3jPGSSz5AaEe+ASvJ+qBzS1CafJOAjYH1WYk3GZbDDWwNC+r03uE0F bPhb/oVCy0/lvyq3qydGm6zwhcWX8auV7JouKcto/Et3QlBB9IimmaIctj3xXnaSgxRi Fte3Yv1WXY8GirEFNcQSrn+IFFXOUpHH3AZ9ToTnH0W+r96HIzYppbI+uyEZC69UmDut Vm9qCimI94xRNDjjtM+4m8UIBtrlZFXZyuEF4SdyHuZZnhz0xWd0i7u+Nn1OdhDljVeE r9Xw== X-Gm-Message-State: AOAM5337NYb3lQicu0gnStUR24KCidZmPG3TJ/ktvDPa43JUhlxfcNNq Dianu14PNM6Gw6S2dZd6DeUIXw== X-Received: by 2002:a5e:8d05:: with SMTP id m5mr3570773ioj.114.1615905201756; Tue, 16 Mar 2021 07:33:21 -0700 (PDT) Received: from [192.168.1.30] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id d22sm8423199iof.48.2021.03.16.07.33.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Mar 2021 07:33:21 -0700 (PDT) Subject: Re: [PATCH v2] task_work: kasan: record task_work_add() call stack To: Walter Wu , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Matthias Brugger , Andrey Konovalov , Andrew Morton , Oleg Nesterov Cc: 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 References: <20210316024410.19967-1-walter-zh.wu@mediatek.com> From: Jens Axboe Message-ID: <7d5b6e38-2e11-06f7-0a6b-356bdda0cd5b@kernel.dk> Date: Tue, 16 Mar 2021 08:33:20 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210316024410.19967-1-walter-zh.wu@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/15/21 8:44 PM, Walter Wu wrote: > Why record task_work_add() call stack? > Syzbot reports many use-after-free issues for task_work, see [1]. > After see the free stack and the current auxiliary stack, we think > they are useless, we don't know where register the work, this work > may be the free call stack, so that we miss the root cause and > don't solve the use-after-free. > > Add task_work_add() call stack into KASAN auxiliary stack in > order to improve KASAN report. It is useful for programmers > to solve use-after-free issues. I think this is a very useful addition, especially as task_work proliferates. Reviewed-by: Jens Axboe -- Jens Axboe