Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp3749379lfb; Mon, 9 May 2022 03:17:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMsqLlWaYMXCOmBTvGGLpXOBR/kTbBuCtwDBtKRhB1R0Ke5RZnaReWJq9pIxIrSezIGNDE X-Received: by 2002:a17:90b:1e09:b0:1dc:6d9a:4f57 with SMTP id pg9-20020a17090b1e0900b001dc6d9a4f57mr25480115pjb.17.1652091466958; Mon, 09 May 2022 03:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652091466; cv=none; d=google.com; s=arc-20160816; b=XS1z+dGGsc+wpi+hrTAZRmLAuYhEUEA/M8WVXb3LSmqIjsTW/VmTBnqb8d7NlAEE4x cDu8HV+6nWn1GDNXiz0rXWi0FgdGUBRCB+SktifixguZ07IQQ5jCfAXvjN3tH08iSLXa u3iAeva2bgKK/nJquuWyQQN2+wcKs9amsLAU6BremQuWOL/jG/4B4G2Ude7UdftAxW/P C91JBcLQpdn3EYWy+XyX+XuvU9/tm4vhsoujDDNYR36UHlQnSbMXgnX3aRiNIaLRtrl0 Hu1sHVruQ1ulcVQcLlmBTvXms8AMyN2RXBohmFUtxVSF126+Ka4jZQhZMFN/GjY+1ahQ qXqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=XGsTLEwOaQIfxo397XNIDIaNBSvxTkajB9Ez6aSnGFM=; b=yQZlJVLQdY/OeStXdQaKePvaP4c8mS+j3NdiQDKOl21XXFBFFHiJwjvUjxIigvKQ0A iAgd+KBdgNJyfzThO8ZiLVfB7gWQvYWhm8ATfRsd50BIr8D1WcWyQv8Jpj7NShCNcZQo IJ51jfyZq3aTjEkZHZHRY0xTRzlWbvz7Ld1qNR6+Lo5Kk1qwjoiNsmbjZD6mr0ZFFQ84 WTF5TeY33I4mddSMc5L45kDt+zT+DpmxMVgAns2w3hgnKPhNyH7A6bhqBDD1t0VSazU3 HW9Ga9d+YEkY2/B0ODO6RWvt6eSTt6VP7qhZ/lG4I7LMvAzTsmJyGmcSewQH8N+7j77N P//g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=iWNQjqRX; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h3-20020a056a001a4300b00510a6524248si4271285pfv.224.2022.05.09.03.17.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:17:46 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=iWNQjqRX; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0B1F6246DA6; Mon, 9 May 2022 02:55:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233373AbiEIGau (ORCPT + 99 others); Mon, 9 May 2022 02:30:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235410AbiEIGYv (ORCPT ); Mon, 9 May 2022 02:24:51 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E58C8245AE; Sun, 8 May 2022 23:20:58 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2496KaRY016784; Mon, 9 May 2022 06:20:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : references : date : in-reply-to : message-id : mime-version : content-type; s=pp1; bh=XGsTLEwOaQIfxo397XNIDIaNBSvxTkajB9Ez6aSnGFM=; b=iWNQjqRXd7YPdLGKpwm2G6ul0y3DZKRElQq2TOWzsPtmxRCuHvjNsdNABJQtm0y7Jn1G ncAf08kdZylF36ugDa65vMDyg7X3PAixWLA49PhQlAnpxWklP1OD2gO2Pres91Fv6o0V 0HYrvRWsrpff1O1Pq6zZDZzDNGJDEEkHXJSPo5NvhEMolhpe9L7gpN15OjrvnYuRBrcg f4eoNKoONPoKtwAQJWNzxZKlGrJZztpp2JefBXdye0wpWAJHzm/Q4Usu2HvFz/IJbjY0 isFgdpPvahYYpfaZmM+/tlG4LxuAaXwIwDf4rGYPu1blj+sHqDRtpeiaVAHhcvfnRQQj iQ== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3fx2jrb4pd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 May 2022 06:20:46 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2495ww6i012343; Mon, 9 May 2022 06:20:44 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma06ams.nl.ibm.com with ESMTP id 3fwg1j20ry-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 May 2022 06:20:43 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24967AEP49414612 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 9 May 2022 06:07:10 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9AE4F4C040; Mon, 9 May 2022 06:20:41 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 615F64C044; Mon, 9 May 2022 06:20:41 +0000 (GMT) Received: from tuxmaker.linux.ibm.com (unknown [9.152.85.9]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 9 May 2022 06:20:41 +0000 (GMT) From: Sven Schnelle To: Peter Zijlstra Cc: Thomas Richter , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Thomas Gleixner , Andy Lutomirski Subject: Re: [PATCH 1/2] entry: Rename arch_check_user_regs() to arch_enter_from_user_mode() References: <20220504062351.2954280-1-tmricht@linux.ibm.com> <20220504062351.2954280-2-tmricht@linux.ibm.com> Date: Mon, 09 May 2022 08:20:41 +0200 In-Reply-To: (Peter Zijlstra's message of "Fri, 6 May 2022 21:31:22 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: YhL3zwoMZ-Ah8l3NxD6xTzZWCviAR9gZ X-Proofpoint-GUID: YhL3zwoMZ-Ah8l3NxD6xTzZWCviAR9gZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-09_01,2022-05-06_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 mlxscore=0 bulkscore=0 spamscore=0 malwarescore=0 adultscore=0 priorityscore=1501 mlxlogscore=892 lowpriorityscore=0 impostorscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205090035 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Peter Zijlstra writes: > On Wed, May 04, 2022 at 08:23:50AM +0200, Thomas Richter wrote: >> From: Sven Schnelle >> >> arch_check_user_regs() is used at the moment to verify that struct pt_regs >> contains valid values when entering the kernel from userspace. s390 needs >> a place in the generic entry code to modify a cpu data structure when >> switching from userspace to kernel mode. As arch_check_user_regs() is >> exactly this, rename it to arch_enter_from_user_mode(). >> >> Cc: Thomas Gleixner >> Cc: Peter Zijlstra >> Cc: Andy Lutomirski >> Signed-off-by: Sven Schnelle >> --- > > With the note that NMI doesn't (necessarily) call this.. > > Acked-by: Peter Zijlstra (Intel) How about: "When entering the kernel from userspace, arch_check_user_regs() is used to verify that struct pt_regs contains valid values. Note that the NMI codepath doesn't call this function. s390 needs a place in the generic entry code to modify a cpu data structure when switching from userspace to kernel mode. As arch_check_user_regs() is exactly this, rename it to arch_enter_from_user_mode()."