Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp803249imu; Fri, 25 Jan 2019 11:16:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN7MmJxb73/9/bMlHwCSu65XnDeHgINN/pH7J61tn9oBvaovcj3y4N3f3E3BiFFkx1Qy3Jtg X-Received: by 2002:a17:902:7443:: with SMTP id e3mr12278113plt.304.1548443785979; Fri, 25 Jan 2019 11:16:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548443785; cv=none; d=google.com; s=arc-20160816; b=MCOYRtSKRUAvTJ1oFEnz4+Y56cWuYdGz1xgBe/d/hhq1jdjWZdDH8DWlIvEtqJ1gpq rR+cqCs6bhzenrekGDg3uB0OVNVqmCXviSHY98UPZjiZWRso65uv11IBCl2lel9ZvG04 wanFV/ykits5fsqzgtKJVGH9DlCcQG4Sek8WL4CumBHj1CwZ7XD9QsTgAjYzHUEimAxa eD6D/cun9cAmaNodm885m7CZCIXg3r0HyNeie8ARskZZ9DMSbQIvKydA6ra8cJf+GLRR AqEz0TokqiA3EQ4ATgOwbGZ6CXhHcRMSxaRTxXJxhkEmacTiOqmL/MWgFO2jQgVZOSmE +nUg== 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:message-id:subject:to:from:date; bh=Q4ykQHpywHl6Yg/Cls32YmMBVQ09p/MFTZUNZkbhpM8=; b=xHTbu6RY3iqRRkw/MUY+V2Ka6YJd1PtR+uZa5iyBTXQ1BOwQr0NdsiQ4l1JzVjeSDD Di/ujoJP32vOmegvQO00skFZ8xvYIM1wRsmKmFqRnLX2oOSsHaoaprZYCVNX/M2Sx3BK Kv6xK7NmJhgM8p2ITOLzjPDrWo+lzMhIP62zcKDN0zIQ4nDH7aSyELb8rCLiX9dmwBqp R+ynWcs8TZgaZu0chA5MYj8CUAcbifHxmX2eCwlLodKVleZxktfQyA3VxZ+7g8u/xmtH vT/BJPA92YamyO6tVcfCXEIQZLs6hUvXNgoJwq5jhbCg7/XCg4Rz+fbeGUKVWc+vucfs 9amA== 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 c12si25160620pgb.402.2019.01.25.11.16.10; Fri, 25 Jan 2019 11:16:25 -0800 (PST) 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 S1726566AbfAYTPV (ORCPT + 99 others); Fri, 25 Jan 2019 14:15:21 -0500 Received: from mail.qboosh.pl ([217.73.31.61]:33923 "EHLO mail.qboosh.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725778AbfAYTPU (ORCPT ); Fri, 25 Jan 2019 14:15:20 -0500 X-Greylist: delayed 355 seconds by postgrey-1.27 at vger.kernel.org; Fri, 25 Jan 2019 14:15:19 EST Received: from stranger.qboosh.pl (dynamic-78-8-88-26.ssp.dialog.net.pl [78.8.88.26]) by mail.qboosh.pl (Postfix) with ESMTPSA id 6EB9B1A26DA9; Fri, 25 Jan 2019 20:09:22 +0100 (CET) Received: from stranger.qboosh.pl (localhost [127.0.0.1]) by stranger.qboosh.pl (8.15.2/8.15.2) with ESMTP id x0PJEcNa029398; Fri, 25 Jan 2019 20:14:38 +0100 Received: (from qboosh@localhost) by stranger.qboosh.pl (8.15.2/8.15.2/Submit) id x0PJEbJr029392; Fri, 25 Jan 2019 20:14:37 +0100 Date: Fri, 25 Jan 2019 20:14:37 +0100 From: Jakub Bogusz To: linux-kernel@vger.kernel.org, mitr@volny.cz Subject: [PATCH][RESEND] wistron_btns needs executable BIOS image Message-ID: <20190125191437.GA25902@stranger.qboosh.pl> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline In-Reply-To: <20170731182010.GA933@stranger.qboosh.pl> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Let's try once again... (take 3) First time I sent this patch when I prepared it in 2013 for Linux 3.12, the second time after update for Linux 4.12 in 2017... And it still applies to Linux 4.20. Actual description in forwarded message. -- Jakub Bogusz http://qboosh.pl/ --4Ckj6UjgE2iN1+kY Content-Type: message/rfc822 Content-Disposition: inline Date: Mon, 31 Jul 2017 20:20:10 +0200 From: Jakub Bogusz To: linux-kernel@vger.kernel.org, mitr@volny.cz Subject: [PATCH] wistron_btns needs executable BIOS image Message-ID: <20170731182010.GA933@stranger.qboosh.pl> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline User-Agent: Mutt/1.6.2 (2016-07-01) --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, This patch (originally agains 3.1x, now I updated include to build against 4.12.x) fixes winstron_btns module issue with calling BIOS functions in non-executable memory. Tested (on Linux 3.10.x and few later versions) on F-S Amilo 8210 laptop. -- Jakub Bogusz http://qboosh.pl/ --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="linux-wistron-nx.patch" wistron_btns needs executable BIOS image. Signed-off-by: Jakub Bogusz --- linux-4.12/drivers/input/misc/wistron_btns.c.orig 2013-11-16 09:05:55.612742472 +0100 +++ linux-4.12/drivers/input/misc/wistron_btns.c 2013-11-16 09:24:37.356028732 +0100 @@ -33,6 +33,7 @@ #include #include #include +#include /* How often we poll keys - msecs */ #define POLL_INTERVAL_DEFAULT 500 /* when idle */ @@ -124,6 +125,7 @@ if (entry_point >= 0xF0000) { bios_code_map_base = base; bios_entry_point = bios_code_map_base + (entry_point & 0xFFFF); + set_memory_x((unsigned long)bios_code_map_base, 0x10000 >> PAGE_SHIFT); } else { iounmap(base); bios_code_map_base = ioremap(entry_point & ~0x3FFF, 0x4000); @@ -134,6 +136,7 @@ goto err; } bios_entry_point = bios_code_map_base + (entry_point & 0x3FFF); + set_memory_x((unsigned long)bios_code_map_base, 0x4000 >> PAGE_SHIFT); } /* The Windows driver maps 0x10000 bytes, we keep only one page... */ bios_data_map_base = ioremap(0x400, 0xc00); --UugvWAfsgieZRqgk-- --4Ckj6UjgE2iN1+kY--