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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA5FEEC1459 for ; Tue, 3 Mar 2026 14:43:47 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4fQJTG0MqFz3bn4; Wed, 04 Mar 2026 01:43:46 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772549025; cv=none; b=OHj3ScFqkx/opwK8jK6dehkrWakfZkigVxor8uttzBh0WMN+OCevmP5EYtDlTQpa2af51MW7KcgMh18WitFtDPpa7ZaoEIQHbkA6xNKTMxZWTqPYGjrxQzGR9Cl1smJpO5cwSgrXJ2lXAEHZQV4SpQhzFd/XZQ7kQtc2RuZS8Pb5TAWiSCjWEOUDSHAUd0F4XzYJ9DqU4D7tlReSihP2jSqtEBbdVcQCoL4vGpwISjIzfTg6lQOiBfWcnb6nQJPSVCotag8KDKt8MUcn/jI+/7GdSiczZX7HKeUbwHy57YdZXDdcHQQcnbIrfD6tvweIXhoGmerqWfoTV0VU1am4fQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772549025; c=relaxed/relaxed; bh=l9/R9jHGK3WkzvY5Ld13Rqnr3iuMuxtEV3nciTD+gEc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Aay5eb7blwUCT1b9HZbmIkt7xjasqkqR7IAYHEOOKlWKlLnxrzKj+Dg3nDZQ3pEpWhg0/BRlIHAluHUzEKm44lt7C89n1U0rD5zXVZ4PjQ0XAciO8fotF7KqOxyRqHKKgQc8Jurgrz6UWVE7ZtAz8zG2SATMpiUhnb8BsC8a5yzlkosfKT94KGV6eq7BUY7jHCO+YAc+7x4OKdsvQG/3nWsqkuH5PS+0dEfvwCDzpMg+XbgsA5pMBoEVTGlXdQTJFFc+iw8tYDaTNiIQtnS9vFPhez9DvhWo9P7OrBRfciLMWhlmc2286UWqcyejdpIGz4tlEpRudENA1b4rmJRe5w== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=ryan.roberts@arm.com; receiver=lists.ozlabs.org) smtp.mailfrom=arm.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=arm.com (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=ryan.roberts@arm.com; receiver=lists.ozlabs.org) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lists.ozlabs.org (Postfix) with ESMTP id 4fQJTD31Trz30Lw for ; Wed, 04 Mar 2026 01:43:42 +1100 (AEDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2D7F4497; Tue, 3 Mar 2026 06:43:03 -0800 (PST) Received: from [10.1.31.220] (XHFQ2J9959.cambridge.arm.com [10.1.31.220]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 12EE23F694; Tue, 3 Mar 2026 06:43:05 -0800 (PST) Message-ID: <8c799a17-56e3-4ea4-84a2-b878337bddfd@arm.com> Date: Tue, 3 Mar 2026 14:43:04 +0000 X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 3/3] randomize_kstack: Unify random source across arches Content-Language: en-GB To: Thomas Gleixner , Catalin Marinas , Will Deacon , Huacai Chen , Madhavan Srinivasan , Michael Ellerman , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Ingo Molnar , Borislav Petkov , Dave Hansen , Kees Cook , "Gustavo A. R. Silva" , Arnd Bergmann , Mark Rutland , "Jason A. Donenfeld" , Ard Biesheuvel , Jeremy Linton , David Laight Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-hardening@vger.kernel.org References: <20260119130122.1283821-1-ryan.roberts@arm.com> <20260119130122.1283821-4-ryan.roberts@arm.com> <87ecmcwjh9.ffs@tglx> From: Ryan Roberts In-Reply-To: <87ecmcwjh9.ffs@tglx> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 22/02/2026 21:34, Thomas Gleixner wrote: > On Mon, Jan 19 2026 at 13:01, Ryan Roberts wrote: >> I tested an earlier version of this change on x86 bare metal and it >> showed a smaller but still significant improvement. The bare metal >> system wasn't available this time around so testing was done in a VM >> instance. I'm guessing the cost of rdtsc is higher for VMs. > > No it's not, unless the hypervisor traps RDTSC, which would be insane as > that would cause massive regressions all over the place. > > So guessing is not really helpful if you want to argue performance. Sorry for the slow response. I no longer have access to a recent bare metal x86 system that I can do performance testing on. All I have is the Sapphire Rapids (m7i.24xlarge) VM. My original testing was on bare metal Sapphire Rapids (same number of CPUs and RAM as the VM). Just to be clear, these are the results I got with bare metal vs vm. Negative is an improvement (less time). (I)/(R) means statistically significant improvement/regression: +-----------------+--------------+---------------+---------------+ | Benchmark | Result Class | x86_64 | x86_64 | | | | bare metal | VM | +=================+==============+===============+===============+ | syscall/getpid | mean (ns) | (I) -7.69% | (I) -17.65% | | | p99 (ns) | 4.14% | (I) -24.41% | | | p99.9 (ns) | 2.68% | (I) -28.52% | +-----------------+--------------+---------------+---------------+ | syscall/getppid | mean (ns) | (I) -5.98% | (I) -19.24% | | | p99 (ns) | -3.11% | (I) -25.03% | | | p99.9 (ns) | (R) 9.84% | (I) -28.17% | +-----------------+--------------+---------------+---------------+ | syscall/invalid | mean (ns) | (I) -6.94% | (I) -18.56% | | | p99 (ns) | (I) -5.57% | (I) -20.06% | | | p99.9 (ns) | (R) 10.53% | (I) -25.04% | +-----------------+--------------+---------------+---------------+ So both sets of results represent an improvement, I would say. Given the level of review that the series has had, I propose to repost today, then hopefully Kees will be happy to put it in his branch so that it can get plenty of linux-next soak testing and if there are any x86 regressions lurking, hopefully ZeroDay will spot them? Thanks, Ryan > > Thanks, > > tglx