Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2019175pxb; Fri, 29 Jan 2021 10:48:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLqpdunjeMdU+pCSZcqtvm5PghBtd0s6smQsgLLrI6c7JCS2iiI8eqogCPff5J68ufjojZ X-Received: by 2002:a05:6402:4382:: with SMTP id o2mr6877357edc.371.1611946110042; Fri, 29 Jan 2021 10:48:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611946110; cv=none; d=google.com; s=arc-20160816; b=HJlu5ddhuDTIv8XkW6inBfaq1zWn9a3axIxOwXg2CzZezbqOcAbSr87FC//yw+Saxh g4bkN7Eqbag7wdbNguDw9xtNtDvGIhd9+5C0EgeYJS6BWHQnNHIgDTRc08KRI7rAvghX QqCRmnDhSx3kKGiO9+CpnV3X+dhcW3zGdCZ2D9HZc9TCvhGPdXKkynQrAQfP16b4eu+c safUUN1FsOUtcSvnPV1femEeDbds9UPKgYthYgiM7jtceiYpQiUQNzI2SCg5wfesc654 KuUcQYu4XL5Xk94YmzYeMAglbATxT5faTODnYO2/7jMR5jn8fVxz8lkdKw7fcb9wkVy1 Nnjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yfdPqJx+KOQg2lShAaFTUWcq3owFmz8E/slr0pFcBmE=; b=NE+pxnaVJb4JXLlVrbPakles1rVsht07/i4e9UaCAgszTArHvNKpgeF2JAl0IpMf9c 1oGhhPXEqN5RGItYYcIRJIkxqO08FQA81BvqXiwiRNoRLcodmCSPcHx9nNHVtieTazrE 7OGsUtC+78K+D3ri0bS6yJ8tvjeMfD9cOaMoGAe1pJSO9uG3EYRTeWpqEfiT0MoEilJ6 /Vtmj64+2HR6yTL/UU5iVnpeM2001NfTRMOS4c0iM+Vq+hm4d6zvfQrEnW3JnD3gAwmM qELSq2Z7AWbRuTkiHPqWwMk95xORkctxIeahncZmwvMpWr8zBPU0RxlkQc0Iv5A3WztW 6LPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LvbHs1K3; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d24si5418500ejc.491.2021.01.29.10.48.05; Fri, 29 Jan 2021 10:48:30 -0800 (PST) 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=@google.com header.s=20161025 header.b=LvbHs1K3; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232600AbhA2SpE (ORCPT + 99 others); Fri, 29 Jan 2021 13:45:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232326AbhA2SpB (ORCPT ); Fri, 29 Jan 2021 13:45:01 -0500 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3CDFC061573 for ; Fri, 29 Jan 2021 10:44:20 -0800 (PST) Received: by mail-pf1-x42b.google.com with SMTP id j12so6765005pfj.12 for ; Fri, 29 Jan 2021 10:44:20 -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=yfdPqJx+KOQg2lShAaFTUWcq3owFmz8E/slr0pFcBmE=; b=LvbHs1K3KA/Nx3RiGSIjXK/ab1PfIUEpOQh9qka8x8enT+UNLde8PcY1sksM1mWIF1 84K85322CqchXlF47QRppXOVkRdgkIKvJtRuRQrgc8noxXP1wjI+tyEcM5AmDAlsQEtS wRO5qdeFB1HMkfuRtLUi90ut5qY8wwrxYJppgA9KHRfh5mQy9YrwZvnFkeLeMCHSgo2A UezJ3yGZ8BRwJKSxgeNM9sUWj+B6g4KIO/T7LgK5ZVDBBjqLeubaL1cEo8zs1Fy1Jlw/ k5wq+y5MVYyoyDdg3yi0v7B5rlui0CzXOkyXyUAASlyTB7V7HTCYd36Fv8L391nBmPcG mG1g== 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=yfdPqJx+KOQg2lShAaFTUWcq3owFmz8E/slr0pFcBmE=; b=TxTzI9/9UA5iSQlk8VhIR83D/JHBpEudbQWbVDl2GqEt0u+OJS0A7OM0x1C/HLAsIf hPrWjPnndj1fQD+502zOGIUyEpTO0jQA6WtBx7207Rn2YiN3mKL65JeLbdEyILYv9YA6 t4k3QgdKn1wme+t48bac0Bk17VlkwS4QFnZZm6FvFZ6ked4LUXqlNdrP3Ak5XJg9sq7q rN3YVLxVSlMbtQ3bKnSmDHf9JK5byzwDrhc1an6/TmmZYJBDGdGwwwyKbmb8Rk8shuey AnRHfz1TjTFjMBMecJucUWlUIdG+fYodT10f3qg1Rh4XV8ghcl2mQBJXKlctx+1LTFdL F8wQ== X-Gm-Message-State: AOAM531o0YzEjjeC6HXBFCBADskM7N6wC9aqiD7DkcvAq877GPAismsh 8Iq6Jxb8ZfXCTGg3PuN0Jy3LCHJT5c+BtqHqz3Jo3g== X-Received: by 2002:a05:6a00:1:b029:1c1:2d5f:dc16 with SMTP id h1-20020a056a000001b02901c12d5fdc16mr5488629pfk.55.1611945860133; Fri, 29 Jan 2021 10:44:20 -0800 (PST) MIME-Version: 1.0 References: <20210126134603.49759-1-vincenzo.frascino@arm.com> <20210126134603.49759-4-vincenzo.frascino@arm.com> <8021dbc4-8745-2430-8d52-6236ae8c47c7@arm.com> In-Reply-To: <8021dbc4-8745-2430-8d52-6236ae8c47c7@arm.com> From: Andrey Konovalov Date: Fri, 29 Jan 2021 19:44:08 +0100 Message-ID: Subject: Re: [PATCH v9 3/4] kasan: Add report for async mode To: Vincenzo Frascino Cc: Alexander Potapenko , Branislav Rankov , Marco Elver , Catalin Marinas , Evgenii Stepanov , LKML , kasan-dev , Dmitry Vyukov , Andrey Ryabinin , Andrew Morton , Will Deacon , Linux ARM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 29, 2021 at 7:42 PM Vincenzo Frascino wrote: > > Hi Andrey, > > On 1/29/21 6:16 PM, Vincenzo Frascino wrote: > > What I meant is instead of: > > > > if (addr) trace_error_report_end(...); > > > > you might want to do: > > > > if (!IS_ENABLED(CONFIG_KASAN_HW_TAGS)) trace_error_report_end(...); > > > > because, could make sense to trace 0 in other cases? > > > > I could not find the implementation of trace_error_report_end() hence I am not > > really sure on what it does. > > I figured it out how trace_error_report_end() works. It's intended for collecting crashes for CONFIG_KASAN_HW_TAGS. > And in doing that I > realized that the problem is sync vs async, hence I agree with what you are > proposing: > > if (addr) trace_error_report_end(...); > > I will post v10 shortly. If we want to trace the async mode we can improve it in > -rc1. Sounds good, thanks!