Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp770511pxb; Fri, 22 Apr 2022 10:46:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKiRj4jDNx1mieHeew4DbeAjPAirUbgLy/xF5lRFp30OIEPeEq7Yl2LZZWSBV3dFkaJsxu X-Received: by 2002:a63:ce45:0:b0:399:1124:fbfe with SMTP id r5-20020a63ce45000000b003991124fbfemr4898581pgi.542.1650649613070; Fri, 22 Apr 2022 10:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650649613; cv=none; d=google.com; s=arc-20160816; b=fQOsf41T3OlaV7+cf4NGLpUibai0vQxWB1xGzqLvEMgosyJ8Tfz3wIGO0DBSsjwrKS Gr+oATduanO+9w8tDkwM8nnzjSQi778oNkbpl9D0NCYRQwOsuF7jJ3rG8CNKbLLwTiaP 0SO1B/aOHA2b/914d/20W4l8bH+J7xgknxuypApb2ZYsb04Eg9wY/bnSpoosch7Q8GGG biCA2PgfMGDUC+vk0zxt+AC197UILgxZuHeCG5tJRDi51M/dStyIWJXY7OjycOK5Q1/e p5xSfGCcYFYNVFVBgDZyoXbgVDwBNKwuVinkjJjAeqMQx3BhHmUmWa/elHZ1Lj7pBiFn ZaVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ca0BuBVr/d8uQqf5viG8UycJ7VWTDMA7hYPu8iqyqE0=; b=oL5zFlvpdpKu36UjFwMKEcOB+OV1d/m8eR5gpgDXBG88XDNE5vjJsq3EVvkrURAZUJ Bb1jmZQRWY/DD3TF/gLgfLE/p8fqjg9ZEqv3m0f3sCrq3RfXlkitXyZP502YXRND2yId yYTtcP65AUErcssnlt/sIEj0SVFDMHojY+ytbzdeJMFFqb18RiXs2U1HnKyOoXNE4Nt7 BCvzfP9OY2ChYnGe1IKm4NuI24fNWmPIz2Yw1MIQ1R6eBiDSy4FnxOJRassXKTgPZ/pk 8XYc8Xlersiyxi979YvIZfsEVJm/rUre+dv8B8f4IiX95Q30BZ5jya3+c4Cb/3+RcP82 Og2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YzXagblC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 20-20020a630414000000b003aa65330b92si9266729pge.486.2022.04.22.10.46.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 10:46:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YzXagblC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 73349D1CEA; Fri, 22 Apr 2022 10:32:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349885AbiDTEcl (ORCPT + 99 others); Wed, 20 Apr 2022 00:32:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236411AbiDTEcj (ORCPT ); Wed, 20 Apr 2022 00:32:39 -0400 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EA0062DE for ; Tue, 19 Apr 2022 21:29:54 -0700 (PDT) Received: by mail-yb1-xb31.google.com with SMTP id r189so755657ybr.6 for ; Tue, 19 Apr 2022 21:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ca0BuBVr/d8uQqf5viG8UycJ7VWTDMA7hYPu8iqyqE0=; b=YzXagblC6H8cB8lRJtSr5Z8G7olqqRNFPijud3sJXVYI/FAakCkj2Dnha1DMQzQ3Q7 ABbpJZVwpHzpgyEz1f1xZA8SvDMn6ua6TuMzpaLSyxFJmIcmPkhrXfXlAuxL7G6wTKDp F7hxEmqTBwtwbqYklooazDESdDTlD2A52eFWKQz+O3H/W2jMIlIqLld5OU/FFKWYa3kh 7EVkJU974u987fluC+xjR7LmLc2yVUujAa1bmaVjAUEyas4xZm6vlkrzttNloEKdLjJi 5in88C8szLmc7V7PyrYRhv6gYVOpN3X3ES8+Ny+es2JzmTEGQ/2Tk3cWIfieIrd17DkR e8pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ca0BuBVr/d8uQqf5viG8UycJ7VWTDMA7hYPu8iqyqE0=; b=a6nOJh3/UsONXf/Ne2bwUDTw6KJmsPdQj+bkYIDDJM34uW+R92UjbQG6J3D9yFfJnW yz9d8yjx3IDTb75nFM2izXkaYDAvuUiqt2ezsB0FFNO+JPndXpAz+5vdgCaksnnLYf4o 9PhPAJD8dIppgMKATv11SCHhWAelFHsmR8XQ01pf419KDc93Ppgvi1HbsK33hE/Lm3gM kaL4186PcfvGd74F7lnh22LsvFfMRm6KwBz9EV7mBRhqkmvxrSmZvGQm4b0akLfwdUkE KZe9a7aHm2yYnj4bjbXPiDpTxI+qLAdeSMnHk3yFFR+C6/EtMKVR/nahsMsZRgtUFOQy qcXw== X-Gm-Message-State: AOAM530IcgOMcRESqCCgFabq2DDkt/PyuNUdmmFNydH240GN/ZqsJNng thqYh8ktPGNSwyadILIcB2T51IDcCiY0GA05AuY= X-Received: by 2002:a25:b991:0:b0:610:bf4e:1b33 with SMTP id r17-20020a25b991000000b00610bf4e1b33mr19029133ybg.352.1650428993716; Tue, 19 Apr 2022 21:29:53 -0700 (PDT) MIME-Version: 1.0 References: <20220419204109.520779286@infradead.org> <20220419205241.339242797@infradead.org> In-Reply-To: <20220419205241.339242797@infradead.org> From: Lai Jiangshan Date: Wed, 20 Apr 2022 12:29:41 +0800 Message-ID: Subject: Re: [PATCH 2/2] x86,entry: Use PUSH_AND_CLEAR_REGS for compat To: Peter Zijlstra Cc: X86 ML , Josh Poimboeuf , Brian Gerst , Andrew Cooper , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE 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 Wed, Apr 20, 2022 at 4:53 AM Peter Zijlstra wrote: > > Since the upper regs don't exist for ia32 code, preserving them > doesn't hurt and it simplifies the code. In entry_INT80_compat(), the upper regs need to be preserved on the stack which makes the code identical to the macro idtentry except the special prolog. So reusing idtentry simplifiers more. I don't ask to remove the change to entry_INT80_compat(). But I don't think the change to entry_INT80_compat() fit the changelog. I think it is better to split this patch into two. The first one contains the change to entry_SYSENTER_compat() and entry_SYSCALL_compat() with current changelog. The second one contains the change to entry_INT80_compat() and PUSH_AND_CLEAR_REGS with changelog saying it simplifies entry_SYSENTER_compat(). My patchset can do the simplification by using idtentry and remove save_rdi from PUSH_AND_CLEAR_REGS on top of it. Thanks Lai