Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp529114pxu; Fri, 11 Dec 2020 08:01:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgqJfOIkiau1uNrCfuciaCaGV4pcAJrRNTay2y+ba9ldzSVaECYPx3NS7wNiVPf4OIR7V3 X-Received: by 2002:a17:906:524a:: with SMTP id y10mr11739413ejm.97.1607702479411; Fri, 11 Dec 2020 08:01:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607702479; cv=none; d=google.com; s=arc-20160816; b=bz6qT+wYGFLUNO4FJ+B2k2i/peZWxXw6JTqhz7YxibscLoVu91ezbv52OCL4nIPtAb 7mwyEV3/gnpQjsJO1gQ0sVi9AvYdWkaBBubwXvaGkAYPFxiTvwpwr3w+L+y1Wl+8qtJ3 FjB7WauUtIuVTHeK9dqYCFEQbyyygVA9XNskcvG2CJ6Np7SYsDGAwTwzEvoFSPGAB/n7 EHCe2CUdvvZEX8i20XQcXV7gRJofWIN8eW8waoxpn+75UNBmq6+Q9tEEDNhz+TnZr0Pa EJNfY8DVI6x/fnxM7RY8Z05RR4meFfUT6nQQlrFD7EOnAZ9oqvR5qCWHGesQA0OAMKMv 2J7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=AG5j6KdzOrOIZlpP/G9Y3cE+K8n2ovOPbsXUJ+7wxSo=; b=zDZkz+IspW8LaLD67hB3vGHITt4a9Q+oaNg4KuhYcE/Gcxfk3fCa1Am1+fXdIBzDT3 MQb1bWN98yWK6mN7fWp1/Fah1tBe7LnNpM2C4BQIklvKXp9GeVEYc/UiLRQGwFCdDvB+ dhY9BUNwfWtEHpTTVAVZP6aYILGEsOBl49TiujxoFKUh0U4yCpjn+bFHn8RdloLxzkTb /g3ylX3MJ3iOVIE2FO36ar8vDNfCdcAk4CjAazvXQ4sHB/hjnI+x4rg9Qf7v5T91FGWP ybnTGXe2fw2niHvEX1kYddTo6OM6PS1KkDH7DOoQD0JadEDUHU/nUA1xb3gUCymNQ8lm wkZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=FayvgMRl; 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 v19si4906232eds.239.2020.12.11.08.00.54; Fri, 11 Dec 2020 08:01:19 -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=FayvgMRl; 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 S1729080AbgLJXtq (ORCPT + 99 others); Thu, 10 Dec 2020 18:49:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727339AbgLJXtY (ORCPT ); Thu, 10 Dec 2020 18:49:24 -0500 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0E5BC0613CF for ; Thu, 10 Dec 2020 15:48:43 -0800 (PST) Received: by mail-pl1-x641.google.com with SMTP id r4so3651119pls.11 for ; Thu, 10 Dec 2020 15:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=AG5j6KdzOrOIZlpP/G9Y3cE+K8n2ovOPbsXUJ+7wxSo=; b=FayvgMRlRj18DT5FRCj2xQ+hkc14+FsGexb2ndZ1Rek0uG3kjNwv4fcZqzZVSgroTD 5hz6WjzLi0eqDuoGrSg0SDv7+IF3relQUsha969dYZ60zo8DvVlObmt3hZ5+xqXGUgb9 fUjxPVSO1iXVRso/n0LxRCwCmeadiV3AWBhyeHigIiZPDIg6ePSrNQ4y5913weR3hx2M OjQV2VJ/zg0guoP9VrOFyRsH3RA+XUFFHbbnHc7kobQ+vKik50uKRpWccpzaT2Cx+2T9 OrdS9SYkidQ185axfnJmM8JfnsZVr7beMOOtSMZuMCGVJNyGSq1Ch/YdbxweIQo5fNb6 zzvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=AG5j6KdzOrOIZlpP/G9Y3cE+K8n2ovOPbsXUJ+7wxSo=; b=Xg6VxqFrMIeqrvM/IVLdVpseakdhz525uP3B1NJqlkmUQfBnJLiuNk+zReW+F4VRKS 9x18apmzpjkcA3Rcca3i0GHGXXSLP7Jwrh0IDKJMur+Yh21XjBYw4P3jTIF7jWL5DgEk menuwuyBnc98fKahXZf/Qq7docE7um9W4piK/flAa8GO8qB1dcJ9UGYW+kS8M02EfaIz maA+mUfSoDqDoOyuq9sKyCDLw0ZhC0u6S07TmATliHB06xvCH/hWIIaBEFx4ZYFGQ4U/ 4S00SXULXF6yy0eA4xb2EVhqaQXgFf2i5Z9hHMI+L5TzFtv6oJeK1ngVxlCt3Ct4HIyj vQbw== X-Gm-Message-State: AOAM531oKpzl2VSc+6SagjDunQVarsbUI4VSx2YR3cLmSYPYdsY9RrTo ddXa27sQUtBOd8enuyDcnHWSNA== X-Received: by 2002:a17:902:6903:b029:da:f458:798c with SMTP id j3-20020a1709026903b02900daf458798cmr8325001plk.68.1607644123398; Thu, 10 Dec 2020 15:48:43 -0800 (PST) Received: from [2620:15c:17:3:4a0f:cfff:fe51:6667] ([2620:15c:17:3:4a0f:cfff:fe51:6667]) by smtp.gmail.com with ESMTPSA id e5sm7184975pfc.76.2020.12.10.15.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 15:48:42 -0800 (PST) Date: Thu, 10 Dec 2020 15:48:41 -0800 (PST) From: David Rientjes To: Alexander Popov cc: Christoph Lameter , Pekka Enberg , Joonsoo Kim , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Alexander Potapenko , Dmitry Vyukov , kasan-dev@googlegroups.com, notify@kernel.org Subject: Re: [PATCH] mm/slab: Perform init_on_free earlier In-Reply-To: <20201210183729.1261524-1-alex.popov@linux.com> Message-ID: <9c37ff7f-813d-3313-ea8a-fd65484e476a@google.com> References: <20201210183729.1261524-1-alex.popov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 Dec 2020, Alexander Popov wrote: > Currently in CONFIG_SLAB init_on_free happens too late, and heap > objects go to the heap quarantine not being erased. > > Lets move init_on_free clearing before calling kasan_slab_free(). > In that case heap quarantine will store erased objects, similarly > to CONFIG_SLUB=y behavior. > > Signed-off-by: Alexander Popov > Reviewed-by: Alexander Potapenko Acked-by: David Rientjes