Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp3755856lfb; Mon, 9 May 2022 03:25:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj6zY3oqU+YYdVSkJqSVu5hVvtxYDp0rzuaF63b9c09dc0WJFgUCEgQv+osVLvugW7z3v3 X-Received: by 2002:a05:6a00:801:b0:50d:ec66:fac0 with SMTP id m1-20020a056a00080100b0050dec66fac0mr15467503pfk.23.1652091914335; Mon, 09 May 2022 03:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652091914; cv=none; d=google.com; s=arc-20160816; b=DWCangnao33uSPweKwyCJeHxPAf8psZen1qRP+0I+okp8p6UChcuh1U/xhR8H8v6uL +pkkv803WEBpeNkA8qe6jlExrkUqsOXQhyFRt/2iflromAKFRJgMf5b1Deoqx6ahpE5U a6dJRN35Pzj56Mz74I8OxqHBOLEL7Gg+hz5pRc/4dIFeGvgYpyw2D8Yv5TNyX3xRVk0i SvBGzjlnJX2kaf6qdRds5fbKkU4vwTEk30a0IzmFDuKKbtk0SJAUMtcEjOGh6V8j02wb BDl12ebU6tmk6oyio0mBnAuNfQrNsTIdZPUX4uD/oOAe+/H3VRILkZaUM1wX88Tiy8Hc kvLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wBYJb025r/PmjnCJ2jgNM6Uu8wmuFqp0g2HraO+Rbss=; b=BcWEANcmjMga6LoWG06EikrCvTvQ1RhKFWumNvo4UMnsPP2UWPyLF9PKJLc16XQP6C OyYH0Gu/yhrebEp67CFAaxJdIODGQQGN7HuuHQ9fGsyzJCVKpD43z/Fs1xln99wk3les OE+zlgC5U5y1fXME/uCJjI0GLU5efBS2uhsFW20h6JZtkMdSYPH2fAm7PACBQ1uBjQTm 31H0EOYL/EWjcSSLs1pXbs3RenXE4Y+cHNlZnRaSeAvhtkdxsrzOY0aR7M9mIHgCqExR XSWNbQxRZ5Lj4TEgsaafk3YuKbqkHqG5CHYKE98yLvqtQS18ZZfRe/9tahJEBxKzb7rt pBGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=DvztEdZl; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n11-20020a170902d2cb00b00153b2d1649fsi13226843plc.167.2022.05.09.03.25.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:25:14 -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=@infradead.org header.s=desiato.20200630 header.b=DvztEdZl; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1F1C7248E24; Mon, 9 May 2022 03:00:29 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236095AbiEIHZy (ORCPT + 99 others); Mon, 9 May 2022 03:25:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236665AbiEIHMm (ORCPT ); Mon, 9 May 2022 03:12:42 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DA1E185C86; Mon, 9 May 2022 00:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wBYJb025r/PmjnCJ2jgNM6Uu8wmuFqp0g2HraO+Rbss=; b=DvztEdZlncnAAApMh0zkmsqJ5K v7XcB/Nhdc1Se73DIYdf4e3R7gJTyb1yfyt0Qs20V+V+zDYYldBS1zKx6kZTt1glnEfoBJH25N2uF FEOg6hDS84YylnT7SlSGu2PXmBMApV1fx/M+BDgkE8eiwKMqF5sMTVoRqS/R8s/p9+7RmF/XLArYk gdcd4Qt0ngsj/pcnMjnSuqR4PaVEOBkBr7+877T9JEOHFzzcOS9HzeSAW148vcGuQrRHnsvYFdqSP 17xS97WpxKH32HJPDde+cD4yZwFjlyPFPWWXn4TpcpDXCiYgwUb7hdg+91EVmwSU2PKtF1QtYIS8C ve6mOR5g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnxVR-00CUSx-NY; Mon, 09 May 2022 07:08:34 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 5E258980E93; Mon, 9 May 2022 09:08:31 +0200 (CEST) Date: Mon, 9 May 2022 09:08:31 +0200 From: Peter Zijlstra To: Sven Schnelle 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() Message-ID: <20220509070831.GD76023@worktop.programming.kicks-ass.net> References: <20220504062351.2954280-1-tmricht@linux.ibm.com> <20220504062351.2954280-2-tmricht@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 On Mon, May 09, 2022 at 08:20:41AM +0200, Sven Schnelle wrote: > 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()." Sure, thanks!