Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp783739rwr; Fri, 5 May 2023 05:08:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5dJt1klzsURj4h4FdP1AsN7D1YMPJCP0HLLM+g/g4ARKx+JYRwhQjvAd4Uq3DvzTqiVIXD X-Received: by 2002:a05:6a20:a114:b0:f3:ae06:c4e6 with SMTP id q20-20020a056a20a11400b000f3ae06c4e6mr1714021pzk.6.1683288517450; Fri, 05 May 2023 05:08:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683288517; cv=none; d=google.com; s=arc-20160816; b=Iy9CcR+7Cfv88HOIr1ud5IbeeTvKda4ej1whsWCw/TRr3DAruO4fdSOC+iG7C/aTl6 7Li2w7SlMnpmFjH5735xEwLBXOvbTYgWiwEVdKazArmMLrHE7KErtcMMPs4ZFjol6v5O 1M2BKJih2WKXLPakoQxAVAht42eptkq1uz0ckdY/ZwHlgE3cPlXdWRHASNeg1aQwBjoy jjgW5WaN0lPU0zshRXFtxuSphq73sto4UOT5eAT7Il7Btsj7Xz/x+K/US1kOjhuxaJ1v RE8s5oCrMPLVWhYmR/FfjlKX4Ze8QGsSMzGEQvBjFMcMzEF7umLGfBrOYnGFzjpVu3au aUwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=wL0ut7KPgA2OC3Dll+ns1sPtjzsQDnTnwgItU5roP2g=; b=R4qjDLLIF2ZWIbW0VvIA+45V/TSt5cQNIsK5nk+GCy6Ma2OHGzF/yBXXjaj0mI4WRd S4eVDyvvBuq6FLyFzTzF+w+fLQhzSSCss+er56sf9xEpjlVFO0wHbQmi5q1SpW1nhS8Q FuNVhw9Il4lX2FZCMDfp9C2smJg1HulDyEStWwV/lV7vhTWIZqZm6c3dxcSrbXDg8PcR gSominNRh9acqURShpueRLovEPLVx0/YJ/THai8kyPvpOBxRceSCzUnV7LXZdrJ9fDld 2mvw0zQcg03kxOieJLaDOpOcw3MoiDyvdRiT9Za8ufSDCO6iaheo47jHcpyYpECYiEI6 3eKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=pAnBmTvp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i189-20020a636dc6000000b0052161765a25si1810805pgc.288.2023.05.05.05.08.24; Fri, 05 May 2023 05:08:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=pAnBmTvp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231961AbjEEL4w (ORCPT + 99 others); Fri, 5 May 2023 07:56:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231785AbjEEL4u (ORCPT ); Fri, 5 May 2023 07:56:50 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25AC81492F for ; Fri, 5 May 2023 04:56:49 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4QCTgG04Kbz4x3k; Fri, 5 May 2023 21:56:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1683287802; bh=wL0ut7KPgA2OC3Dll+ns1sPtjzsQDnTnwgItU5roP2g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=pAnBmTvp2iT6sEDsOS3XkU3XM/V1lGsw9QC2wCL8EmIE9d0cEUAwxoibwuvYo/6Cs BbXtw4WRlWj1hdo4z6MV1fxNWNIpN0w8YVqJBpoGofE05Bs4wpvsM108zY+XJsHu1n rObjiNrn/fjQRwK2NQ9KwrdPQ/NE6EcZwUgh1j0uX7JqgUiYAiZ/K348c4FM4qoZ/j H0i3KKVzdi+3D6u1M+3FDapoVJCy2C1r11M23k7XKnDVjh17qBledtTGpPxTrIaSH3 IUrCmu+2us/uZTtygzUq5yv6gPMf8Iplw9akcH6uM+qiFLpwClsixZUEipR7XYJGVU dqpTxyBv+iOGA== From: Michael Ellerman To: Marco Elver Cc: glider@google.com, akpm@linux-foundation.org, zhangpeng.00@bytedance.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] mm: kfence: Fix false positives on big endian In-Reply-To: References: <20230505035127.195387-1-mpe@ellerman.id.au> Date: Fri, 05 May 2023 21:56:40 +1000 Message-ID: <87zg6j56vb.fsf@mail.lhotse> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Marco Elver writes: > On Fri, 5 May 2023 at 05:51, Michael Ellerman wrote: >> >> Since commit 1ba3cbf3ec3b ("mm: kfence: improve the performance of >> __kfence_alloc() and __kfence_free()"), kfence reports failures in >> random places at boot on big endian machines. >> >> The problem is that the new KFENCE_CANARY_PATTERN_U64 encodes the >> address of each byte in its value, so it needs to be byte swapped on big >> endian machines. >> >> The compiler is smart enough to do the le64_to_cpu() at compile time, so >> there is no runtime overhead. >> >> Fixes: 1ba3cbf3ec3b ("mm: kfence: improve the performance of __kfence_alloc() and __kfence_free()") >> Signed-off-by: Michael Ellerman > > Reviewed-by: Marco Elver Thanks. > Andrew, is the Fixes enough to make it to stable as well or do we also > need Cc: stable? That commit is not in any releases yet (or even an rc), so as long as it gets picked up before v6.4 then it won't need to go to stable. cheers