From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1CD4C64E7B for ; Tue, 1 Dec 2020 14:04:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 33403206A5 for ; Tue, 1 Dec 2020 14:04:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Vnhv1CDJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="QfxTVBHw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33403206A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ga5Qyja7+CkmcLrGQYlYmo780WuPjm9LB+/KXMFRkFU=; b=Vnhv1CDJwCs8KgtW8tHOVTsVo 3IeV+BHA3+VXm6kbK7ybwRfbiOkbXuJSeX4ae4k/O3AY4ILC5y+m5dHTz5tsvTklO7ZeffvTGOztR eqCFnHYeNz26d5/ktDMKa5PFt5bc7xC8DDBTtovNbekLMjPrMJFiySWj07fJoCyaR9/ihG2YY3zgs 46zABx6xhudH/5FEaoETQsNocdsn6xz0BXWuyeSoe8k0UScyO/KhAplKA/T0qzOBoVbFkD3PKKEfS +onu0y7zUDmJVQOfkDGE5AUoW6ooJAPCuAM6CKBO21baxy4LVkXaJfBRPUbbAmxyYssJioZMdktBg CvZ9vscmw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kk6F7-00046w-Nw; Tue, 01 Dec 2020 14:02:57 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kk6F4-00044j-5Q for linux-arm-kernel@lists.infradead.org; Tue, 01 Dec 2020 14:02:55 +0000 Received: by mail-qt1-x843.google.com with SMTP id 7so1141146qtp.1 for ; Tue, 01 Dec 2020 06:02:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DowCnJV0jJLxqPNhupVbMRSWGm+7uLhFQL0+P+g8v1E=; b=QfxTVBHwfLM/RTcmqP7qAGpmN8zoVJZN3uVb3RgA5Zx6sxjFNx9EX61ScUd2ihRp4m IdIO8X60HUdYF7hm3ofecC6QYqNf7d8muHij1SlMtLgd2Uu98smcn7rsSbLEuBI1yZaE JfXW2GDH+VbiCeMRXOq3jTxLpXlL75zY6XJi/8YsFmowA+aWUc2r0smb/Cud0R5TESMz UKTvjJFJ2Uzuo8VET0aad5u3KWz1pZDiJBa+PmpH7H3MsNS0eGRCFHTOV4G2j1Ie/uLg K+Ezx1gxo/gVWFntyD09ZoPaoloXkC8XQK+bR/543ckQKwNGj1sOvp73JdkaQx5vWrZX AnLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DowCnJV0jJLxqPNhupVbMRSWGm+7uLhFQL0+P+g8v1E=; b=aJqc3jLXX/KF544UMLVY8TAR2Z5qw4kDrPJRDm8plHe3ohxLKXnGkNuseTEadAN3cO L6cMvAwQwug9aoA9XW/7sjYaN48DCCuSeCvhTwxQun53MnQD2i6y0H212GfFk04ekKF8 KYJaFohAmoWdI9bPq5DIVp+HMS2/Sukue8LbyzbnVUB0PnTlzsv4Wbydtkk2GJJFJm1x IyYSeVVG3sgN4r5+M9o/iWU7ceNGv4PlLghY0xo0MT7h98WQpgJekAa40gW2T2TeDuHb sTVXdrAqvKsrHOZP4gL68aaxzKbPuG92EAVOxDTZwmiV8T/ipU2Lj2zsv9cBNnjlqRKF g8Xg== X-Gm-Message-State: AOAM5319u8lBo0qbN953H1GNQiHZowHqA7Yfy2OZc1oZLvUQj8RpTV4m g0z1Hoe46nt27ImPdY19xCyDSSDRRhjeNpQZDZRg8w== X-Google-Smtp-Source: ABdhPJxVr8e6IHqhxlpV/01xGGsXjC2Dt2bzhkooYsHv2mXQAPjcqkx/kLcjhAP7zSaTMnzLAHC47gA77xRhDBnFRuo= X-Received: by 2002:aed:2664:: with SMTP id z91mr2947243qtc.290.1606831369999; Tue, 01 Dec 2020 06:02:49 -0800 (PST) MIME-Version: 1.0 References: <20200924040152.30851-1-walter-zh.wu@mediatek.com> <87h7rfi8pn.fsf@nanos.tec.linutronix.de> <1606821422.6563.10.camel@mtksdccf07> In-Reply-To: <1606821422.6563.10.camel@mtksdccf07> From: Dmitry Vyukov Date: Tue, 1 Dec 2020 15:02:38 +0100 Message-ID: Subject: Re: [PATCH v4 0/6] kasan: add workqueue and timer stack for generic KASAN To: Walter Wu X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201201_090254_262624_7E0705C2 X-CRM114-Status: GOOD ( 23.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marco Elver , wsd_upstream , Linux-MM , Stephen Boyd , Alexander Potapenko , Lai Jiangshan , LKML , kasan-dev , Matthias Brugger , linux-mediatek@lists.infradead.org, John Stultz , Andrey Konovalov , Tejun Heo , Andrey Ryabinin , Thomas Gleixner , Andrew Morton , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Dec 1, 2020 at 12:17 PM Walter Wu wrote: > > Hi Dmitry, > > On Tue, 2020-12-01 at 08:59 +0100, 'Dmitry Vyukov' via kasan-dev wrote: > > On Wed, Sep 30, 2020 at 5:29 PM Thomas Gleixner wrote: > > > > > > On Thu, Sep 24 2020 at 12:01, Walter Wu wrote: > > > > Syzbot reports many UAF issues for workqueue or timer, see [1] and [2]. > > > > In some of these access/allocation happened in process_one_work(), > > > > we see the free stack is useless in KASAN report, it doesn't help > > > > programmers to solve UAF on workqueue. The same may stand for times. > > > > > > > > This patchset improves KASAN reports by making them to have workqueue > > > > queueing stack and timer stack information. It is useful for programmers > > > > to solve use-after-free or double-free memory issue. > > > > > > > > Generic KASAN also records the last two workqueue and timer stacks and > > > > prints them in KASAN report. It is only suitable for generic KASAN. > > > > Walter, did you mail v5? > > Checking statuses of KASAN issues and this seems to be not in linux-next. > > > > Sorry for the delay in responding to this patch. I'm busy these few > months, so that suspend processing it. > Yes, I will send it next week. But v4 need to confirm the timer stack is > useful. I haven't found an example. Do you have some suggestion about > timer? Good question. We had some use-after-free's what mention call_timer_fn: https://groups.google.com/g/syzkaller-bugs/search?q=%22kasan%22%20%22use-after-free%22%20%22expire_timers%22%20%22call_timer_fn%22%20 In the reports I checked call_timer_fn appears in the "access" stack rather in the "free" stack. Looking at these reports I cannot conclude that do_init_timer stack would be useful. I am mildly leaning towards not memorizing do_init_timer stack for now (until we have clear use cases) as the number of aux stacks is very limited (2). _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel