Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1234670lfc; Wed, 1 Jun 2022 12:34:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqrY1ymmfogoQnN9zWlHudDhFZqj6iS5BX4EccGGLvcGcAYB/PgN4Gqp4tLGYtmCF3n6Ub X-Received: by 2002:a17:90b:33d0:b0:1e0:4953:d848 with SMTP id lk16-20020a17090b33d000b001e04953d848mr1027502pjb.64.1654112086529; Wed, 01 Jun 2022 12:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654112086; cv=none; d=google.com; s=arc-20160816; b=JW86RV+KXHgQKJTwpSdHthdSh8QeCP2F73HX4oP++9wGnLbq4sTQCOy5Rj/Y4KlcTG FEg2pfwiqLiDGZRw7x2F8TpYIj1TZ3iblqqJ0mJrK7/tN2HZ2F8AAh9pYeELN38V1wnm tL9cedMoit53woJt6fg6cud+OzRqKxCYMbl42IjctXLqtNaQthpqIqgcUz6yQVvzXIvH 8c/G4e/9DGt0JnnIGUrp4FkXbaqSbIMjRyJmhFwalnxRz50m9ogNHZAhhLBkZquhZQNx rIB8PW3+SngQwPSangV7Tw5hfCHcE7760R9z+l1dMi/PN5hSPWHhm9teAhfjjxNfk5+i AEng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=laksvj7tZyE5VfjRjxemXKqC6M/6B12dc0r+gd4pLSY=; b=lHuTzl34ICjFb/yMtKre11ZPEx7K0oWyLuaoZBrZI2u+l5eq9sGxfvQPQigCxzsxHk UYXUrWm0hZ1d+aYadqCiCRo0k1Hwgh94MxKUkOeT3cA324OjMq01uj1ULg5nVVuCZvnn UdbFmIS6QxaV095LbqUfSARkjbmB7q+5hk56pz4iaJv2lxNYZaoE3BVN6N8kL2l/qlDj SbQkF9at9N6Amw9L3CF/1ewVzsXcGBpilhmW8cBgc5R71KcN7N5KaTtDGtMltRFH8lui thWhsFrXsPlxZmpGB6aqBaQO6GDU/Ir+b2r9OIMrKjwxq8GqRI6XzciV03IBoHerathX uXng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qeNPEzon; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x23-20020aa79197000000b00518418d73ddsi2616327pfa.333.2022.06.01.12.34.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 12:34:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qeNPEzon; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0170C19FB2C; Wed, 1 Jun 2022 12:03:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347258AbiEaTZL (ORCPT + 99 others); Tue, 31 May 2022 15:25:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231594AbiEaTZK (ORCPT ); Tue, 31 May 2022 15:25:10 -0400 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 706E39968A for ; Tue, 31 May 2022 12:25:09 -0700 (PDT) Received: by mail-io1-xd2b.google.com with SMTP id q203so15243062iod.0 for ; Tue, 31 May 2022 12:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=laksvj7tZyE5VfjRjxemXKqC6M/6B12dc0r+gd4pLSY=; b=qeNPEzonX3bCWTM4a4Otdhfg66OsyZPyGRQmqwX/A5k5ZHfzwX+DQsB4tuyCbqJtys TgR1d2CJYKWYel6bjsq3sBjTKxWswcu24zyuKGoLmTjMp/GzWD5NQ8BYXC9hxPX080mi 8AzGtOdMMnmIiDTe6N/4iFy8MoX0cbz7tNQT1CVKlxOAa1WD4A+Cxj88/++nNXMI9525 S/V+WoNp/0SmgPIIDo2/VD34+ef+MfP8wvlLJcDpsDgNirPcIySDKI8N/ijTaTtBr0Pn s83naywkoullNDe1942zZF0GrBvgkNXx5BT+vsj81jJ571nfVZKMTu07G6z2Mew+W7kg W1sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=laksvj7tZyE5VfjRjxemXKqC6M/6B12dc0r+gd4pLSY=; b=1jupT4p+DkjyvdjGokdaHbD71KfLQpIKCSJCtaFdjUNHooiK95M5FFZtcMFDc3ypPH 5MIAUfDRflLlvgx+qrVVQVMPInyLitrF3dCl+QlW0DM44fTKWLM6/dOjLa9wKgBJR/mV sDC8ie9bh/5/nYbC4OAX8btKZXVOBmcfpdHeyYECdeEHrvTaKwTSmamS66MuBmOupsfT sQtQyuo30ViwUojrI6y8IPu7OKA5bACiy16o9DFtkRhYHghwGIoEiL/FCOeJoLyjt35Q hxK7yKYHL1ZsBdVazxqqgrI0E9/84n9FVRTrv5I8Eie6iTI4Z4DHi9FGvGWej2duAHqh sEmQ== X-Gm-Message-State: AOAM5312jKNB8HZ8nbTpznq8GZTQBPRYbCgqajXavZb/XQEHyfNBlEVu N525uMlZB8XaarQc0F9rstu8O4gA87AZj+RSmUU= X-Received: by 2002:a6b:3115:0:b0:660:d5f1:e3b6 with SMTP id j21-20020a6b3115000000b00660d5f1e3b6mr22025461ioa.99.1654025108757; Tue, 31 May 2022 12:25:08 -0700 (PDT) MIME-Version: 1.0 References: <4c76a95aff79723de76df146a10888a5a9196faf.1654011120.git.andreyknvl@google.com> <20220531105200.587db61db99f19e308a05c5e@linux-foundation.org> In-Reply-To: <20220531105200.587db61db99f19e308a05c5e@linux-foundation.org> From: Andrey Konovalov Date: Tue, 31 May 2022 21:24:57 +0200 Message-ID: Subject: Re: [PATCH 2/3] mm: introduce clear_highpage_tagged To: Andrew Morton Cc: andrey.konovalov@linux.dev, Marco Elver , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev , Linux Memory Management List , LKML , Andrey Konovalov Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 31, 2022 at 7:52 PM Andrew Morton wrote: > > On Tue, 31 May 2022 17:43:49 +0200 andrey.konovalov@linux.dev wrote: > > > From: Andrey Konovalov > > > > Add a clear_highpage_tagged() helper that does clear_highpage() on a > > page potentially tagged by KASAN. > > clear_highpage_kasan_tagged() would be a better name, no? Sounds good! Will include into v2. I also noticed there's an extra empty line at the end of the function I need to fix. > > --- a/include/linux/highmem.h~mm-introduce-clear_highpage_tagged-fix > +++ a/include/linux/highmem.h > @@ -243,7 +243,7 @@ static inline void clear_highpage(struct > kunmap_local(kaddr); > } > > -static inline void clear_highpage_tagged(struct page *page) > +static inline void clear_highpage_kasan_tagged(struct page *page) > { > u8 tag; > > --- a/mm/page_alloc.c~mm-introduce-clear_highpage_tagged-fix > +++ a/mm/page_alloc.c > @@ -1311,7 +1311,7 @@ static void kernel_init_pages(struct pag > /* s390's use of memset() could override KASAN redzones. */ > kasan_disable_current(); > for (i = 0; i < numpages; i++) > - clear_highpage_tagged(page + i); > + clear_highpage_kasan_tagged(page + i); > kasan_enable_current(); > } > > _ >