From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51C3DC433B4 for ; Tue, 13 Apr 2021 17:49:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2651B61244 for ; Tue, 13 Apr 2021 17:49:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347349AbhDMRtw (ORCPT ); Tue, 13 Apr 2021 13:49:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:44360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347340AbhDMRtt (ORCPT ); Tue, 13 Apr 2021 13:49:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7913861176; Tue, 13 Apr 2021 17:49:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618336169; bh=vVFLQF2+aAfAI9X6fd/5rZhsOERCf9IaqsSJSSngM0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tTsfsWnBuupxa8UwAdqBkf7Wixz09yUDa50pOyErcmYgnLZpatPfHd1W9doC2IdcK pTxsOBp7wbPy3SR/27DQb2FI5QWHayyyeg15K/YP5sUR8Y7TYBb3oJdr6LZYq2Ux0c oCX9gcOFAdFlamLdC4uKuTEXWjY01qlDrH427s9KNDgPAUgUjCbgj3F40GGAfY3Ipm xmX5hAPHQDQ9+19z7DYd5vDmx91FYRG1EqCXjU01LIWMgw7qHuCoMJM9wW/8us6ko0 +4Jn6FvW+cdC1PGDNUHahLBlvmiTbS5HekkKIR4uprgGPEXbQ0azCSdCWEBt+zNPQp q9cKGgoP7x1vA== From: Will Deacon To: Masami Hiramatsu , Catalin Marinas , Jisheng Zhang Cc: kernel-team@android.com, Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Liao Chang Subject: Re: [PATCH] arm64: kprobes: Restore local irqflag if kprobes is cancelled Date: Tue, 13 Apr 2021 18:49:22 +0100 Message-Id: <161830261625.3702418.8292373763983690459.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210412174101.6bfb0594@xhacker.debian> References: <20210412174101.6bfb0594@xhacker.debian> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Apr 2021 17:41:01 +0800, Jisheng Zhang wrote: > If instruction being single stepped caused a page fault, the kprobes > is cancelled to let the page fault handler continue as a normal page > fault. But the local irqflags are disabled so cpu will restore pstate > with DAIF masked. After pagefault is serviced, the kprobes is > triggerred again, we overwrite the saved_irqflag by calling > kprobes_save_local_irqflag(). NOTE, DAIF is masked in this new saved > irqflag. After kprobes is serviced, the cpu pstate is retored with > DAIF masked. > > [...] Applied to arm64 (for-next/fixes), thanks! [1/1] arm64: kprobes: Restore local irqflag if kprobes is cancelled https://git.kernel.org/arm64/c/738fa58ee132 Cheers, -- Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFBF4C433B4 for ; Tue, 13 Apr 2021 17:51:28 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B48F361176 for ; Tue, 13 Apr 2021 17:51:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B48F361176 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VXLrxqOyL1Vq3X9vJKv/z2/8kd/ZBPv0JvpkODYMlyk=; b=mHfG8wxPZLJMinOPlaOHozUbT tkhVU4U/wQW89B7hgXhZP+plBUK8J+WWvv9tiLbERPr/E++4awmZP8ENm4SNVuRskf00nLu7ydfC8 bRR/q024Ev4k+F9YKi1GUFzxdIgkhr/Qb4xrvPTVTnud9OeWhx/IbMZJKiA3Bm8bm4WDZHjxs97Yu 1pCTGBdxRcPLTkypBA4oCeYq35SRupHCc3q94idVOuwBpjSF7krvIS6nNqZJE+87z5tT+dGlHu566 z8a23sl1iIfTQdabWOR/0X5MImFUpGqXYSlFTuKYFpe22epP1c93G13eiPGxzoP7pgDiVT91iC9ds kdsSusZlA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWNAR-00A1iV-QN; Tue, 13 Apr 2021 17:49:40 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWNAK-00A1iD-Mv for linux-arm-kernel@desiato.infradead.org; Tue, 13 Apr 2021 17:49:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=y+dau714hfEn5A5qWwRdcji7vT6ekiYdVKOLARwUeuk=; b=b3TCq+4IewD250vr52Fr6RJJ6B poHxQ8d4ITZlTpJdGBfRiE2EE/SM6alpRo+JyF/eYEyhsP73c7cBkUttL1ewnfHuEKo10kKGKdH/s NMqs3W+GL+52WkHM+YDNnZZnRJCvHOd7Zl5+0cc4QFMUB1oIAIJxSXT+7RRxbuFdpCjPj4fwHlATv wR26BfjiGg1v57eZFCB9tHHDzyb6H/728wt3AESW5Dggk3KPfiT4slPTQ4hJiClUKDOe2kYfjKhWr aZm68edmfN2gRvwOtkCAemmJHqjXBRgmHi7eaFmozwtVidRXGTqYVRZBBM7BeHhOgZ+Z4kftEDG0n YHj3TeJA==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWNAI-007ERy-1X for linux-arm-kernel@lists.infradead.org; Tue, 13 Apr 2021 17:49:31 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7913861176; Tue, 13 Apr 2021 17:49:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618336169; bh=vVFLQF2+aAfAI9X6fd/5rZhsOERCf9IaqsSJSSngM0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tTsfsWnBuupxa8UwAdqBkf7Wixz09yUDa50pOyErcmYgnLZpatPfHd1W9doC2IdcK pTxsOBp7wbPy3SR/27DQb2FI5QWHayyyeg15K/YP5sUR8Y7TYBb3oJdr6LZYq2Ux0c oCX9gcOFAdFlamLdC4uKuTEXWjY01qlDrH427s9KNDgPAUgUjCbgj3F40GGAfY3Ipm xmX5hAPHQDQ9+19z7DYd5vDmx91FYRG1EqCXjU01LIWMgw7qHuCoMJM9wW/8us6ko0 +4Jn6FvW+cdC1PGDNUHahLBlvmiTbS5HekkKIR4uprgGPEXbQ0azCSdCWEBt+zNPQp q9cKGgoP7x1vA== From: Will Deacon To: Masami Hiramatsu , Catalin Marinas , Jisheng Zhang Cc: kernel-team@android.com, Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Liao Chang Subject: Re: [PATCH] arm64: kprobes: Restore local irqflag if kprobes is cancelled Date: Tue, 13 Apr 2021 18:49:22 +0100 Message-Id: <161830261625.3702418.8292373763983690459.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210412174101.6bfb0594@xhacker.debian> References: <20210412174101.6bfb0594@xhacker.debian> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210413_104930_234057_CEA4C6E2 X-CRM114-Status: GOOD ( 10.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 12 Apr 2021 17:41:01 +0800, Jisheng Zhang wrote: > If instruction being single stepped caused a page fault, the kprobes > is cancelled to let the page fault handler continue as a normal page > fault. But the local irqflags are disabled so cpu will restore pstate > with DAIF masked. After pagefault is serviced, the kprobes is > triggerred again, we overwrite the saved_irqflag by calling > kprobes_save_local_irqflag(). NOTE, DAIF is masked in this new saved > irqflag. After kprobes is serviced, the cpu pstate is retored with > DAIF masked. > > [...] Applied to arm64 (for-next/fixes), thanks! [1/1] arm64: kprobes: Restore local irqflag if kprobes is cancelled https://git.kernel.org/arm64/c/738fa58ee132 Cheers, -- Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel