Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp333323img; Wed, 20 Mar 2019 01:27:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRHcaLyrph6hYmrZmALFyzg2l/9s/ETvyX4Vls++6UFOE4YU6a4hyK4i0ote0f7mr0W2w8 X-Received: by 2002:a65:60da:: with SMTP id r26mr6208348pgv.294.1553070446443; Wed, 20 Mar 2019 01:27:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553070446; cv=none; d=google.com; s=arc-20160816; b=b7pUG2C5vHTHVM4/B6dWZ4W7sRsXb78ks9+7k8p93Z8kiVuuCLfoZwqaN7azOYQ6KY DukfiXsVTmggZjAN/ppJs2SmM1CtmqsCul6qUa7esILz5jWd2s+qbF6NTJNjvaemZp1G nAHsoW4t+tHc+2yNR2yejEg7fx+V6l/hQ+beVgSgQSuZ+OEzAQxRt93ECEj1NEpoVBpH 0nyutSMlyWabro5VfNQvr1GJUB6Yv206UXtvc+cgcMwEQKk5CgUxVO6Ydlr78HH3QcAU JZC2x/JFiZGHBizi8R2sfPeVO6EGeQeLyfwhkOO91Rds/60NsJDqk2mW1eS/7Krr/kDn XpLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=js67a8XhV3NUjW6HVyZFjiim3dOP2dlf7uwFcP13khs=; b=PrlNleO4R7n/o38AFfauNwsJcSwIGGXG0xFXpduLf+JGPIFGUN0oNDUjcTVPyeX2gm xXoPxIBIXvWSm7pS661CkU0DXjai5itrY8HPtYlNvu81DZ3vVqot9tOnhYkD5JI4wxNM Q+mPmdnvCB7EAn31K8OwnqDlsKJnNIWFfiz+g0IP7A/Qx1dhoOCIkNe7kF4sjRvXIDqR S1sXGvVvAeEepDi4s09HL/DfzTat1Y+fFw4dQFjABIlsSybI+g0wpamGRNN7kZ4LD1r3 Lx85Ez47fM2OVKQxeAfBngvbOcoc4ukKQmAXuWiuWHh+6qtiO77adP5XI24dB8zZCq3l sh0Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si1318057pls.1.2019.03.20.01.27.10; Wed, 20 Mar 2019 01:27:26 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727304AbfCTI0X (ORCPT + 99 others); Wed, 20 Mar 2019 04:26:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32028 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbfCTI0X (ORCPT ); Wed, 20 Mar 2019 04:26:23 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3EBD2368B3; Wed, 20 Mar 2019 08:26:23 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-62.ams2.redhat.com [10.36.116.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96B582E02C; Wed, 20 Mar 2019 08:26:22 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CD60511A86; Wed, 20 Mar 2019 09:26:16 +0100 (CET) Date: Wed, 20 Mar 2019 09:26:16 +0100 From: Gerd Hoffmann To: Alan Cox Cc: Alexander Pateenok , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz Subject: Re: Indirect call in vesafb driver Message-ID: <20190320082616.twns6kjvgapdg4lq@sirius.home.kraxel.org> References: <20190313145418.bwta37cogo7a4qtt@K55DR> <20190319164651.4ec9e3d1@alans-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190319164651.4ec9e3d1@alans-desktop> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 20 Mar 2019 08:26:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 19, 2019 at 04:46:51PM +0000, Alan Cox wrote: > On Wed, 13 Mar 2019 17:54:18 +0300 > Alexander Pateenok wrote: > > > Hi, > > > > There're several indirect calls in inline assembly in vesafb driver > > (drivers/video/fbdev/vesafb.c), and these calls cannot be automatically > > changed to retpolines. It's in vesafb_pan_display(): > > > > 73 __asm__ __volatile__( > > 74 "call *(%%edi)" > > > > and in vesa_setpalette(): > > > > 113 __asm__ __volatile__( > > 114 "call *(%%esi)" > > > > Is there need to use CALL_NOSPEC ? > > Vesafb is from the time on the dinosaurs but yes any vesa bios code will > not be speculatively hardened. I'd also doubt anyone is actually using > vesafb in the first place but it should use nospec Note that even when using vesafb the display panning is disabled by default, and vesa_setpalette() is only used with 8bit depth (256 color mode). Also note that only 32bit builds will try to call vesa bios code ... cheers, Gerd