Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1331810rda; Mon, 23 Oct 2023 09:18:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE1zTnfUmk0VkMbn3BtT7r8+fzPf/pE2CKjzRseTZEK+7S8aEhsnImBkRQOnqRVaeCPGpne X-Received: by 2002:a05:6a20:7f95:b0:16b:a5fb:eee5 with SMTP id d21-20020a056a207f9500b0016ba5fbeee5mr111128pzj.28.1698077904954; Mon, 23 Oct 2023 09:18:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698077904; cv=none; d=google.com; s=arc-20160816; b=RUKa1EuqBaS7NLdeDGQEcaQs9rP24jqfNK8I2wvzLPFOGGwuic+3pK7mbxlvxSHKUm VbfZpa+/8Bbn+B+k/u6ENhF4MdFrQl7TVLjAJkwanJd3fsBj+jxkLKh5eNS8WPEt0k/d SFtXOlGlycUMZ2mEVf/Ft/OXmCNf4TD+x8QoLtKhmoL9+9CgNzrvlXOEfR/eoWsIZozI 1jTp9ixN08m8UrWaPK7qD7W6CPz1nhqtU6YkwfQ2A0sfp2a7hWlLzSgXN5UaWJVnbGsn QhKgu864kfP9kyVgCK+h/0U0QSpda2hHPNq6/HdvzmafJEaewmtnJecGrrCBlhF2zYvm yeoQ== 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=wZyP39z6xvoSIY5Cv54i5pfq0RfQpmz8NTDav/yNwTk=; fh=ClZrlmqypC8gyPFrg/phNYXzlKrWLi1ezKQD4pdvko4=; b=YeEvid+2LndcNufaflaIEA1Ebw4ycj5T+1/7lC2qzOUPfsQv1Biw1LJZwPVWLb30cj wW8lh1cmvYBMAHeV+OI0U+SxrR2XnYbXAdeJUXoNVLnG0gIGbjMxGOVM3zVZNXDEu8JN Rg2957mkgXg7nOFVMpj9ytJRYbUtQdfdd3Gb13bWXB5qQzEMWUjlfB4Ygc6ahLDsuzc7 Kf51ZeyaMIgOdpEtnSt//pjiOozNkhG0DJKUfKZ8HUZBdTfEE4kcyxeHd33N2C6meoJU x02Ia4I+fSpyuR/VPC0rfeD+f1gukwWAH+PFO72+pI48wI2jI8Jjy3WeAuVCcRyRwONq iXzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AVVWmb3O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id f19-20020a056a001ad300b006baae7ecfacsi6868827pfv.308.2023.10.23.09.18.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 09:18:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AVVWmb3O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 5EBB8805E525; Mon, 23 Oct 2023 09:18:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233817AbjJWQSP (ORCPT + 99 others); Mon, 23 Oct 2023 12:18:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233765AbjJWQSE (ORCPT ); Mon, 23 Oct 2023 12:18:04 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2442F1707 for ; Mon, 23 Oct 2023 09:17:37 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5a1d89ff4b9so1766595a12.0 for ; Mon, 23 Oct 2023 09:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698077857; x=1698682657; 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=wZyP39z6xvoSIY5Cv54i5pfq0RfQpmz8NTDav/yNwTk=; b=AVVWmb3OMGhSW6C1x3vXig8U38435IutaqFDv8WOQzW1Og8ZWVV6MQa0jKobeyEiWX /Bq1Sejummy5hWge75AqGK3nzpXGNGXF6GEpQXpzxOj1vs4zKkuqKtinIlHg/Q3DHRkl JBwV8RVK+YPRjWH9sgXQXpLxlXimaHNW351eQ6RHaLynb+qqAfIo/0/PJkej0yQBi6yF IS21FxnKxeMqD9ZCyMfc8/9XuI3JaUy/o8nZltIF1vSJZx7f+aCly/o7a9YYY6MqkU63 +qAjX47NPfFCJHEUwxYtXoKGa/f+lOnzybN4Xh4yI8Fbxmbj6LwauVcc99Qc4yjQVuHE jKOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698077857; x=1698682657; 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=wZyP39z6xvoSIY5Cv54i5pfq0RfQpmz8NTDav/yNwTk=; b=eoqKD1huZFY8VS528r8D8/6+BxujHyGliku6XfZP9Va1UpXxfzeILFSPI7gRAvHpiV o81QDMi1H+1ucqi/BTqf7UtfFwz2u/UqwOYezVljNAMbkPXnLIYt2EKSAEkn5leIpuin A7rCXerbTy8xu80zdbqvgfM/Mb3Yl4yBVLCzc3wQMkbnzUq+awl/dmlssVDAHIfei5z+ 6U50AvGsr4hlvOV5AqTAMP1cMC/S16WTaqAICUgyu+gSl3waouYwPpoEvsop0pHp1Xm4 CNHZCdv7yXkb0n986PXeQQuL2MOXZe6b+93ZnWaWMZPr21r+jMH4VJaSzNpaim8WIxco cQiw== X-Gm-Message-State: AOJu0YxlnyU+xnLinRqKfjM13dadHlDzxQXGN4UTHd8euwoI/GmIkbhX 8JzFnJf+yr7AaXErzgVzVeUE0vxsN8iUajOMRcY= X-Received: by 2002:a17:90a:f315:b0:27d:1f5c:22cb with SMTP id ca21-20020a17090af31500b0027d1f5c22cbmr6881409pjb.20.1698077857064; Mon, 23 Oct 2023 09:17:37 -0700 (PDT) MIME-Version: 1.0 References: <556085476eb7d2e3703d62dc2fa920931aadf459.1694625260.git.andreyknvl@google.com> In-Reply-To: From: Andrey Konovalov Date: Mon, 23 Oct 2023 18:17:26 +0200 Message-ID: Subject: Re: [PATCH v2 17/19] kasan: remove atomic accesses to stack ring entries To: Alexander Potapenko Cc: andrey.konovalov@linux.dev, Marco Elver , 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=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Mon, 23 Oct 2023 09:18:22 -0700 (PDT) On Mon, Oct 9, 2023 at 2:05=E2=80=AFPM Alexander Potapenko wrote: > > On Wed, Sep 13, 2023 at 7:17=E2=80=AFPM wrot= e: > > > > 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 bein= g > > written (in save_stack_info) and the try_cmpxchg prevents the same entr= y > > from being rewritten (in save_stack_info) in the unlikely case of wrapp= ing > > during writing. > > Given that you removed all atomic accesses, it should be fine to > remove the inclusion of atomic.h as well. Not all of them are removed: stack_ring.pos is still accessed via atomics. > > Signed-off-by: Andrey Konovalov > Reviewed-by: Alexander Potapenko Thanks!