Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp187236rdb; Tue, 19 Dec 2023 13:20:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOX1kEuf0QbCMtmAuN9ymfXE0Xhc16YXCS6R4RXssn7aTYjqmYivkyoUcyt9KZArn8LEt3 X-Received: by 2002:a05:600c:35cb:b0:40d:1773:2d79 with SMTP id r11-20020a05600c35cb00b0040d17732d79mr1794443wmq.205.1703020803656; Tue, 19 Dec 2023 13:20:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703020803; cv=none; d=google.com; s=arc-20160816; b=0JyABjWHPBM0Pd+zaIvbMFBATLbIgsFfeUKMKxa6QvHKuabXL9yLHNVo/yrWIx55hr 7lHLAPLEoDzwRWqrSb2vsg6J2JXCSNlZw9DBzraArdfYiqPwGP2nup91XU1UPSr1QSSd i9QhY2wkGcPFEGIURDfrNYHm0mnAxS3XZ5lxW4jGgJW9o6bVNrlzoOvQGAhjYE1yRCxE WKi7mBgMGz5DobPHKT/P8tn4WfFX7JC56BwPvju1Fkw0jxMlpMZwkIqIn1eO44XQwCES NiOKKXRnbVpaM9c1EDXMPZCUdcfc7t7EsGQlLPSSASfJxBxkr/Tz6ax/a+1E3fVe2fV8 suMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=KXbTc4Gy/r09/08lo99KiIQ8BjOLq2PAuFNDugWTr8s=; fh=F6+FGML87yHqRev/l5aFDmOtQouYoX3HLtF8iNVpDI4=; b=WzCC1YpsgVPLWnAFXPygx01tg4O/qyI5uKRoZL072cijvgFmtmpG95dB3oWmRvFKSr P1xL/PBJVPP4LOAAkLh3K0RvvGtYlefqPdeWzia6gNwZBokueTb4NoHW3F9hJmdg49Mj /qHWh4W9SaqoUCscn3JLI2Ioy8OR+N0lM9B3o39V/eMDR5ssONzCNji1WWJrGC15XGXv RH1s9iXXkwK4bXc+wReAdsQUMGvVb06XKBwLuHe6y1gTlVhDhzTDGp9KHh8KxNNd6Uro RylQwCXIthb481Gau3U1gDIxNg1Wxp2cE3cDx4BojG/JXAxKYLrMmMAPdoRr6nBOi8uG bpLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="KLRTltt/"; spf=pass (google.com: domain of linux-kernel+bounces-5957-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5957-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c10-20020a170906694a00b00a236fd9a838si1122298ejs.897.2023.12.19.13.20.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 13:20:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5957-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="KLRTltt/"; spf=pass (google.com: domain of linux-kernel+bounces-5957-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5957-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 255AE1F24F9F for ; Tue, 19 Dec 2023 21:20:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 020513D0AF; Tue, 19 Dec 2023 21:19:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KLRTltt/" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A5DF3D0A2 for ; Tue, 19 Dec 2023 21:19:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-5cd5cdba609so3860807a12.0 for ; Tue, 19 Dec 2023 13:19:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703020794; x=1703625594; 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=KXbTc4Gy/r09/08lo99KiIQ8BjOLq2PAuFNDugWTr8s=; b=KLRTltt/wgNGdXOEMwiw4fVj2ZBixP/GGfZXgf5QgxDYqAx0ih/eTnf2nMS47L0F4z xMDxpETblJv9wtl+gLGUwb4bP7P9hg6DxXecCTHnVc/pQ0hutCIZPMuQVNfqedP3mUvp P2KpqUu6+jZKalbAf23osTptdvh8r35kNHfGLW8OED4bH3EE9TkRCVzAzsmsLi1KcgQ3 jPR24Blado73p8NReL/cAxuFHzl/BSQPHIfDMQIgaT4AoiuPF6QBqz6O0itk+VH7VD/V Aypm3qnGTYtnGmI29hBYWSGjoo4nF1euTVMl/ey67lM/Y75+1BDwF8LC1iYPoZmvlcoh 7aCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703020794; x=1703625594; 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=KXbTc4Gy/r09/08lo99KiIQ8BjOLq2PAuFNDugWTr8s=; b=X4BixwTK8dIzQdq05wHM0VOjD+BIzfv5Dep6M5D/LaxSjoQOrSJNUZUKzzcwxehO1P nbeQaZmN2Gm2gWuTJlLW6+U70nrxNsqPyHzQfRz+ewwQobmQATnxBUBlVkhci079kh/1 qXYUvYAGLT+8egJdPU0iTtzsIA8d0OuGpSPHbysiX/QxnpmUHvvge/dLt7ofud9U9aGh cDRTNeLojyryNUv0UOZHzkS4Wi5SepSp/Wgb2ST47f2UR2oCUttLIKXCcsLe4sMAsIUR d5V1b2MFMCvAJy8sGN4W3R0N3HdVAGDDM+3tSlzq5XspE1O8ecW/RPN2RMma/tTX8RE/ J9ag== X-Gm-Message-State: AOJu0YxSp2jdRV+ViiVmbFUpP6eOTE0ySIEh3Cr3BgFvff3SRTb5wfnH CChrG5fP/tnSs3mKvdnPkIS5Yh4kieg6gkJ1T08= X-Received: by 2002:a17:90a:458c:b0:286:6cc1:780c with SMTP id v12-20020a17090a458c00b002866cc1780cmr13606746pjg.79.1703020794204; Tue, 19 Dec 2023 13:19:54 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <88fc85e2a8cca03f2bfcae76100d1a3d54eac840.1702514411.git.andreyknvl@google.com> In-Reply-To: From: Andrey Konovalov Date: Tue, 19 Dec 2023 22:19:43 +0100 Message-ID: Subject: Re: [PATCH -v2 mm 2/4] kasan: handle concurrent kasan_record_aux_stack calls To: Marco Elver Cc: andrey.konovalov@linux.dev, Andrew Morton , Alexander Potapenko , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Tetsuo Handa , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov , syzbot+186b55175d8360728234@syzkaller.appspotmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 14, 2023 at 9:35=E2=80=AFAM Marco Elver wrot= e: > > > #if defined(CONFIG_KASAN_SW_TAGS) || defined(CONFIG_KASAN_HW_TAGS) > > @@ -249,6 +250,7 @@ struct kasan_global { > > struct kasan_alloc_meta { > > struct kasan_track alloc_track; > > /* Free track is stored in kasan_free_meta. */ > > + spinlock_t aux_lock; > > This needs to be raw_spinlock, because > kasan_record_aux_stack_noalloc() can be called from non-sleepable > contexts (otherwise lockdep will complain for RT kernels). Right, will fix in v3. Thank you!