Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1846676rdb; Mon, 9 Oct 2023 05:07:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECf/4z+HnPtS+apIBmuZsXX4XFNnrmPGumYsQ71fI/1skEFftYTiRWdxZhGHMUwcJiVcEr X-Received: by 2002:a17:902:d4c5:b0:1c5:6f4d:d6dd with SMTP id o5-20020a170902d4c500b001c56f4dd6ddmr18605062plg.24.1696853222304; Mon, 09 Oct 2023 05:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696853222; cv=none; d=google.com; s=arc-20160816; b=PshJ7JHwt+Y/bJrnMHmu8Bf/EOUO95MX8L+BZgJP0KoZ9Gs8rzS3WGDGe2jdZ8TG5S 6VYEhxPL8KKjKzD1BwH1Orf/JgvOMUp2EVsaQDc1/uMn0JqGchdbqU81T2sPS2VZ6fOV JJwSmMhABnUhtIcs3yIkGGtcD4djXfLdXPHl64HyWyj5BU846BREEXn9ZN9pJEwuBi4+ rPcXGtdf/RhEVwgS/BE7WXbr2u+PpbIi7rJzJVK5LdG3PyfKo0PPKEeKXct1qgr6EvGG lmkIOLMUcOjzi5HcZHVK7svcG/VrmfjC635hY2ZylcWDjM8VweGtJOkd/Z/wplDLJ0iz KAqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=2VY/6yygJv/miZhZ8h6odHp72SB3kIR4yZRTmobOqWU=; fh=D7uhrQnmQG6xf11gbvfi3iQ1A4p/6GZN4OQA8frEvwo=; b=J1MeDfWVshyCJ3GX1+utHVURAnTP0udmCCTvWEZxpEeugxrhTCJIjYXPuiVYEs65wQ S85/p8S85HSxjkR3GHEKrpWvdyto3m0yzPHQOm612WOSC9Uh5TKH/c0znFamfXDUh8q3 TcCNVU0JOpj/6LUWxVGqFv0l+I1s2pIYbXL3ruqYcNtgjGZBaJPPVR3vloBTUs7vozV6 D/ZM3t9H7cBg1wRALYbRzBAOxe0zZLDZwiPLL0C8ax2LgAInjhzK5rDx0Fhuv59zPWZo E7uJs2PaUkXpWlrZ9+iHXxuyv+TH83tMWAYi9SE9SxpwPM6Ti9cOHerowa55F/tBuD74 ALDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=2JiYUGmN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id r15-20020a63440f000000b00577723d24b0si9406664pga.46.2023.10.09.05.07.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 05:07:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=2JiYUGmN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9E8F18082852; Mon, 9 Oct 2023 05:06:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346466AbjJIMGA (ORCPT + 99 others); Mon, 9 Oct 2023 08:06:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346463AbjJIMF6 (ORCPT ); Mon, 9 Oct 2023 08:05:58 -0400 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A43CB4 for ; Mon, 9 Oct 2023 05:05:57 -0700 (PDT) Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-66b024d26e2so20636376d6.0 for ; Mon, 09 Oct 2023 05:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696853156; x=1697457956; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2VY/6yygJv/miZhZ8h6odHp72SB3kIR4yZRTmobOqWU=; b=2JiYUGmNMPoiRRQcqDMsqbLFqH4KdbSOT+SsSA+IlIYQ7mHhB9/8VSZ8onSNOaWiuP nYWons8LGBk39JnPxtjP6B1vL48Tv27Kol5tVMdt7IDkhq6QhxhJln0D51l1ZRl+NnGR 1qutiXL7VhmtNfuTP8ZFg7OPKlNvwZj51L7LXSjvIzuGGewedI/3Gc7VSnJD4n69KSFU FBeT8zczXAntT4joG6UYDLmbiQ9aRsIHRsy5Twey4TJvjApaHnHFosQ6XxGiE8gXNqlU dItCYOKrT9yW5OS6xCjxvqnnBtKxVOrt8n4M+aKkyCWHX/STjDc6qstmfUebI2SR9ZxS 0ygw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696853156; x=1697457956; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2VY/6yygJv/miZhZ8h6odHp72SB3kIR4yZRTmobOqWU=; b=TPdIZeaUfOH3FohzxiiHQWuM1UzqIlfDVY+T6crrbF8/oX6jh1ZmbsC38v+2ejBthK JVJ6hEodWP3e6FXVXusHUWksehKL1CjzC2svI8eRog9FPRN1MT0q3FcrsBrQZqihkylB Esmui7IA0nEnzsVT7R9oYD/5X1MHBEZ+xpzTNpLnIQIFl2Idi2ZYG3JrgVNr9IHiBh74 y5ldJVVpdgWwQQju6GVc0DmBSHB7IzaQt5wbhrAumWniwXMskFssI3wIUFJtw6/jaO89 GC8OiYwgfTLpNDlkng4GqbhwkxbbbTNGX4s0DGiva82I21OHjnn1HkjiZ7j7MhYq3Cmb NCzA== X-Gm-Message-State: AOJu0YxeVsQtwc4VyULagJJPx3h3VmU9rMupsBl+qvw90ZKfAhkjbrXL VqrXmmVWXnweOR9OqTIBtC1IjjLOa2AMl9Z+2aQbuQ== X-Received: by 2002:a05:6214:762:b0:65b:72a:78df with SMTP id f2-20020a056214076200b0065b072a78dfmr16256736qvz.10.1696853156331; Mon, 09 Oct 2023 05:05:56 -0700 (PDT) MIME-Version: 1.0 References: <556085476eb7d2e3703d62dc2fa920931aadf459.1694625260.git.andreyknvl@google.com> In-Reply-To: <556085476eb7d2e3703d62dc2fa920931aadf459.1694625260.git.andreyknvl@google.com> From: Alexander Potapenko Date: Mon, 9 Oct 2023 14:05:16 +0200 Message-ID: Subject: Re: [PATCH v2 17/19] kasan: remove atomic accesses to stack ring entries To: andrey.konovalov@linux.dev Cc: Marco Elver , Andrey Konovalov , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Oscar Salvador , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 09 Oct 2023 05:06:14 -0700 (PDT) On Wed, Sep 13, 2023 at 7:17=E2=80=AFPM wrote: > > From: Andrey Konovalov > > Remove the atomic accesses to entry fields in save_stack_info and > kasan_complete_mode_report_info for tag-based KASAN modes. > > These atomics are not required, as the read/write lock prevents the > entries from being read (in kasan_complete_mode_report_info) while being > written (in save_stack_info) and the try_cmpxchg prevents the same entry > from being rewritten (in save_stack_info) in the unlikely case of wrappin= g > during writing. Given that you removed all atomic accesses, it should be fine to remove the inclusion of atomic.h as well. > Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko