From patchwork Sun Oct 14 19:23:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rabin Vincent X-Patchwork-Id: 1591641 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 6F5F0E00AD for ; Sun, 14 Oct 2012 19:26:51 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TNTo2-0006HY-Qe; Sun, 14 Oct 2012 19:24:59 +0000 Received: from mail-lb0-f177.google.com ([209.85.217.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TNTmt-0005wU-Ld for linux-arm-kernel@lists.infradead.org; Sun, 14 Oct 2012 19:23:48 +0000 Received: by mail-lb0-f177.google.com with SMTP id gi11so2942888lbb.36 for ; Sun, 14 Oct 2012 12:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=1Cy2eUUriPRg2oN4rpjFUJY9VREh9Fi+MswSVDn3300=; b=Qlmy40tjqZDf/nsNC51tUpS/O0/j2wn4inHSRD7UvdR0avW+HDDACekbvFywVKQGzE 2mMXhI7bY5FCcLnojZTyqVf3DYUrXh0tPn4IZ3LOkowzSkR87WyJ6rRY1saw37fRI648 OvK1HwBk+KRJ3gFFuBvGPzPIz8KW5WGvza2AsAsqThQ3BUYeYA/4jjehJAD5BcDsbILO aT+C1RxwP7bPBoQYEsPZ43DpAY6vnEVaXYNdKz/zD2tNmQ3fvEVl73XSR9694mps60Gt j/8kf7xc5Tg2H11hYDsl8MKnDRPlnDNqa1yHwWgXJHd6Q7cC5PHolRQVkXiLAxntsVA7 Io3g== Received: by 10.112.38.67 with SMTP id e3mr3526004lbk.98.1350242627196; Sun, 14 Oct 2012 12:23:47 -0700 (PDT) Received: from localhost.localdomain (c83-254-195-218.bredband.comhem.se. [83.254.195.218]) by mx.google.com with ESMTPS id ef4sm556036lbb.13.2012.10.14.12.23.45 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 14 Oct 2012 12:23:46 -0700 (PDT) From: Rabin Vincent To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 6/9] uprobes: flush cache after xol write Date: Sun, 14 Oct 2012 21:23:10 +0200 Message-Id: <1350242593-17761-6-git-send-email-rabin@rab.in> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1350242593-17761-1-git-send-email-rabin@rab.in> References: <1350242593-17761-1-git-send-email-rabin@rab.in> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rabin.vincent[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Peter Zijlstra , Rabin Vincent , Srikar Dronamraju , oleg@redhat.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Flush the cache so that the instructions written to the XOL area are visible. Signed-off-by: Rabin Vincent --- kernel/events/uprobes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index ca000a9..8c52f93 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -1246,6 +1246,7 @@ static unsigned long xol_get_insn_slot(struct uprobe *uprobe, unsigned long slot offset = current->utask->xol_vaddr & ~PAGE_MASK; vaddr = kmap_atomic(area->page); arch_uprobe_xol_copy(&uprobe->arch, vaddr + offset); + flush_dcache_page(area->page); kunmap_atomic(vaddr); return current->utask->xol_vaddr;