Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp910926imu; Fri, 25 Jan 2019 13:14:14 -0800 (PST) X-Google-Smtp-Source: ALg8bN6uYXUnrKD6/4j1DlsR3msQ//VC/jyAfKe7MEgrSR33Qdv5dz7PQRseXvB+Te8HSkOpJlev X-Received: by 2002:a17:902:6b49:: with SMTP id g9mr12424246plt.98.1548450854154; Fri, 25 Jan 2019 13:14:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548450854; cv=none; d=google.com; s=arc-20160816; b=K4s9wXHxBYDCUb5ZfKT1ogLwLjO/mdF7OmGzltNQweChwvRQZb143Ffk8A7C71RvhX bwVM84CbZ3mAdw3KV/kBgfX+Jl9z7IrNIjcXyMwBc+y+S+64efjiI3EXnITuD+QqTmgH Sj+iBG7bTaZbpVlAi2r+0/ZSiqgFrjyqozsPha9Ri5GWGlOytm7ta9c3nHTrwSgWmpR+ kSNKCqtynRNBSuhSt4Ay+JuEz25eJhHSpA71ounjgB5Y5w08UCH0QG/DWfXkgZMZZhM2 tdLRZt/5l3cTLNyqy3wcy7HZGjSvH41NzpAnoao+dM9Ug8gNt2hpuNJYNPxrMwNu+rXJ Vc1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=TQDXL+9AgTW5kIAfcKSUOc8zIC/FdeiIU5+E9sqjLrU=; b=uYXysI5Lb+wtH+1OUyPBGkHHtkiP3x/ZVdl0cKuT6YOFOsT5fGMKJ9Ic2N17414aEx cpfa9ac0AwrwfTsh+yxigFBOA8GAFObB+e6EFSwjGBCOqpfKcV36Gt0sI8VVOlNuOh8/ sO7t0coA46pxD3cXd7ycuwxzG4ROx2kqcOW9QALrSilBBGZ3edX3bcOpdegxNmmccpT2 fxOAbeZQpJhzzeYNayxxXsoNn2Cofvs7F5TDnXQVFPIP1sV1r2ziAiSapTya+XRw1BeR IHRp+w7++zb6s02LFE57q1iK1LT8DQI9S9EEhKCEy8D5fwanMobO0VCGBe3TElvdEIJQ 4gXQ== 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 d125si2056876pgc.418.2019.01.25.13.13.58; Fri, 25 Jan 2019 13:14:14 -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 S1729388AbfAYVNv (ORCPT + 99 others); Fri, 25 Jan 2019 16:13:51 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:58024 "EHLO dcvr.yhbt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726262AbfAYVNt (ORCPT ); Fri, 25 Jan 2019 16:13:49 -0500 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 686731F453; Fri, 25 Jan 2019 21:13:49 +0000 (UTC) Date: Fri, 25 Jan 2019 21:13:49 +0000 From: Eric Wong To: Jakub Bogusz Cc: linux-kernel@vger.kernel.org, mitr@volny.cz, Dmitry Torokhov , linux-input@vger.kernel.org Subject: Re: [PATCH][RESEND] wistron_btns needs executable BIOS image Message-ID: <20190125211349.nfbbcuaip5y6l5dr@dcvr> References: <20170731182010.GA933@stranger.qboosh.pl> <20190125191437.GA25902@stranger.qboosh.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190125191437.GA25902@stranger.qboosh.pl> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jakub Bogusz wrote: > 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. Adding Dmitry Torokhov and linux-input to Cc: (that's what ./scripts/get_maintainer.pl says) > Actual description in forwarded message. > > > -- > Jakub Bogusz http://qboosh.pl/ > From: Jakub Bogusz > To: linux-kernel@vger.kernel.org, mitr@volny.cz > Subject: [PATCH] wistron_btns needs executable BIOS image > > 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/ > 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);