From patchwork Thu Nov 13 07:29:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Min X-Patchwork-Id: 5294031 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B743D9F2ED for ; Thu, 13 Nov 2014 07:32:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2998201E4 for ; Thu, 13 Nov 2014 07:32:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2FC8201C0 for ; Thu, 13 Nov 2014 07:32:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XoorK-0005Bu-I7; Thu, 13 Nov 2014 07:30:26 +0000 Received: from lgeamrelo04.lge.com ([156.147.1.127]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XoorH-0003tq-Kj for linux-arm-kernel@lists.infradead.org; Thu, 13 Nov 2014 07:30:24 +0000 Received: from unknown (HELO ls-2.156.147.135.180) (10.186.119.199) by 156.147.1.127 with ESMTP; 13 Nov 2014 16:29:57 +0900 X-Original-SENDERIP: 10.186.119.199 X-Original-MAILFROM: chanho.min@lge.com From: Chanho Min To: Russell King , Jon Medhurst , Will Deacon , Taras Kondratiuk , Olof Johansson Subject: [PATCH] ARM: cacheflush: disallow pending signals during cacheflush Date: Thu, 13 Nov 2014 16:29:53 +0900 Message-Id: <1415863793-6219-1-git-send-email-chanho.min@lge.com> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141112_233024_109857_D050DE0C X-CRM114-Status: UNSURE ( 7.70 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.9 (--) Cc: HyoJun Im , Gunho Lee , Chanho Min , linux-kernel@vger.kernel.org, Jongsung Kim , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 28256d612726 ("ARM: cacheflush: split user cache-flushing into interruptible chunks"), cacheflush can be interrupted by signal. But, cacheflush doesn't resume from where we left off if process has user-defined signal handlers. It returns -EINTR then cacheflush should be re-invoked from the start of address until cache-flushing of whole address ranges is completed (restart_syscall isn't available in userspace). It may cause regression. So I suggest to disallow pending signals during cacheflush. This partially reverts commit 28256d612726a28a8b9d3c49f2b74198c4423d6a. Signed-off-by: Chanho Min --- arch/arm/kernel/traps.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index abd2fc0..275e086 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -521,25 +521,6 @@ __do_cache_op(unsigned long start, unsigned long end) do { unsigned long chunk = min(PAGE_SIZE, end - start); - if (signal_pending(current)) { - struct thread_info *ti = current_thread_info(); - - ti->restart_block = (struct restart_block) { - .fn = do_cache_op_restart, - }; - - ti->arm_restart_block = (struct arm_restart_block) { - { - .cache = { - .start = start, - .end = end, - }, - }, - }; - - return -ERESTART_RESTARTBLOCK; - } - ret = flush_cache_user_range(start, start + chunk); if (ret) return ret;