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=-13.7 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no 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 23C70C07E9B for ; Mon, 5 Jul 2021 11:18:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0607D6135F for ; Mon, 5 Jul 2021 11:18:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230406AbhGELU5 (ORCPT ); Mon, 5 Jul 2021 07:20:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230174AbhGELU4 (ORCPT ); Mon, 5 Jul 2021 07:20:56 -0400 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E78F3C061574 for ; Mon, 5 Jul 2021 04:18:18 -0700 (PDT) Received: by mail-oi1-x233.google.com with SMTP id t3so20397573oic.5 for ; Mon, 05 Jul 2021 04:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vQCc966SXUWmxUzITD8j4jyP6srsgCllnc0jbweek7I=; b=cHNJERRyJ5VgZnacJnPR2MSdn7fGw163AVo+S8UOuAHCb3pTWYCdTRFFjXaaX8GkUb 3VfdXnRbb2gNfY1PFm+w169rVHlgjvTg4J/NZqi+D5KtNopaQpI62sgNlwhOKwkOjn3y aM+SXKcxWLnYQ+r1haUMgwW3xnEhGhMTsG+YAeJZyz1+/dc1nFWsBFgA1VXoqvVk++2Q 0kE8crVgqijSkqQPO0CHETGmpCmCd0ThqeaWg+kqtaSyiqhCH5KBYwsxiUIJ5ShGQqKO iurHsCrPJm3nkwLQlVSC07Vdwcb/5L/UBAoEfarVZbgjvJaIn/GOank5f2zy1cl0fsBU 6Gdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vQCc966SXUWmxUzITD8j4jyP6srsgCllnc0jbweek7I=; b=HlqXeb3D7sCdODDj6KPBlIgI6s+s9pYb37NMUUecB73eKbXe/COY+auxhkgG4AAC/+ 1uKuLHfEVJrbq57G8tNcs/J3bBFTNGyTKad8SvH8Aonm13DPuK2p77qR0qPdPRjbrCQg VGyeC4c/iLKLgh/g7CpjhLr8drgWkyAqOiQzSuQrnX+8BMhR5EdVYHjoZ5Wvf8Ns6bbs i2H0s1uNx4rSgcfKmU7SiHR7Fj2ZwtRepR6pzQczcYCEher9tm6++MrlM0CQl06kITEV /sS9fiJ6M5zPcU2Ca6wkL+f3i0qE0fHSi6lgCYR8PMZOn46P+L88B/N9jsZrblVG9tcI T4uw== X-Gm-Message-State: AOAM532Xr9LUmCya/3lvyFl1MQ+9kwYNQfX6xKtXpDlFs9fTrc4LVflG ninePx4eN+T8iIZHkyKHb/0kB709BMKpPe0l3P1YRQ== X-Google-Smtp-Source: ABdhPJwzSMEuJSuh2QrLP5wculi4/MRed4/0p4GmnpoFWoc1/Fz8hjBkQyR9qR+/z38D9zBccESL4gX1oPMqqkjt4Qo= X-Received: by 2002:a05:6808:2d9:: with SMTP id a25mr9673299oid.70.1625483898064; Mon, 05 Jul 2021 04:18:18 -0700 (PDT) MIME-Version: 1.0 References: <20210705103229.8505-1-yee.lee@mediatek.com> <20210705103229.8505-3-yee.lee@mediatek.com> In-Reply-To: From: Marco Elver Date: Mon, 5 Jul 2021 13:18:06 +0200 Message-ID: Subject: Re: [PATCH v6 2/2] kasan: Add memzero int for unaligned size at DEBUG To: Andrey Konovalov Cc: yee.lee@mediatek.com, LKML , nicholas.tang@mediatek.com, Kuan-Ying Lee , chinwen.chang@mediatek.com, Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton , Matthias Brugger , "open list:KASAN" , "open list:MEMORY MANAGEMENT" , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 5 Jul 2021 at 13:12, Andrey Konovalov wrote: [...] > > + /* > > + * Explicitly initialize the memory with the precise object size to > > + * avoid overwriting the SLAB redzone. This disables initialization in > > + * the arch code and may thus lead to performance penalty. The penalty > > + * is accepted since SLAB redzones aren't enabled in production builds. > > + */ > > + if (__slub_debug_enabled() && > > What happened to slub_debug_enabled_unlikely()? Was it renamed? Why? I > didn't receive patch #1 of v6 (nor of v5). Somebody had the same idea with the helper: https://lkml.kernel.org/r/YOKsC75kJfCZwySD@elver.google.com and Matthew didn't like the _unlikely() prefix. Which meant we should just move the existing helper introduced in the merge window. Patch 1/2: https://lkml.kernel.org/r/20210705103229.8505-2-yee.lee@mediatek.com Thanks, -- Marco 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=-13.7 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no 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 B6E2EC07E99 for ; Mon, 5 Jul 2021 11:18:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3DDC7613AB for ; Mon, 5 Jul 2021 11:18:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DDC7613AB 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 E6B9C6B0036; Mon, 5 Jul 2021 07:18:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DF46E6B005D; Mon, 5 Jul 2021 07:18:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C46A06B006C; Mon, 5 Jul 2021 07:18:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0236.hostedemail.com [216.40.44.236]) by kanga.kvack.org (Postfix) with ESMTP id 9B1216B0036 for ; Mon, 5 Jul 2021 07:18:19 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 220CF2125F for ; Mon, 5 Jul 2021 11:18:19 +0000 (UTC) X-FDA: 78328285518.37.75FA397 Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) by imf15.hostedemail.com (Postfix) with ESMTP id D4E7CD000081 for ; Mon, 5 Jul 2021 11:18:18 +0000 (UTC) Received: by mail-oi1-f172.google.com with SMTP id 11so20414417oid.3 for ; Mon, 05 Jul 2021 04:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vQCc966SXUWmxUzITD8j4jyP6srsgCllnc0jbweek7I=; b=cHNJERRyJ5VgZnacJnPR2MSdn7fGw163AVo+S8UOuAHCb3pTWYCdTRFFjXaaX8GkUb 3VfdXnRbb2gNfY1PFm+w169rVHlgjvTg4J/NZqi+D5KtNopaQpI62sgNlwhOKwkOjn3y aM+SXKcxWLnYQ+r1haUMgwW3xnEhGhMTsG+YAeJZyz1+/dc1nFWsBFgA1VXoqvVk++2Q 0kE8crVgqijSkqQPO0CHETGmpCmCd0ThqeaWg+kqtaSyiqhCH5KBYwsxiUIJ5ShGQqKO iurHsCrPJm3nkwLQlVSC07Vdwcb/5L/UBAoEfarVZbgjvJaIn/GOank5f2zy1cl0fsBU 6Gdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vQCc966SXUWmxUzITD8j4jyP6srsgCllnc0jbweek7I=; b=Dcw1ARKzyqZhi6xTLkOp/DAjm0gsSBHpl9M+mAQ1OywTw6rq6EPza6qiRQ5gOhwhSG noKFkUSGeAs/dCZrZw2UBz/B4XxnJQgaXposjhe+MTNRhkqKrHlhOAVoBF7BwPZBmrTE Diu7cbctBGEC+c6B9Nhby+3poMbrlcrdxKFQmW4wgKw69buLGz5rj31300L2cB72HtVG lXV6gL2XgX5VhKXhFxVgda63cpEi+HhgT8fvdpveSxg1xI//2j+y+ycQorrdYBdJqJKa BS1HKhyI0NRd6un1jMffLxpXRfTUgSqBGOi+GaPeo6ZlnMD4I8zGoHM3uIJu1WaJCTe4 QYxQ== X-Gm-Message-State: AOAM5321fHU64o2hXslRyRHpCeAD+9uAI+HrJTF/nQqvt8sI+YQNnI2P JWtPsNUI9/K23eprntf9K1pZiaVw3dxpOsobqZ7iPQ== X-Google-Smtp-Source: ABdhPJwzSMEuJSuh2QrLP5wculi4/MRed4/0p4GmnpoFWoc1/Fz8hjBkQyR9qR+/z38D9zBccESL4gX1oPMqqkjt4Qo= X-Received: by 2002:a05:6808:2d9:: with SMTP id a25mr9673299oid.70.1625483898064; Mon, 05 Jul 2021 04:18:18 -0700 (PDT) MIME-Version: 1.0 References: <20210705103229.8505-1-yee.lee@mediatek.com> <20210705103229.8505-3-yee.lee@mediatek.com> In-Reply-To: From: Marco Elver Date: Mon, 5 Jul 2021 13:18:06 +0200 Message-ID: Subject: Re: [PATCH v6 2/2] kasan: Add memzero int for unaligned size at DEBUG To: Andrey Konovalov Cc: yee.lee@mediatek.com, LKML , nicholas.tang@mediatek.com, Kuan-Ying Lee , chinwen.chang@mediatek.com, Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton , Matthias Brugger , "open list:KASAN" , "open list:MEMORY MANAGEMENT" , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=cHNJERRy; spf=pass (imf15.hostedemail.com: domain of elver@google.com designates 209.85.167.172 as permitted sender) smtp.mailfrom=elver@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: D4E7CD000081 X-Stat-Signature: goia9y7p8ytg7wy6ufswzscrziwgkbes X-HE-Tag: 1625483898-252781 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 Mon, 5 Jul 2021 at 13:12, Andrey Konovalov wrote: [...] > > + /* > > + * Explicitly initialize the memory with the precise object size to > > + * avoid overwriting the SLAB redzone. This disables initialization in > > + * the arch code and may thus lead to performance penalty. The penalty > > + * is accepted since SLAB redzones aren't enabled in production builds. > > + */ > > + if (__slub_debug_enabled() && > > What happened to slub_debug_enabled_unlikely()? Was it renamed? Why? I > didn't receive patch #1 of v6 (nor of v5). Somebody had the same idea with the helper: https://lkml.kernel.org/r/YOKsC75kJfCZwySD@elver.google.com and Matthew didn't like the _unlikely() prefix. Which meant we should just move the existing helper introduced in the merge window. Patch 1/2: https://lkml.kernel.org/r/20210705103229.8505-2-yee.lee@mediatek.com Thanks, -- Marco 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=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 84D7EC07E99 for ; Mon, 5 Jul 2021 11:18:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C6EA6128E for ; Mon, 5 Jul 2021 11:18:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C6EA6128E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GzcySXsuJJIo7RliMHd5SiJGQlfK9VyUpuE4Xn+eqEU=; b=xzczzWVPbqfLqD 7rmZa7Kt+ipguNKxw1U8ge0UIE4ADIXBYrht0Nikv/VLdRKmzfnVz24QzqFihnemmyQ3Ndqsc1Ch2 R5u+MHMbcEXqSWB2P3teEPymXQtpAQc4CPKfQ+ryVOIRva5/tvdjf/hjd0UPbFMvE0krbNCL4R98B vB5Qw7dGfACb81tCLyIrBZQLsUeSXsQgMcbL+ALDyTZNJPSKUbRylOzbmpcbbRgzBd8gyW4J5fXcw dB1svsJ+1PMZ5+dY6AqmQyW77Xdq39d/jTE1U45riY1qrxX5IsxTL1kwysimY+SGSwyO1oMSRzM2p xPio1H5GdGLWOZ7MJIzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0McI-008jJE-Jf; Mon, 05 Jul 2021 11:18:22 +0000 Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0McG-008jHR-4G for linux-mediatek@lists.infradead.org; Mon, 05 Jul 2021 11:18:21 +0000 Received: by mail-oi1-x22d.google.com with SMTP id t80so20390797oie.8 for ; Mon, 05 Jul 2021 04:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vQCc966SXUWmxUzITD8j4jyP6srsgCllnc0jbweek7I=; b=cHNJERRyJ5VgZnacJnPR2MSdn7fGw163AVo+S8UOuAHCb3pTWYCdTRFFjXaaX8GkUb 3VfdXnRbb2gNfY1PFm+w169rVHlgjvTg4J/NZqi+D5KtNopaQpI62sgNlwhOKwkOjn3y aM+SXKcxWLnYQ+r1haUMgwW3xnEhGhMTsG+YAeJZyz1+/dc1nFWsBFgA1VXoqvVk++2Q 0kE8crVgqijSkqQPO0CHETGmpCmCd0ThqeaWg+kqtaSyiqhCH5KBYwsxiUIJ5ShGQqKO iurHsCrPJm3nkwLQlVSC07Vdwcb/5L/UBAoEfarVZbgjvJaIn/GOank5f2zy1cl0fsBU 6Gdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vQCc966SXUWmxUzITD8j4jyP6srsgCllnc0jbweek7I=; b=asTc5CtUuaXilTt6nXpR78mUPFtrmLjj8hCQKNh+5V0RnGHDJuC0qo9UZSQGbNCPIG G/AcOGOxRldKs2wBLBEiIMiHGSCXhhHTiGuoDH8/6JGotCKbIjHkPpV+IwIGacYezlim cF4TSw97I8hY/HtFwsPGAtQKwIBnEtyLIWM2mDfLrbprSwkBeG3tQVmQXbXX6hyrrdhC AO7hROVenR5LzwjXDXhS0xDgfy0EpuehYEZg0PFK9cIJnIZyqcJ9YX5oGGVECDwJBwdc rrIkrTODtzIBqb2Al4r4WtsfmNVcFi9L5D9FZ6sulf6QdmJ8Tf5KoYfopK5UGhIdUdul CJOA== X-Gm-Message-State: AOAM53244o1ckJCpEJ0+AQ5lH02adDygF7O+RZk6eRd57uBwJUONJO2N ouZQ1EXf+p8HN7zitv1c3hsRC0d0YE3MyBRVoN/JnA== X-Google-Smtp-Source: ABdhPJwzSMEuJSuh2QrLP5wculi4/MRed4/0p4GmnpoFWoc1/Fz8hjBkQyR9qR+/z38D9zBccESL4gX1oPMqqkjt4Qo= X-Received: by 2002:a05:6808:2d9:: with SMTP id a25mr9673299oid.70.1625483898064; Mon, 05 Jul 2021 04:18:18 -0700 (PDT) MIME-Version: 1.0 References: <20210705103229.8505-1-yee.lee@mediatek.com> <20210705103229.8505-3-yee.lee@mediatek.com> In-Reply-To: From: Marco Elver Date: Mon, 5 Jul 2021 13:18:06 +0200 Message-ID: Subject: Re: [PATCH v6 2/2] kasan: Add memzero int for unaligned size at DEBUG To: Andrey Konovalov Cc: yee.lee@mediatek.com, LKML , nicholas.tang@mediatek.com, Kuan-Ying Lee , chinwen.chang@mediatek.com, Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton , Matthias Brugger , "open list:KASAN" , "open list:MEMORY MANAGEMENT" , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210705_041820_245449_EDD13A77 X-CRM114-Status: GOOD ( 13.22 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Mon, 5 Jul 2021 at 13:12, Andrey Konovalov wrote: [...] > > + /* > > + * Explicitly initialize the memory with the precise object size to > > + * avoid overwriting the SLAB redzone. This disables initialization in > > + * the arch code and may thus lead to performance penalty. The penalty > > + * is accepted since SLAB redzones aren't enabled in production builds. > > + */ > > + if (__slub_debug_enabled() && > > What happened to slub_debug_enabled_unlikely()? Was it renamed? Why? I > didn't receive patch #1 of v6 (nor of v5). Somebody had the same idea with the helper: https://lkml.kernel.org/r/YOKsC75kJfCZwySD@elver.google.com and Matthew didn't like the _unlikely() prefix. Which meant we should just move the existing helper introduced in the merge window. Patch 1/2: https://lkml.kernel.org/r/20210705103229.8505-2-yee.lee@mediatek.com Thanks, -- Marco _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek 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=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 6CB27C07E99 for ; Mon, 5 Jul 2021 11:19:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 39907613B1 for ; Mon, 5 Jul 2021 11:19:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39907613B1 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e+NSZOWfJ3CIjTCkaS7vJ1zHNqBRES4mHtuIrqQ1CZU=; b=FDllM+svKU4Fzg ygsk44cOXWiktL6pU8zO43YWFkHaQ++YUCeCFOiOxDAhuM5Q4vmTVW/zGyhNui3Qdk4wEviQG08fX F0Wref5eVMA8Hnvv3Vgb658Yy3IXKswLCiEQAqxmsKLlBfKN8Wh8oKTS2qPCCuUqako1Jgr52Pn6m JN437aq3btaT9zeL+6PSoM/c3XQzIZ7vnZMxguhyqEJZLHlUMWpSZJd2oElVt6SKB3HsXw5rUW5QV rNg8hE8jVqvNrQhG+YdFJErdBmKVaF2eZNndZO+hOGei4ZAcGYXQXBrB3PCZ5wi1dC7XHPx4s92on lsUQFV43+UQQy0yV/fJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0McM-008jJs-8p; Mon, 05 Jul 2021 11:18:26 +0000 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0McG-008jHS-5B for linux-arm-kernel@lists.infradead.org; Mon, 05 Jul 2021 11:18:23 +0000 Received: by mail-oi1-x236.google.com with SMTP id s17so20456341oij.0 for ; Mon, 05 Jul 2021 04:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vQCc966SXUWmxUzITD8j4jyP6srsgCllnc0jbweek7I=; b=cHNJERRyJ5VgZnacJnPR2MSdn7fGw163AVo+S8UOuAHCb3pTWYCdTRFFjXaaX8GkUb 3VfdXnRbb2gNfY1PFm+w169rVHlgjvTg4J/NZqi+D5KtNopaQpI62sgNlwhOKwkOjn3y aM+SXKcxWLnYQ+r1haUMgwW3xnEhGhMTsG+YAeJZyz1+/dc1nFWsBFgA1VXoqvVk++2Q 0kE8crVgqijSkqQPO0CHETGmpCmCd0ThqeaWg+kqtaSyiqhCH5KBYwsxiUIJ5ShGQqKO iurHsCrPJm3nkwLQlVSC07Vdwcb/5L/UBAoEfarVZbgjvJaIn/GOank5f2zy1cl0fsBU 6Gdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vQCc966SXUWmxUzITD8j4jyP6srsgCllnc0jbweek7I=; b=S1Py/PycaTY6a85bp2f3O3sRGA1hOI1ub+x+gyYEBvb0qxTHWay0kAstdEikJlWsEj 2wJdB6yG1Dn6d+v5ZaGGxGJZNS4E/Bhg0YWc6hFj1mugkmFO1SpJ+koGAAsfQxyh+Kvu 63IHg3VAuIy5NAwq8OgE8ZfnRiLHATndBVQzVlDPqtgiGvSeCRET8+bcNwdqchbb7DyX Tq4omb6zrQCbaLSbl67GCIeNRr8LQIhx27iOKfL/tyMxPWyy6dsKrCoDbJ0rPV2dj1Mr yPCpyct6qVTFxFdfGaC0S1EIkbkhAdTm/mngs5pjZxpLQwiUZwKwmvXhtYHMHk4qL+3v jR+w== X-Gm-Message-State: AOAM532kJ0FmcZDKx/Vu4uXdSRvhvcZYFtWDi9/4y8YhYYElhrjhZkYe JshhlEvA7dvOJTz4Gf8ZKIlFtYrgFmD4KeiTTlYPIw== X-Google-Smtp-Source: ABdhPJwzSMEuJSuh2QrLP5wculi4/MRed4/0p4GmnpoFWoc1/Fz8hjBkQyR9qR+/z38D9zBccESL4gX1oPMqqkjt4Qo= X-Received: by 2002:a05:6808:2d9:: with SMTP id a25mr9673299oid.70.1625483898064; Mon, 05 Jul 2021 04:18:18 -0700 (PDT) MIME-Version: 1.0 References: <20210705103229.8505-1-yee.lee@mediatek.com> <20210705103229.8505-3-yee.lee@mediatek.com> In-Reply-To: From: Marco Elver Date: Mon, 5 Jul 2021 13:18:06 +0200 Message-ID: Subject: Re: [PATCH v6 2/2] kasan: Add memzero int for unaligned size at DEBUG To: Andrey Konovalov Cc: yee.lee@mediatek.com, LKML , nicholas.tang@mediatek.com, Kuan-Ying Lee , chinwen.chang@mediatek.com, Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton , Matthias Brugger , "open list:KASAN" , "open list:MEMORY MANAGEMENT" , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210705_041820_247979_8103DB8E X-CRM114-Status: GOOD ( 14.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 5 Jul 2021 at 13:12, Andrey Konovalov wrote: [...] > > + /* > > + * Explicitly initialize the memory with the precise object size to > > + * avoid overwriting the SLAB redzone. This disables initialization in > > + * the arch code and may thus lead to performance penalty. The penalty > > + * is accepted since SLAB redzones aren't enabled in production builds. > > + */ > > + if (__slub_debug_enabled() && > > What happened to slub_debug_enabled_unlikely()? Was it renamed? Why? I > didn't receive patch #1 of v6 (nor of v5). Somebody had the same idea with the helper: https://lkml.kernel.org/r/YOKsC75kJfCZwySD@elver.google.com and Matthew didn't like the _unlikely() prefix. Which meant we should just move the existing helper introduced in the merge window. Patch 1/2: https://lkml.kernel.org/r/20210705103229.8505-2-yee.lee@mediatek.com Thanks, -- Marco _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel