From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout03.his.huawei.com (canpmsgout03.his.huawei.com [113.46.200.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B675533F591; Thu, 9 Jul 2026 02:46:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783565220; cv=none; b=fvqcAIPycztdMsdujcxI8zgxu0n60FWzhiA7Fa72vx2Pcn6EFQ7v6Incy3BGxzANWm8Kjxmejm36sUXD4/pYfsAuCXoyvZXfKATgwKtrSN7j2EVI2JCCkvkAtC2rc8bwxGDKqDuQnolUG0eZXVuUtP7cz4gXv026hwW+ZlSutro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783565220; c=relaxed/simple; bh=1o+4KrvDbuwm7VajG0NfyjQFb7r7z9/rF6p2C4QlGWQ=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=e/iimhKEr2QftvWr0Njr/kD7s926fq9wjzZz6rt4SXNT02/Sckx8RWFhrJtfuaoik/TWYtm9DkPsVe6Wy+mRWkwCymB4LwJBe8/QuD3wJuFZmVrFfb51NISaTXUTnvINr8qfe3xATGZnb4ikUNshtKzpPwyxokE6xF46nvttWgY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=On7r31a+; arc=none smtp.client-ip=113.46.200.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="On7r31a+" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=kv8IL35UvaNtNSUMIaLZRkq9pv8ulEOI7gP7hRHl8KE=; b=On7r31a+HPKtqYCFGKCz4xqmSm+Xp8N2LTAjxPpcAv4gJhYIcSVayrLTG5iBdCMzOqUT02IrL XwrnDkN0nCnpOlz6679vIblC0MGBbYdgb5gp/4+6hf1F9Yi4y2WjjW/XV4WC9/v5qLynobzorwW 7UPpvG0wGL8s6DBSn4wLi4k= Received: from mail.maildlp.com (unknown [172.19.162.144]) by canpmsgout03.his.huawei.com (SkyGuard) with ESMTPS id 4gwfJv5NHxzpTBG; Thu, 9 Jul 2026 10:38:07 +0800 (CST) Received: from dggpemf500011.china.huawei.com (unknown [7.185.36.131]) by mail.maildlp.com (Postfix) with ESMTPS id 38F8540538; Thu, 9 Jul 2026 10:46:49 +0800 (CST) Received: from [10.67.109.254] (10.67.109.254) by dggpemf500011.china.huawei.com (7.185.36.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 9 Jul 2026 10:46:46 +0800 Message-ID: <499eca86-8def-4044-8b69-8f290528e10f@huawei.com> Date: Thu, 9 Jul 2026 10:46:44 +0800 Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [patch 07/18] s390/syscall: Use enter_from_user_mode_randomize_stack() To: Thomas Gleixner , LKML CC: Peter Zijlstra , Sven Schnelle , , Michael Ellerman , Shrikanth Hegde , , Kees Cook , Huacai Chen , , Paul Walmsley , Palmer Dabbelt , , , Mark Rutland , Andy Lutomirski , Oleg Nesterov , Richard Henderson , Russell King , Catalin Marinas , Guo Ren , Geert Uytterhoeven , Thomas Bogendoerfer , Helge Deller , Yoshinori Sato , Richard Weinberger , Chris Zankel , , , , , , , , , Arnd Bergmann , Vineet Gupta , Will Deacon , Brian Cain , Michal Simek , Dinh Nguyen , "David S. Miller" , Andreas Larsson , , , , , , =?UTF-8?Q?Michal_Such=C3=A1nek?= , Jonathan Corbet , References: <20260707181957.433213175@kernel.org> <20260707190254.030598804@kernel.org> From: Jinjie Ruan In-Reply-To: <20260707190254.030598804@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: kwepems500002.china.huawei.com (7.221.188.17) To dggpemf500011.china.huawei.com (7.185.36.131) On 7/8/2026 3:06 AM, Thomas Gleixner wrote: > enter_from_user_mode_randomize_stack() replaces enter_from_user_mode() and > the subsequent invocation of add_random_kstack_offset_irqsoff(). > > As a bonus this avoids the overhead of get/put_cpu_var() in > add_random_kstack_offset(). > > No functional change. > > Signed-off-by: Thomas Gleixner > Cc: Sven Schnelle > Cc: linux-s390@vger.kernel.org > --- > arch/s390/kernel/syscall.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > --- a/arch/s390/kernel/syscall.c > +++ b/arch/s390/kernel/syscall.c > @@ -97,8 +97,8 @@ void noinstr __do_syscall(struct pt_regs > { > unsigned long nr; > > - enter_from_user_mode(regs); > - add_random_kstack_offset(); > + enter_from_user_mode_randomize_stack(regs); The #include can be removed. > + > regs->psw = get_lowcore()->svc_old_psw; > regs->int_code = get_lowcore()->svc_int_code; > update_timer_sys(); >