From patchwork Tue Oct 1 14:23:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 174868 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8622927ill; Tue, 1 Oct 2019 07:24:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcvmbR3Nq9h7PH9AMfHKuPWxPIHYstaOULjv38wnkBsfdC67oItNx3bYFNn4P2ylVRJX1G X-Received: by 2002:a17:906:8054:: with SMTP id x20mr24063875ejw.65.1569939861671; Tue, 01 Oct 2019 07:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569939861; cv=none; d=google.com; s=arc-20160816; b=i/3N25y3FpzVDRlrDYWCpAPhhh19mq4r5I1we+26NCgV82RZ/J0sA5oDIIkti/+giG oiNF0wrGLe7nZdKHuIK0wgHkX503R6QQrXGtdH/BBp4pRXQX09GOcArRT57zcbqyq9I+ xqGnqosR8hvxzMYUYxcXD3BeyKVvoVJtcAf+g6oCYXCB2uMnFpJklBPLn8jLAVYTf8m/ fTQyj7G9RAo0aa5RQJ4zmWQItzFOGBxmyr0XgowWo+h38JANtvHSgEXvoKMWv5giQUZd z203UJcxWpa8UsIbxpeA0c9ewRatvzqOzLiRxmB7k/GFWooI8A1Pub6M07JmayLbYzEf hrcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=O28TNujxcj37XxBwd3Z6FAI2D2tg1xC4XBe3qAD+kPs=; b=BkN3xCYXEO1vA6W438D7rouFJGfFiDC4YPYgtyrQzssMbwZDHnC/236+g9ZPhkmH7d UreE8Ch44+9E8sdoqVD9tlsFcfhzzVgjEY6uXLv+jkkPPX2+PXSB67vSMd6kSKSdlxnT aPdGnV4kKfG/18uPZxeX1rNsfhnZ/ryPVLuipyqp3sWqBzp9dbB2niaMtwnN0gKY6PdI I8XjjNdsbM1LTzYY3zhPHgt4h0qC7Y/IftwLlQSZ4TNawrhHpkhUQGZUpL4v9ogfqhmy TQ65t0V19qvevOa3m5JvcPbNXONFmq79MJzvT+z7GxxqjIIP1HzK8pQ25LotXgYHdLCv 9BWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g17si8845558ejd.123.2019.10.01.07.24.21; Tue, 01 Oct 2019 07:24:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389152AbfJAOYU (ORCPT + 27 others); Tue, 1 Oct 2019 10:24:20 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:42711 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387581AbfJAOYU (ORCPT ); Tue, 1 Oct 2019 10:24:20 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1M7KKA-1iEEjW3xoi-007mdl; Tue, 01 Oct 2019 16:23:47 +0200 From: Arnd Bergmann To: Bill Metzenthen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org Cc: Arnd Bergmann , "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] x86: math-emu: check __copy_from_user result Date: Tue, 1 Oct 2019 16:23:34 +0200 Message-Id: <20191001142344.1274185-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:LSi0qIo+IKbHrXfP8Pkp9zAyLXlnrJvmni8tHxKb+O/Ub6ZCq0u 8x/rt9ECezApygTNTCiR6o6x7YXpUjif6bYeQ5IqOudSHIC8oD97FqGA9IOYh71bbgxrEd+ X2TMh0HRObpO0nE+bsl4/SPOamlDdr0G7OtTVCkeTmi3ulMA8eRvdk/c0qfUsy3bADf2rgP I5GTN7GjOBv+EHIMNEpZg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:tHN9agYJA24=:WAnScvCNVDqWi++T8PHk1X hycN+9acEwOfIchp/tpSCsUeAlUFAuEpARB7kluKG3X2cUuv53W0TQjMJO0Qw1k3xHFhDJx+x tCLsbCl43AHerQg8+0cAYTq7fATZEjg9sQyDVnwHoQWUzAWPXDFzTr/8Sxtb6hvEo+FCB2Cgc 8p7sHI9M0klcI1N59W/F1tQRST535LRfAqbLoRLRhrxl2dSyMI18CMYpZzHEb2by7MwWauR70 /kbw2aWxRItCoxD3OSY7BQK1WyT4xKrcfoyxbb9CHYISghtPvFh5eBGgGzZNSFQq3wVAClymt dOcrY5P0ADtA5+ItxZ0c/ZA5ONiHHz3h0HiubOp8ptdE9o7hZTN/tlkYD2kDpqBG0TBcr0j/a Yp7jqRGmFfbjc/J1CG2asts1ZkbKjD1Zclkn8UuIJF9B6N43uGm7sLHQRkfdU7RVI8qvvfZIX AZPZrTlhG0KM+Ft5uwOjSlMGmhDag39DHQLUxttfhy50EbnJsO3J+MQJ7kLJ5WeYV86iEUadc KM+wnO8iQ9FteSg82qVAjkm+fVLP7WsS4Okctn0EJDMj4+EJfvgQZ6dRe2TPE/zoc0nvmzqno +dDHgY7Fb/STdRxP6K6OzTgEdqbKosgFWCa04nGEnzKash6nyGbgTvymF07BnHCvxbuXwZ56m EJS2SNaPyIRb3O4IzgiooEC9O0STZ3oZ7VNw+bY7sGWsfdqYhzInJDdUx7jPf04pQMWxUb1HS APtxdQIt8ZC8kODKowHAAjkNKhrwmNfW0yjWusY4A7BqOPn6EvdgmCzNWX5FctLPC3yh1pBJd LGPV5PIwH7CN4/xCaaG92ls3JzU3Pxeaa+3AOXVrW0hzkRvfuKgSLtrQoW5Xegt5Hyi7obUKs kBAE+4u/AtS/8IuB/kSQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The new __must_check annotation on __copy_from_user successfully identified some code that has lacked the check since at least linux-2.1.73: arch/x86/math-emu/reg_ld_str.c:88:2: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]         __copy_from_user(sti_ptr, s, 10);         ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ arch/x86/math-emu/reg_ld_str.c:1129:2: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]         __copy_from_user(register_base + offset, s, other);         ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/math-emu/reg_ld_str.c:1131:3: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]                 __copy_from_user(register_base, s + other, offset);                 ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In addition, the get_user/put_user helpers do not enforce a return value check, but actually still require one. These have been missing for even longer. Change the internal wrappers around get_user/put_user to force a signal and add a corresponding wrapper around __copy_from_user to check all such cases. Fixes: 257e458057e5 ("Import 2.1.73") Fixes: 9dd819a15162 ("uaccess: add missing __must_check attributes") Signed-off-by: Arnd Bergmann --- arch/x86/math-emu/fpu_system.h | 6 ++++-- arch/x86/math-emu/reg_ld_str.c | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) -- 2.20.0 Reviewed-by: Kees Cook diff --git a/arch/x86/math-emu/fpu_system.h b/arch/x86/math-emu/fpu_system.h index f98a0c956764..9b41391867dc 100644 --- a/arch/x86/math-emu/fpu_system.h +++ b/arch/x86/math-emu/fpu_system.h @@ -107,6 +107,8 @@ static inline bool seg_writable(struct desc_struct *d) #define FPU_access_ok(y,z) if ( !access_ok(y,z) ) \ math_abort(FPU_info,SIGSEGV) #define FPU_abort math_abort(FPU_info, SIGSEGV) +#define FPU_copy_from_user(to, from, n) \ + do { if (copy_from_user(to, from, n)) FPU_abort; } while (0) #undef FPU_IGNORE_CODE_SEGV #ifdef FPU_IGNORE_CODE_SEGV @@ -122,7 +124,7 @@ static inline bool seg_writable(struct desc_struct *d) #define FPU_code_access_ok(z) FPU_access_ok((void __user *)FPU_EIP,z) #endif -#define FPU_get_user(x,y) get_user((x),(y)) -#define FPU_put_user(x,y) put_user((x),(y)) +#define FPU_get_user(x,y) do { if (get_user((x),(y))) FPU_abort; } while (0) +#define FPU_put_user(x,y) do { if (put_user((x),(y))) FPU_abort; } while (0) #endif diff --git a/arch/x86/math-emu/reg_ld_str.c b/arch/x86/math-emu/reg_ld_str.c index f3779743d15e..fe6246ff9887 100644 --- a/arch/x86/math-emu/reg_ld_str.c +++ b/arch/x86/math-emu/reg_ld_str.c @@ -85,7 +85,7 @@ int FPU_load_extended(long double __user *s, int stnr) RE_ENTRANT_CHECK_OFF; FPU_access_ok(s, 10); - __copy_from_user(sti_ptr, s, 10); + FPU_copy_from_user(sti_ptr, s, 10); RE_ENTRANT_CHECK_ON; return FPU_tagof(sti_ptr); @@ -1126,9 +1126,9 @@ void frstor(fpu_addr_modes addr_modes, u_char __user *data_address) /* Copy all registers in stack order. */ RE_ENTRANT_CHECK_OFF; FPU_access_ok(s, 80); - __copy_from_user(register_base + offset, s, other); + FPU_copy_from_user(register_base + offset, s, other); if (offset) - __copy_from_user(register_base, s + other, offset); + FPU_copy_from_user(register_base, s + other, offset); RE_ENTRANT_CHECK_ON; for (i = 0; i < 8; i++) { From patchwork Tue Oct 1 14:23:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 174869 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8623804ill; Tue, 1 Oct 2019 07:25:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuT3Vk40Va3aiLKaHMjWDMLz+SYUW8sp/hfGdUgn0SxU/8iBRikHTW83LMTk9YMY2BtgCN X-Received: by 2002:a17:906:1c4e:: with SMTP id l14mr24416015ejg.276.1569939904576; Tue, 01 Oct 2019 07:25:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569939904; cv=none; d=google.com; s=arc-20160816; b=SsDsbj/0giHRPlJnrC2Y3fwE4k4bC91o9Gz+xgjNsdHLYd9L0aRJ1EYYXIeUKDxDBx IiUZsY153SqFX1g+aessAWm3r6ZXWoY8jD25E5i5vZMO7Wf5euyMFLueiXfYNOybEIOV 3h8yLezccrGxZkEsE5MDUeEvlnwjjLcObbTCB8jyGSXLXqooFX9ijoP8Gs8Jkht1cJoA pYk6tfvDv/LQFKXLOH5rSf+wSe9Clr+wSPL2IwxDYDjaxIzk1Mr0ZJXqW4QEdY3u2rB0 gdNdftJbLLbg4TSmE1eIxAFTK0HvaogSRs6hhVmrE18TpGCQPJLOWfG5lONidVORksQr 701A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kGPRVifRo7j6q5Nn5dwQs4xG5u/1ZkIIFpoqoI1GTX8=; b=dRY/tdAB6GRcZtEDdMtVkDjWwW0zxY8z4cV9of+E80eGb3jixz//q3WxLaUFrVajAu ptLp2J21wULYr3u3fI8i2F/FSbvZfPdhxgtA/xDM/PdrtDqCLE45dmrBPsbks+tvMFWT zkX2J9gcl5ab0DGlI84u+HbbgrqKfFPqL11a/1bC+dyqSBXtY3Z6Zoi/AIRGxFJ5pacu cJj9VKeyXvggu4rzJGaZ7Hkqo1k7i1cHKDHltTyA+COsP7kXN3XP29sRZOFqOoJ8r52m 9Pxd5jfjNqikqgF6m3kA7ErMVTLQOdHXF0HWu4LwP2TMx8kUsqmf3XMeGU2QBiz6qfSw abYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si9568364eda.222.2019.10.01.07.25.04; Tue, 01 Oct 2019 07:25:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388959AbfJAOZD (ORCPT + 27 others); Tue, 1 Oct 2019 10:25:03 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:47471 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727137AbfJAOZD (ORCPT ); Tue, 1 Oct 2019 10:25:03 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1MCsDe-1iO4WF0e6C-008vED; Tue, 01 Oct 2019 16:24:31 +0200 From: Arnd Bergmann To: Bill Metzenthen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org Cc: Arnd Bergmann , "H. Peter Anvin" , Andrew Morton , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] x86: math-emu: limit MATH_EMULATION to 486SX compatibles Date: Tue, 1 Oct 2019 16:23:35 +0200 Message-Id: <20191001142344.1274185-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191001142344.1274185-1-arnd@arndb.de> References: <20191001142344.1274185-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ypUbhs24V+XDzIu8RtxHkCDPsF9qgK2C2OcUaDTHYWX5qFZsDYX khdE+20BTsiQ/YldiJRPY7Uf5GP9VsST/YO0vGbYp5MC0yez+6jvokDzo3EenKPd/uyL0jf DI+LSXgleU8KGdPMSrsQ/D3qi0BKiiW829fkhIC7xVauaqgCmTC0QSaLtMT0VEyaEqaoB1e +03+Uwz6ejUUa7WfFA+GA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:ZU0EJxA0134=:mlj8N0pWTv4KLis9kqC4Xe 2s/A2zwEm3a8OJDTTB8qw1kV+7Qhd+AboSNmUNBKrkvLK3vjSI6fsOcGxShrOE07LnNa18cR4 fCETauDHyfkafu+tiRRywa+5COSa6nYNjIDzhOW3dJBdxv1vGCd3KADWujAU+gaqroKinBhHY zlDXYYeCc/nmLeHfSag0CWyhRkvaybsxYiIY5cKvprSud8HzVVrt+qMwJPP+VC8xm4AOE7OAP cCr/vpAUPUTp9Q3zAQpRADzBkiTIaU/WSVMJNR5W4zfUJQJKN6lAjUmmE7PMjRVeTGW9I+HgU F9Fwz9iUYecIe8QHOt0jcN7fGIyljlxhA0bnVZBFI8icBZIN6qi2ahNzTYs6M82nPXL1SoY7c 8IQP7ZZuf2Bbb84haJyVwyJbjTrRULj/04lehBsvMkuywvqUvlytS28lfkguIQECSvZ9DfFx4 zSXWEVHHnc4reh1x9B0WWiiASp8GluY5x55qdZpKXksDUX/wjCRIRBVWp+Kggehu6gCKo0ZFM E7w+AjLIrPmoVKcNLUiYvsGKCzF8aeAMDrnYnEx2Qz0t0Ho/mILXGMR4MWPpo+/afcgY/1ORI tEd9zgB59K06qhTuKa1HkWetEpko3QKyW+XaKCTj2mtIyD3L4wUKH9wmbECPk6a1b39h7A67B qhDScZX6TpeTtaXVucTlwT9tDGiDSiHokYSgH52ASwCmaRzF4sN/qTfNOtpeLfmzztiNVSqGy w8S/aTIjXu++MDuOyExUfVNyZkiXDyTCtPNdanPBy9SgtE5GX5pknUGr9RFE8UN9N9JpGRkYL vo3l6wbO2o1vVE44/gEQGwTvSoSFnJglUY18e/0W7Axs4bvI5J6ByvS4yuZCNy6AP4pVz/CMb ZVKAfBBilyme7ERrtTCg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The fpu emulation code is old and fragile in places, try to limit its use to builds for CPUs that actually use it. As far as I can tell, this is only true for i486sx compatibles, including the Cyrix 486SLC, AMD Am486SX and ÉLAN SC410, UMC U5S amd DM&P VortexSX86, all of which were relatively short-lived and got replaced with i486DX compatible processors soon after introduction, though the some of the embedded versions remained available much longer. Signed-off-by: Arnd Bergmann --- arch/x86/Kconfig | 2 +- arch/x86/Kconfig.cpu | 25 ++++++++++++++++--------- arch/x86/Makefile_32.cpu | 1 + arch/x86/include/asm/module.h | 2 ++ 4 files changed, 20 insertions(+), 10 deletions(-) -- 2.20.0 Reviewed-by: Kees Cook diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index f4d9d1e55e5c..77b02387bd0c 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1751,7 +1751,7 @@ config X86_RESERVE_LOW config MATH_EMULATION bool depends on MODIFY_LDT_SYSCALL - prompt "Math emulation" if X86_32 + prompt "Math emulation" if X86_32 && (M486SX || MELAN) ---help--- Linux can emulate a math coprocessor (used for floating point operations) if you don't have one. 486DX and Pentium processors have diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index 228705a1232a..5f7bff9885a1 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu @@ -50,12 +50,19 @@ choice See each option's help text for additional details. If you don't know what to do, choose "486". +config M486SX + bool "486SX" + depends on X86_32 + ---help--- + Select this for an 486-class CPU without an FPU such as + AMD/Cyrix/IBM/Intel SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5S. + config M486 - bool "486" + bool "486DX" depends on X86_32 ---help--- Select this for an 486-class CPU such as AMD/Cyrix/IBM/Intel - 486DX/DX2/DX4 or SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S. + 486DX/DX2/DX4 and UMC U5D. config M586 bool "586/K5/5x86/6x86/6x86MX" @@ -313,20 +320,20 @@ config X86_L1_CACHE_SHIFT int default "7" if MPENTIUM4 || MPSC default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU - default "4" if MELAN || M486 || MGEODEGX1 + default "4" if MELAN || M486SX || M486 || MGEODEGX1 default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX config X86_F00F_BUG def_bool y - depends on M586MMX || M586TSC || M586 || M486 + depends on M586MMX || M586TSC || M586 || M486SX || M486 config X86_INVD_BUG def_bool y - depends on M486 + depends on M486SX || M486 config X86_ALIGNMENT_16 def_bool y - depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1 + depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486SX || M486 || MVIAC3_2 || MGEODEGX1 config X86_INTEL_USERCOPY def_bool y @@ -379,7 +386,7 @@ config X86_MINIMUM_CPU_FAMILY config X86_DEBUGCTLMSR def_bool y - depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486) && !UML + depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486SX || M486) && !UML menuconfig PROCESSOR_SELECT bool "Supported processor vendors" if EXPERT @@ -403,7 +410,7 @@ config CPU_SUP_INTEL config CPU_SUP_CYRIX_32 default y bool "Support Cyrix processors" if PROCESSOR_SELECT - depends on M486 || M586 || M586TSC || M586MMX || (EXPERT && !64BIT) + depends on M486SX || M486 || M586 || M586TSC || M586MMX || (EXPERT && !64BIT) ---help--- This enables detection, tunings and quirks for Cyrix processors @@ -471,7 +478,7 @@ config CPU_SUP_TRANSMETA_32 config CPU_SUP_UMC_32 default y bool "Support UMC processors" if PROCESSOR_SELECT - depends on M486 || (EXPERT && !64BIT) + depends on M486SX || M486 || (EXPERT && !64BIT) ---help--- This enables detection, tunings and quirks for UMC processors diff --git a/arch/x86/Makefile_32.cpu b/arch/x86/Makefile_32.cpu index 1f5faf8606b4..cd3056759880 100644 --- a/arch/x86/Makefile_32.cpu +++ b/arch/x86/Makefile_32.cpu @@ -10,6 +10,7 @@ else tune = $(call cc-option,-mcpu=$(1),$(2)) endif +cflags-$(CONFIG_M486SX) += -march=i486 cflags-$(CONFIG_M486) += -march=i486 cflags-$(CONFIG_M586) += -march=i586 cflags-$(CONFIG_M586TSC) += -march=i586 diff --git a/arch/x86/include/asm/module.h b/arch/x86/include/asm/module.h index 7948a17febb4..c215d2762488 100644 --- a/arch/x86/include/asm/module.h +++ b/arch/x86/include/asm/module.h @@ -15,6 +15,8 @@ struct mod_arch_specific { #ifdef CONFIG_X86_64 /* X86_64 does not define MODULE_PROC_FAMILY */ +#elif defined CONFIG_M486SX +#define MODULE_PROC_FAMILY "486SX " #elif defined CONFIG_M486 #define MODULE_PROC_FAMILY "486 " #elif defined CONFIG_M586