Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2625547pxv; Sun, 27 Jun 2021 03:59:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtYRs0qE1QY3QOHjsu+8sTVIQu6wGZUgxjKVbnIqLsVCQC8RulojFJUU+EJcvFiDp1AnNM X-Received: by 2002:a05:6638:3f0:: with SMTP id s16mr9986389jaq.44.1624791588922; Sun, 27 Jun 2021 03:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624791588; cv=none; d=google.com; s=arc-20160816; b=ccBWMZVJ6ziB5sLIdS5Gl3AgfL+aXkQTZQ7LW4SGzoKppv27zyMVI1PLJFXun2BTr9 3deVfg1PhV+P4lBwukVeDkZW4zZew6oLInKaVTS3yZCD1SvvcEJPEWBSn/ppripSAe7a eDKOoammCrtjK/vEC5pUO+WdUJitn4l9itzTOTRcG8xBh8dIGtKt1lLuuolrrEa3P7qm margmczOWveWzjYeRtie08xWDCxaUQGTqfpcM6m1+SIecJZE/8Bkf19reK091E9unZq9 oYNqNqnLLk6vP3VgZzV4Ypj8qJhnLlURr/MJBbOnMgkHufV+ipx5hlPD0X4GU+Pu9H+g OwTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=cEUU9r2mYUCPZfC7vbvMgnbGkizs/vROdZuMKbN363A=; b=A9yKGP5zF6DetGbtyaV/wwhyJjbD9pECCsVZs2Cb5uGSzpjpECuMswMUuLgbva9MDM f3c+a2NrvSDxyp0RoeGgO2AQIozsT6pp5YbBfrLN26QqErY9SMh3Nmi6aWCs/ka1y0fS VG9c80zbfs3L3E6lr74csACbDmVWaaqkeUuFXzmMVO0YRV+q5ZwQzT+f3xQR6eOMmtUt pJtVPiCTOsliqHHk+qPwzqFzpsGOjwOPMNHUcTVdHb31lsJTjZKvqzQXZdfZPexqkyEL S1K0FNZ2mXzSgyWRYnb23/Q+xe2InT6m8qVZuAAnpuZMuIXhlvvybqvy4gwLObyE3YAQ vKOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si4842180ile.135.2021.06.27.03.59.37; Sun, 27 Jun 2021 03:59:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229817AbhF0LAV convert rfc822-to-8bit (ORCPT + 99 others); Sun, 27 Jun 2021 07:00:21 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:40900 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbhF0LAU (ORCPT ); Sun, 27 Jun 2021 07:00:20 -0400 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-263-7lwpbNj6OtqYhchRB1BMHg-1; Sun, 27 Jun 2021 11:57:49 +0100 X-MC-Unique: 7lwpbNj6OtqYhchRB1BMHg-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 27 Jun 2021 11:57:48 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.018; Sun, 27 Jun 2021 11:57:48 +0100 From: David Laight To: 'Marcos Del Sol Vives' , "x86@kernel.org" CC: "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v3] x86: add NOPL and CMOV emulation Thread-Topic: [PATCH v3] x86: add NOPL and CMOV emulation Thread-Index: AQHXaozP8c4yxHibnUSLg8MhMaAkx6snr31w Date: Sun, 27 Jun 2021 10:57:48 +0000 Message-ID: <4b8e1393929b47d29a996f07cd332c65@AcuMS.aculab.com> References: <20210626130313.1283485-1-marcos@orca.pet> In-Reply-To: <20210626130313.1283485-1-marcos@orca.pet> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marcos Del Sol Vives > Sent: 26 June 2021 14:03 > > NOPL and CMOV are a set of instructions that were introduced to the > x86 architecture with the i686 ISA in 1995, first implemented in the > Intel Pentium Pro and Pentium II processors. > > While virtually all desktop and server systems are modern enough to > support these instructions, in the embedded market things are a little > bit different: DM&P is still manufacturing their i586-only Vortex86 > SoCs, and many embedded devices still in use are stuck on legacy SoCs > that either are i586-only (AMD Elan, AMD Geode GX1) or implement i686 > but lack the NOPL instructions (Transmeta devices, AMD Geode LX). > > This is a problem because most modern Linux distributions, such as > Debian and all its derivatives, have started compiling targeting i686, > leaving old embedded devices using binary distributions without an > easy upgrade path. > > This ultimately results in most of these embedded devices running > years old, insecure and obsolete installations, and this itself can be > seen on the DM&P's own supported OS page where the newest supported > desktop Linux distro is Ubuntu 18.04, already three years old. > > The emulation of these instructions thus allow upgrading to newer > distributions just by replacing the kernel, keeping all precompiled > binaries intact. ... Does this really help? 1) Trapping and emulating the instructions will be slow. 2) All 64bit cpus support these instructions - so these must be 32bit. I believe the main distributions are about to drip 32bit support. It also has to be said that using Ubuntu in an embedded device is about as sensible as running windows. There is far too much 'crud' running that you don't need and is only likely to result in security breaches. Much better is something based on busybox+buildroot where you have (almost) complete control of the system userspace and can easily build a kernel that only has support for the required hardware from one of the LTS kernel trees. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)