Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754841Ab2JPU3y (ORCPT ); Tue, 16 Oct 2012 16:29:54 -0400 Received: from mail-ia0-f174.google.com ([209.85.210.174]:43726 "EHLO mail-ia0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752251Ab2JPU3x (ORCPT ); Tue, 16 Oct 2012 16:29:53 -0400 MIME-Version: 1.0 In-Reply-To: <20121015165756.GA11737@redhat.com> References: <1350242593-17761-1-git-send-email-rabin@rab.in> <1350242593-17761-6-git-send-email-rabin@rab.in> <20121015165756.GA11737@redhat.com> From: Rabin Vincent Date: Tue, 16 Oct 2012 22:29:12 +0200 X-Google-Sender-Auth: WhPhEOpYQE5jSmvTBTABnXgVPCs Message-ID: Subject: Re: [PATCH 6/9] uprobes: flush cache after xol write To: Oleg Nesterov Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peter Zijlstra , Srikar Dronamraju Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1134 Lines: 29 2012/10/15 Oleg Nesterov : > On 10/14, Rabin Vincent wrote: >> 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); > > I agree... but why under kmap_atomic? No real reason; I'll move it to after the unmap. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/