From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E8F3C433FE for ; Fri, 4 Dec 2020 11:54:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4A5F92251E for ; Fri, 4 Dec 2020 11:54:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A5F92251E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B10EC6B005C; Fri, 4 Dec 2020 06:54:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AC3746B0068; Fri, 4 Dec 2020 06:54:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B1356B006C; Fri, 4 Dec 2020 06:54:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 839F26B005C for ; Fri, 4 Dec 2020 06:54:34 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 515E31F06 for ; Fri, 4 Dec 2020 11:54:34 +0000 (UTC) X-FDA: 77555442468.04.crate30_4d12b73273c4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 2D99D800EFA6 for ; Fri, 4 Dec 2020 11:54:34 +0000 (UTC) X-HE-Tag: crate30_4d12b73273c4 X-Filterd-Recvd-Size: 5087 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Dec 2020 11:54:33 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id g185so6775285wmf.3 for ; Fri, 04 Dec 2020 03:54:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=wHqmBeW2IFxVt4oHJizfcV3fQQX4Hgdaz39Wp4K7c0A=; b=o9mSdDNTsoiQaShzJV/mALs+VlFR3hIX6q8tFD4xVvU8h18bFMkq7IOee1KQeYKZuK mjYb9cy0rRSCWR7Q6PZEZgZZDGjDmAVsl/eK8Ww+ak/EguuVx++72nH2n6RNhvW3tN9C 7s1akYL1hmgqvi2aeh1j76dV6qlEjA03/PVlp0yksVlNrGoKUTkJGQuJKK58YhN1RQ+h 99IbfI/iaVMy9swfW/i3SOPUVDbQSBrlENGyudQCLt8QiBSa2ph3PEzGlo1gix9MJ8pr tmF0LJp9+R1BaXxb9mE5n6LQCkBvQMztYF4CWL9qxmqQ39+gIj/SiF6cT1x/3XQa6wHr YG7Q== X-Gm-Message-State: AOAM5302DCCR0SArpmwZ/vgQi6V0OfepelOI3rY9AHRdfwNWUPpoq96O usnzhovu+cTtWG4iczNeacM= X-Google-Smtp-Source: ABdhPJz3k3/M4l7ovBWHXv3cerqd8tc5RbeKIr8k7pXjJ8RslEzOgI+FhEYt0rRwwhaYS4XH6t8M9g== X-Received: by 2002:a7b:c087:: with SMTP id r7mr3791014wmh.153.1607082872591; Fri, 04 Dec 2020 03:54:32 -0800 (PST) Received: from [10.9.0.26] ([185.248.161.177]) by smtp.gmail.com with ESMTPSA id u26sm3027316wmm.24.2020.12.04.03.54.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2020 03:54:31 -0800 (PST) Reply-To: alex.popov@linux.com Subject: Re: [PATCH RFC v2 2/6] mm/slab: Perform init_on_free earlier To: Andrew Morton Cc: Alexander Potapenko , Kees Cook , Jann Horn , Will Deacon , Andrey Ryabinin , Dmitry Vyukov , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Masahiro Yamada , Masami Hiramatsu , Steven Rostedt , Peter Zijlstra , Krzysztof Kozlowski , Patrick Bellasi , David Howells , Eric Biederman , Johannes Weiner , Laura Abbott , Arnd Bergmann , Greg Kroah-Hartman , Daniel Micay , Andrey Konovalov , Matthew Wilcox , Pavel Machek , Valentin Schneider , kasan-dev , Linux Memory Management List , Kernel Hardening , LKML , notify@kernel.org References: <20200929183513.380760-1-alex.popov@linux.com> <20200929183513.380760-3-alex.popov@linux.com> <1772bc7d-e87f-0f62-52a8-e9d9ac99f5e3@linux.com> <20201203124914.25e63b013e9c69c79d481831@linux-foundation.org> From: Alexander Popov Message-ID: <9b9861c0-4c94-a51f-bbac-bd5e9b77d9e0@linux.com> Date: Fri, 4 Dec 2020 14:54:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201203124914.25e63b013e9c69c79d481831@linux-foundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 03.12.2020 23:49, Andrew Morton wrote: > On Thu, 3 Dec 2020 22:50:27 +0300 Alexander Popov wrote: > >> On 30.09.2020 15:50, Alexander Potapenko wrote: >>> On Tue, Sep 29, 2020 at 8:35 PM Alexander Popov wrote: >>>> >>>> Currently in CONFIG_SLAB init_on_free happens too late, and heap >>>> objects go to the heap quarantine being dirty. Lets move memory >>>> clearing before calling kasan_slab_free() to fix that. >>>> >>>> Signed-off-by: Alexander Popov >>> Reviewed-by: Alexander Potapenko >> >> Hello! >> >> Can this particular patch be considered for the mainline kernel? > > All patches are considered ;) And merged if they're reviewed, tested, > judged useful, etc. > > If you think this particular patch should be fast-tracked then please > send it as a non-RFC, standalone patch. Please also enhance the > changelog so that it actually explains what goes wrong. Presumably > "objects go to the heap quarantine being dirty" causes some > user-visible problem? What is that problem? Ok, thanks! I'll improve the commit message and send the patch separately. Best regards, Alexander