Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp859862lqs; Fri, 14 Jun 2024 07:43:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7CIViFVkFP8Na5uOGSIggy+rVITaSzj03vFvMHBIWvuDpGYmpDy7DB8FcY7IHlwIv1iMEBIJ2DHypTkDgo76Uwx+5daKqfRfexDmbcQ== X-Google-Smtp-Source: AGHT+IHGwgYMcnfPYIP8Mj10jALFUPoBb8AyvRaPOU5+ClQQDlqXgAtZmzIEVF9tGXK/Gob4rYP0 X-Received: by 2002:a05:6a00:26c9:b0:705:c029:c998 with SMTP id d2e1a72fcca58-705d70f7313mr2764968b3a.3.1718376235199; Fri, 14 Jun 2024 07:43:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718376235; cv=pass; d=google.com; s=arc-20160816; b=qxUDKcmOJIBK1K8HA4ij8VSSyP7P8vlW1r4mQfsFHsm56df+Rja3NXvnG7cQzSbKto oRQtrcIdWoINAJBzfLcfBvE0tGSt1/b5B4VTMDKuOa0elT+AJ+43D+TdXe0RsyQ19mbH 1M9bSYivOa5LAi02QkrdQp8jsGjkpSgXrmLqaCC0dFhh5xnTyQWWKqv6/Zkd8vzepWJU nunmNOaXlRV5IATrGBsz8uEQvPx/IqCqdOpnUXG4m/EZfwBKp0dHL2Rz1uPY+96PlSdE dVqwhaZHZB/xEFU+Eydb5Rz+z0hAUhEUZFVNScbeEVUw93HO7X0L4h7zp0HYwB1Ar2Gm at2g== ARC-Message-Signature: i=2; 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=B+tN6RHfXKiHus8eyH21GesugJVvgcyhoJB9y21e43Y=; fh=FUm0TRLElpS3amKsUYLcnzDyfgTH/97MOqTZ3lPK0OI=; b=eaJs9QfpMIaelSIYrJMefjzi/ieZ4AdQFcwA7qA6Y7Xl19uqtLsqtAb3E0TyvabSHF 4twHp57usCY6dpVsQ0XysTBzVhUiTskeDI6YVWX4FyzcVtTZjcdkQi0rp87wIrDqkpZo Y3ZhVhr9f/oKx0azGtSyeMkMjR8JTpW1VQp1V1jMIZNuY7MZfcEhCEhzIDBVNGJ8XkCh 9wraS402mVi7ziKxRO8k9tRe63hmZ6+vu8W4FEVGimuiVYZ+N+wIjd21avArzN1Nd5JN GEJp3DgFSlCx6ptCKKLaRM4d/izdHRvBPOrGKP1EZTbuybMPmcdyHiuX/J9d9b20wGfz Jc7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Uahsnf8I; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-215036-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215036-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee453c424si3697438a12.571.2024.06.14.07.43.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 07:43:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215036-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Uahsnf8I; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-215036-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215036-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2AB2C28D5D8 for ; Fri, 14 Jun 2024 14:35:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94BBAF4EE; Fri, 14 Jun 2024 14:33:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Uahsnf8I" Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 2BEAA61FEA for ; Fri, 14 Jun 2024 14:33:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718375619; cv=none; b=nYpeY5/iNNCUm2PJ0wooaNJInCcyGRfelkyHEu/PpSRCDYXVEzgooelP3MxA1nAqIDGE9uLGJSVo9kasFBm09kwj1FXNmAZ8JEt559VIgvMJR4f6IQy9X70GycEiqPO31S4VG1mWCSOo16zi46v6io/mjKnwUIerkRTzKZHFs+k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718375619; c=relaxed/simple; bh=B+tN6RHfXKiHus8eyH21GesugJVvgcyhoJB9y21e43Y=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=kw3VgoZ4NxCRFrNUuSpSU6MycGYFe9R5cb/+dW+Redwy08GywV+eW29q/110OiTfFCR4SGqoz/2oIdnMfZgnVlGbgU4isIN4QzqHe0NpkVwpwSE58y+J6cJGLRvboyxReZbfkgLK/yOnVvYsRAhRvayLrGwTthg127xGx7lZRIE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Uahsnf8I; arc=none smtp.client-ip=209.85.221.52 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-wr1-f52.google.com with SMTP id ffacd0b85a97d-3608545debbso392390f8f.1 for ; Fri, 14 Jun 2024 07:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718375616; x=1718980416; 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=B+tN6RHfXKiHus8eyH21GesugJVvgcyhoJB9y21e43Y=; b=Uahsnf8IhuTYdyrS6q21UMzEPBReSwX+XMzDHGqV/rNjIgu5h0cmlQ1crXypWLMLpH o2bwDBFuTzNrw6Ew6tjYRRTfGM0X7RXAbYOCj57tXdj+xBsjpxndVE052kdBc2gzBgXE tlcPCqMDF4/M/yuTM7IwzcSZgGvtJi38nusQUcIwkbWNrtoq5d8mQ7YnJQoexOF3liS5 QwL12ztOFLePWnCU4r7miFD6I+7cRNi+DGP6iMZ5upP2zcoukbTIMIO8AQYUKjKJckvr sLgy57U+kGr6mTqL//XHlQzy/PAH5+XDgbjh6LB4oZrIpK9kxfQOrb3lP2LFzHrQqZr3 r/9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718375616; x=1718980416; 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=B+tN6RHfXKiHus8eyH21GesugJVvgcyhoJB9y21e43Y=; b=Zyy3sJobB15ZvG2SW71mBPhnSRfRcNe4lH6zFgmxmjwFedVQnqTBdG8tf37CeepFCB PIpHa3ogo72HkxKVdwCHWcp1FdTbm8np3FyvG54vblwffPoSt9iO8eqfXcEjTPySv/wi rlYMb2NtXoCMZgSZfQkNxQc+ECdmywd1qwOQbmhsLlSJjkTxEtCGUA41Buk9y0chrOa0 X0LZK+lTg2CLmS+PDARGmZkltrNsgbrosH4sRIhwKdXdUq4dwO05xWh71+uq13IULUk5 dWstU6SAEnyI2LAu00Htz36wDqAqhmLfWow5sD9+sPxUpk5QnIYyEct7Lvv3Gmu5Vh18 wLZA== X-Forwarded-Encrypted: i=1; AJvYcCXHzifwBVhBQJllfPdtxfAbS16eNbgI3uTAJ3baWGXfmdtBYa07Uv67AgjZ24WM83XpCFYUYSGNdpvqUCfkdS1fWRSAYQoIm4O5Vti7 X-Gm-Message-State: AOJu0Yywvd6gTk/XPK7bwFrsUxad9yUPXbao7ktGZYyty9g684OFD3c7 3B2uV1IIALzRevlX943EwlKRISbCENY5bFoUdnPRwgXsuIZHSv74LY0MO3PYq7dnTG05i1cppZf stjwGarfljrJtO8B5QTSKkv84pQo= X-Received: by 2002:a5d:43c2:0:b0:35f:444:8711 with SMTP id ffacd0b85a97d-3607a75eac1mr2347244f8f.42.1718375616322; Fri, 14 Jun 2024 07:33:36 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240614141640.59324-1-andrey.konovalov@linux.dev> In-Reply-To: From: Andrey Konovalov Date: Fri, 14 Jun 2024 16:33:25 +0200 Message-ID: Subject: Re: [PATCH] kasan: fix bad call to unpoison_slab_object To: Marco Elver Cc: andrey.konovalov@linux.dev, Andrew Morton , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, linux-mm@kvack.org, Brad Spengler , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 14, 2024 at 4:29=E2=80=AFPM Marco Elver wrot= e: > > On Fri, 14 Jun 2024 at 16:16, wrote: > > > > From: Andrey Konovalov > > > > Commit 29d7355a9d05 ("kasan: save alloc stack traces for mempool") mess= ed > > up one of the calls to unpoison_slab_object: the last two arguments are > > supposed to be GFP flags and whether to init the object memory. > > > > Fix the call. > > > > Without this fix, unpoison_slab_object provides the object's size as > > GFP flags to unpoison_slab_object, which can cause LOCKDEP reports > > (and probably other issues). > > > > Fixes: 29d7355a9d05 ("kasan: save alloc stack traces for mempool") > > Reported-by: Brad Spengler > > Signed-off-by: Andrey Konovalov > > Oof. > > Acked-by: Marco Elver > > mm needs explicit Cc: stable, right? If so, we better add Cc: stable as w= ell. Makes sense, sent v2 with CC stable and a commit message fix. Thanks!