From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A582B30FC1C for ; Tue, 19 May 2026 02:32:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779157968; cv=none; b=Kh5VTYyv2O5ALab6lKI24JlSQQaGNoiijkNMzeYCw2pkDkS84R69vHycPsNzLYNFwK5KYomXDD+zqS5xWMuDCdLRKk26hQuRNzZEiA5lMMvqGsYKmjbEbvQqwhojIIT34vpaQ4mhwwUvAV9TRjGRdLMBbST2CkaPn/Ziz/yCI5M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779157968; c=relaxed/simple; bh=+1Rq+XpE/2iXe/JnSZqTkyDn6Xdj3FVk9xULcGkYY4s=; h=From:To:Cc:Subject:In-Reply-To:Date:Message-ID:References; b=Xm2lQFiriqEhPTUfGZ+7MtxgBeQjvq1mIjGpk93yS8AKxrCVzDwIbuun3fXDsifGDEqvHlA6kcyA6qNI1XEIs8LaQ9CUC1fedN1oBllAvGUNpXaU/HKU6I+6+h12OFlvvyI940Y3vlfCyEd8Yj0EV7wrZi3skdMPtflMEGc7SBc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TQzCbvox; arc=none smtp.client-ip=209.85.216.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TQzCbvox" Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-367cbac9cb1so2820323a91.3 for ; Mon, 18 May 2026 19:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779157967; x=1779762767; darn=vger.kernel.org; h=references:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=+1Rq+XpE/2iXe/JnSZqTkyDn6Xdj3FVk9xULcGkYY4s=; b=TQzCbvoxit0IFUnhmphSGhyvkXV/cO8IisRtqwyc9UU/sQW0SyzDG7ayNcojU8ljIf 0sMZM4y8BSlm5RQDILfsEbPfTxkWLptVPfHtL41P7tTG0u4NuWToB00VHurzF9FuotqH amH97hJRt/P1fTA8mSzQ94YgbWp0r21imUKPmja30T0qK5dDd8SHtj67ifwIY3kiLbkZ xoiJqwXl+m7q7gLYtE2MJsdDX2b+nYwI+kAQ21taIxtAP0JkxhgKOiKnm2QSSnN++kK0 kRjntcwsBp5Z/wf0jRx2hVLABWnXmJSxVTjqKxHYYvIJV8gdWtwIivCTNA2eFw5Oj+Vp co3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779157967; x=1779762767; h=references:message-id:date:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+1Rq+XpE/2iXe/JnSZqTkyDn6Xdj3FVk9xULcGkYY4s=; b=Q9rNztuzDG1ftVFRZ90LavCEtEHU+YQobb/VWDuytkjvqxUs5jzjS8hWJf5ZVrDPrj dwBDBrN6zHWLtSWoxDKgl/rHi+nSmLsn7F6jh0JgJO7TWEy+DwUe+nSjW59Ov9H0SM1v eBI25hvgZPfDLYiecPyCx0NNKMpJ6pA4lfPvrAflNiaMqV+N6mJZ5wmeLDyxN4HMZe8s x4NeOfLSdpEBu9K93E+KCjn4v0Rbah0fdxVbdnM1NheeH0MDSRu2uIaVoUKM9rjjrqzH 7CTMeYeTOuQJOlnlXOheXl4VPcwdMvl200AcpP0PGvBGnH3AwnjjQv/3yCvgYsj5YuF5 YSWQ== X-Gm-Message-State: AOJu0YyzA2QF04RmEHSZYBiytCEaGoTXls0AJgKwAal7ETnmXHeUQV8/ WzFmhs4hksT+Ww+cEfBfcjS8W9XpRPzVhKTxFuVDI0SWoiBZTkn2zu5h X-Gm-Gg: Acq92OEcEZGHF4oJZsq7wcjSp536mcfb3TX9s+nm56NFeFG6iekMPEKWkStfs26nJif cUgfgbOuyElmvTcG2jqHTz/ojoxJPUVryQycUCGdZEiS3vGEzk9u779uFfHfd27jtOwWeL1mSDg 4SHxuteHZeV98j5Lzzo5ZjjICaiXhwGvpymfIEEHnbtRn9OjB/N6VxpcivJglibhj8u83vFck1/ LFPIm8nR8wRRcBTF6cXfNPhvMypCJyfuPJkm0P6bkif0ipsMpBl+aAV+hrQRmefR1xiA3I2JD3o ujWElRk6f1+HzkcKySz23YRgHe7Kc4GW7koekOjfZ6F6hjPRrXFfxc9ZhljQ887U1Fa8ndTttls hqZUgw6fPPsxvU9kAwMyDZSMRcTvRDYNM+NfPyUtwxR5VvBs7tdWHo0gUgd5fjsl68+3pwKI3BE kGrX8uuR3L3JppxgCdx/5j9XhgDJBtF8NR X-Received: by 2002:a17:90b:58cb:b0:368:ea0c:1b75 with SMTP id 98e67ed59e1d1-369519cdf58mr17063511a91.6.1779157966847; Mon, 18 May 2026 19:32:46 -0700 (PDT) Received: from pve-server ([49.205.216.49]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-369517a8612sm12662487a91.12.2026.05.18.19.32.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 19:32:46 -0700 (PDT) From: Ritesh Harjani (IBM) To: Sayali Patil , linuxppc-dev@lists.ozlabs.org, maddy@linux.ibm.com Cc: linux-kernel@vger.kernel.org, Mahesh Salgaonkar Subject: Re: [PATCH v2 1/2] lkdtm/powerpc: add isync after slbmte to enforce SLB update ordering In-Reply-To: <2f8d430962a96a7498903b994f081deee4a4d97a.1778975974.git.sayalip@linux.ibm.com> Date: Tue, 19 May 2026 07:54:38 +0530 Message-ID: References: <2f8d430962a96a7498903b994f081deee4a4d97a.1778975974.git.sayalip@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Sayali Patil writes: > The slbmte instruction modifies the Segment Lookaside Buffer, but without > a context synchronizing operation the CPU is not guaranteed to observe > the updated SLB state for subsequent instructions. This can result in > use of stale translation state when memory is accessed immediately after > SLB modifications. > > Add isync after each slbmte in the PPC_SLB_MULTIHIT test to ensure proper > ordering of SLB updates before subsequent memory accesses. > > This aligns with Power ISA context synchronization requirements for changes > in address translation state and improves the reliability of SLB multihit > injection tests in hash MMU mode. > Yup, CSI is required for before & after a slbmte. Given we are trying to add duplicate slb entries, I think the isync()s added in this patch is sufficient. LGTM. Feel free to add: Reviewed-by: Ritesh Harjani (IBM) As Mpe added - This needs to be cc'd to Kees. -> ./scripts/get_maintainer.pl -f drivers/misc/lkdtm/powerpc.c Kees Cook (maintainer:LINUX KERNEL DUMP TEST MODULE (LKDTM)) Arnd Bergmann (maintainer:CHAR and MISC DRIVERS) Greg Kroah-Hartman (maintainer:CHAR and MISC DRIVERS) linux-kernel@vger.kernel.org (open list) CHAR and MISC DRIVERS status: Supported -ritesh