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=-19.9 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL 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 55E67C11F68 for ; Fri, 2 Jul 2021 09:37:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DB4E661374 for ; Fri, 2 Jul 2021 09:37:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB4E661374 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 501F56B0011; Fri, 2 Jul 2021 05:37:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4B1F46B0036; Fri, 2 Jul 2021 05:37:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 32BA66B005D; Fri, 2 Jul 2021 05:37:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0130.hostedemail.com [216.40.44.130]) by kanga.kvack.org (Postfix) with ESMTP id 106FE6B0011 for ; Fri, 2 Jul 2021 05:37:44 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B52DC27DF6 for ; Fri, 2 Jul 2021 09:37:43 +0000 (UTC) X-FDA: 78317145606.01.55EF4D3 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by imf28.hostedemail.com (Postfix) with ESMTP id 6CB94900009E for ; Fri, 2 Jul 2021 09:37:43 +0000 (UTC) Received: by mail-wr1-f48.google.com with SMTP id i8so11748854wrc.0 for ; Fri, 02 Jul 2021 02:37:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zmw3iGewZOSDs+c1/yw4f6lr9XV4A3V9IcDrAGu7EUY=; b=seJWsMXt7a9DQs5DTguOn4v7czLJozx50c2KMxvJ4ChgjdtfcJyFCrU/niutcOA+17 6X6qQ+SHlKgbMtZkwaOwkt6RLhr9yuf9/tsn0WWkDbQaxS+ki4At8iFVOqMCU5a19yCe tm69GcfqmEfa8fMZdN8F6lEiHga/q9OMHvemh8fDmy/MS2BX3A6lrVZV7dm0VphoYvy7 LEYAh/Y1/GZSaqOlINaCz/lyXL10VRCFUnLYhH7fkrYSsNOI+ZSemuqX9QPy13tNcqwd zhMMfns1XnzlKyfTOnGCPyXQcIn8JrwxNCXGEBWdW/JHoevLDs1QDlIB2D/Y3mbA1SX4 AJ2A== 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:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zmw3iGewZOSDs+c1/yw4f6lr9XV4A3V9IcDrAGu7EUY=; b=NArLlWUAifU90+oKqqt+VBWk8L0sCssdsDCBsGMNk9Cg/wp7VfgKQvyLI18QFYychA P+VmkzWW78D283UxEAAIlPM81vEm+UQc5tGp3tidlom4Lb03sRrLUM4OBG1f+5tQuW2Q wK7LM+204ZVitO5giM4B4P0BIbX/lPcqjXmTNmpAhVpHsetzOa9pdnY4ids7p+bfiVfB IVBcvvUhWG5aeEBgni0sV7lby0q7EEGzpPlnO77V0ihuvJEbhhvPviqMyX4AmIa8jt61 AmWQv0DJtupuX+pvmt2tuzDgYmQCumWe71uro8QLZNCeOh0ZK9VW7HqcsOHIk7RFk+BZ muvQ== X-Gm-Message-State: AOAM530NJ8YaASFAKgCzBh4v9kqyHTZgrHYgtIpklbtijyeSApfRoUDN bPFc2MGpupk7EW8CF3gY6cqosw== X-Google-Smtp-Source: ABdhPJwVYrqppuZ9dDMO5GSgWooXxasPLeNPUlx9D0W1HifuqLwAmdYA1yAtMT4Xr+2+B5Xz11IQIQ== X-Received: by 2002:a05:6000:18af:: with SMTP id b15mr4769198wri.252.1625218662074; Fri, 02 Jul 2021 02:37:42 -0700 (PDT) Received: from elver.google.com ([2a00:79e0:15:13:212e:6681:cd1c:caef]) by smtp.gmail.com with ESMTPSA id n18sm6583605wms.3.2021.07.02.02.37.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 02:37:41 -0700 (PDT) Date: Fri, 2 Jul 2021 11:37:34 +0200 From: Marco Elver To: yee.lee@mediatek.com Cc: andreyknvl@gmail.com, wsd_upstream@mediatek.com, nicholas.Tang@mediatek.com, Kuan-Ying.lee@mediatek.com, chinwen.chang@mediatek.com, Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton , Matthias Brugger , "open list:KASAN" , "open list:MEMORY MANAGEMENT" , open list , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" Subject: Re: [PATCH v4 2/2] kasan: Add memzero int for unaligned size at DEBUG Message-ID: References: <20210702085422.10092-1-yee.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210702085422.10092-1-yee.lee@mediatek.com> User-Agent: Mutt/2.0.5 (2021-01-21) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=seJWsMXt; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf28.hostedemail.com: domain of elver@google.com designates 209.85.221.48 as permitted sender) smtp.mailfrom=elver@google.com X-Rspamd-Server: rspam02 X-Stat-Signature: mgwp6jt1oy5uz7doxprh7or4m3ey47oc X-Rspamd-Queue-Id: 6CB94900009E X-HE-Tag: 1625218663-188720 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 Fri, Jul 02, 2021 at 04:54PM +0800, yee.lee@mediatek.com wrote: > From: Yee Lee > > Issue: when SLUB debug is on, hwtag kasan_unpoison() would overwrite > the redzone of object with unaligned size. > > An additional memzero_explicit() path is added to replacing init by > hwtag instruction for those unaligned size at SLUB debug mode. > > The penalty is acceptable since they are only enabled in debug mode, > not production builds. A block of comment is added for explanation. > > --- > v4: > - Add "slab.h" header > - Use slub_debug_enabled_unlikely() to replace IS_ENABLED > - Refine the comment block ^^ this changelog ... > --- ^^ this '---' is wrong unfortunately. > Signed-off-by: Yee Lee > Suggested-by: Marco Elver > Suggested-by: Andrey Konovalov > Cc: Andrey Ryabinin > Cc: Alexander Potapenko > Cc: Dmitry Vyukov > Cc: Andrew Morton ... should come after the tags. git am removes anything between the first '---' and the actual patch from the commit message. The typical convention is to place the changelog after a '---' _after_ the tags, so that it is removed from the final commit message. I think the code looks fine now, so please go ahead and send v5. Thanks, -- Marco