Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2101141pxb; Fri, 25 Mar 2022 11:06:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFYct9E9XNh3H9u7yTm7wheSgHL/uMWZ7eX7K2huTMSn8LtGOFPfZHlsS9lfcvHRqfSqkq X-Received: by 2002:a17:90b:4b0d:b0:1bc:4cdb:ebe3 with SMTP id lx13-20020a17090b4b0d00b001bc4cdbebe3mr13961888pjb.176.1648231570363; Fri, 25 Mar 2022 11:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648231570; cv=none; d=google.com; s=arc-20160816; b=eKSRasBRlAdgntnkZQytxbGfsNc/39o53G3yy/njg3sq0REFG/HPoAd6Ogh2XnK1By 9CN8mgnamBgM2u0BBLzJ3mSwUisUqHEXdnin/coH2D4bMIzjwClcwibkcZzx3k5swzc7 eQ51DMI7FVdnF1J/FvDVxXj1D0FPXO9niA28tKUG3rrRKV40mZiRk/qdOoUcD38dLzv7 fAXuh8Fo9TOCF4m9uJDmFeREPeTJXxMxwcArr19oeF/IM92ek2azu+MIbp1UqwgoYSaP 2Ru3u2tW0sxEAZ5+ZUeMPn97uV+OTjNjg3dTgiRpr0tEgqv2+77FnkWZAJG5933JJd5x SfQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ypjTi2QLglCgiR41jmHNzqOUbU21d8Eiot5Yiruzzgs=; b=y4HigabqfNJ6P5yYj6785eRZoafioVLAfmGDINwDwEOShgfvRp1rbnFLuTuDV9y4uB saoz/Ua6PP7kZUc17x60KXeM03Hv7V8WP0d2/FXP50/g4xZFmpnuqSLgN+aNRy3SIRfZ r6UGOZB7P3e1mkPeL4CuiKNIjSnGjP/8UBf6SIehXLkhkUlvZ5yQxbX81bHW7syhYZk/ ymVqu/+LFzNEJXG0MeA3GA6tMJEtZ20GeJ6tgkCsBA2H82C/83sFJi4jGqqvCVCvhqgD qtKtkM8wMWhBb3Rc7Tfp9TE/wx3Y20xG2GstNQ13ZZqCYVajZyvqfOb4p6Mqv2216bJS rDrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=N4t7XbHe; 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 11-20020a63154b000000b003829aca3f46si3131645pgv.347.2022.03.25.11.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:06:10 -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=N4t7XbHe; 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 465B3139254; Fri, 25 Mar 2022 10:40:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354494AbiCYPpe (ORCPT + 99 others); Fri, 25 Mar 2022 11:45:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377700AbiCYPnt (ORCPT ); Fri, 25 Mar 2022 11:43:49 -0400 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67511B6D09 for ; Fri, 25 Mar 2022 08:40:03 -0700 (PDT) Received: by mail-ot1-x336.google.com with SMTP id a7-20020a9d5c87000000b005ad1467cb59so5744438oti.5 for ; Fri, 25 Mar 2022 08:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ypjTi2QLglCgiR41jmHNzqOUbU21d8Eiot5Yiruzzgs=; b=N4t7XbHe4uReKLLLQVouF1CC1EXRPOEqBjekQXhgY+x10SXRnA2ht3/Mpfvx84fWdc k3wO9YDMbL7yby0tiJcsVhds4vYgV+Xfp59XpRrot0hsXMRJZilfBVbSS6q6tAvaAqEn McPJ3u2WAO2OMAr7EjIt/+hUTVOt96tnYM1fRBlBvMk5z5jz/HyLLzAUv7ONbk6bjXQ2 moAQSk2U5rEzb1xAPo+uJnKv8VkgtjMzB/ygE8WthIXWvEquhQ6YfdKz43Qp05N6Owqg 00hp6obuogSK9oxu6OFOKG76qsAOx3OnE3novTCASWJjA0YwJjz5mhDxhkAANwlS3x+P RY2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ypjTi2QLglCgiR41jmHNzqOUbU21d8Eiot5Yiruzzgs=; b=5WQY6kLGppGThZKnSjtWqNOUj1tVstdl0Y5Y848YiltvKNLqhpoAcI51hU8GTzA9gt jw3V+Z677gQYHsvU8tYplAq14Z/5iFxSxCbjcGqkrO5/NGz/hy7WJVrL+k32BzxZc3oD Jf6l5WW+V/Z9a5VrYAVITsc8VORmmM/OgZjUnrBvA4jiLx+PAvQ2K7KnWV8gVTfgFnue Jmt3CmQN2MjkXbravWPBTVtDK7KpjpFjHM4Te5zCBs7XgcSj3tSpY66rRyOa2RNDPHwh n2Uw7FJ1h8hmvM6GDJsEuzd7nNnhooH2VSmhXyT5Lk5g7sX9Kd83+LJz9t+Zw4f1wsuB iVwA== X-Gm-Message-State: AOAM532xomGLpgRTFtq7xLdq1OOv+D5tNwrKj4Nqspf8dfbUwDB//lMp FtooOZga1Tp1ZAlFw+0Qi8PTW+iXmA== X-Received: by 2002:a05:6830:1185:b0:5b2:4c85:5ee9 with SMTP id u5-20020a056830118500b005b24c855ee9mr4527447otq.335.1648222802518; Fri, 25 Mar 2022 08:40:02 -0700 (PDT) Received: from citadel.. (174-084-153-250.res.spectrum.com. [174.84.153.250]) by smtp.gmail.com with ESMTPSA id el17-20020a056870f69100b000de9672ac3csm1709566oab.52.2022.03.25.08.40.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 08:40:02 -0700 (PDT) From: Brian Gerst To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Andy Lutomirski , Borislav Petkov , Thomas Gleixner , "H . Peter Anvin" , Peter Zijlstra , Brian Gerst Subject: [PATCH 0/4] x86-32: Clean up GS segment handling Date: Fri, 25 Mar 2022 11:39:49 -0400 Message-Id: <20220325153953.162643-1-brgerst@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,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 Since commit 3fb0fdb3bbe ("Make the canary into a regular percpu variable"), the GS segment is no longer switched on kernel entry for 32-bit kernels. Clean up the remaining code that handled lazy GS switching. Brian Gerst (4): x86-32: Simplify ELF_CORE_COPY_REGS ELF: Remove elf_core_copy_kernel_regs() x86-32: Remove lazy GS macros x86: Merge load_gs_index() arch/powerpc/kernel/fadump.c | 2 +- arch/powerpc/platforms/powernv/opal-core.c | 2 +- arch/x86/include/asm/elf.h | 15 ++------------- arch/x86/include/asm/mmu_context.h | 2 +- arch/x86/include/asm/segment.h | 12 ------------ arch/x86/include/asm/special_insns.h | 7 ++++--- arch/x86/kernel/process.c | 5 +---- arch/x86/kernel/process_32.c | 11 ++++------- arch/x86/kernel/ptrace.c | 6 +++--- arch/x86/kernel/signal.c | 8 +++++--- arch/x86/kernel/vm86_32.c | 4 ++-- arch/x86/lib/insn-eval.c | 5 +++-- arch/x86/math-emu/get_address.c | 2 +- include/linux/elfcore.h | 9 --------- kernel/kexec_core.c | 2 +- 15 files changed, 29 insertions(+), 63 deletions(-) -- 2.35.1