Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3188402pxb; Tue, 13 Apr 2021 22:18:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNNYy2VqaseuJoZKE9JhtMyGGIUcBhq8aqDd0L1eaBy9QtO91rUI2dbE2J3TGFrW2Uvi1Z X-Received: by 2002:a17:906:c79a:: with SMTP id cw26mr15963328ejb.220.1618377480315; Tue, 13 Apr 2021 22:18:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618377480; cv=none; d=google.com; s=arc-20160816; b=RuKwsBQb6mZn57RWdaPxFP+KCnFswuBF7JCDZ4gs27Cl3aUzmXLFUo9asLaVw0ElSX AXRjyL2OV2Zcn7rotYYX8Kj43POyjISTpiT+401kzf9JfuSYSRLkU5uJ6nngaIrWT3YI poi5RLqeuyR0mbITfSac4Zj08KoPuz9XrSxJI7qBedvJuhewBV3H2Bw72NOLnFqaX0As u/5LrWv4w4mH/64qjuaMuErIK6ykKT5+Bb2A+4uHk3WxCE3GvZ7ovhjkNzSSLvFFzIbk G4VHj2G0+paYzGrzDHsjJBZm1YttNvWmAEazN7S9P//t7ilJbYlcTUkiTDm5OiTzc3gR m/nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=y+dau714hfEn5A5qWwRdcji7vT6ekiYdVKOLARwUeuk=; b=BGnHpxsA+z/rQz0kjQRvrvjb1/rAvtjT3nJ0TDqfxaPxoBsq7mSCoo3ViQy8vSMpoM XBESQz7fjnqdWEVlhmlVP0bRkoYgc0A3nh5DuTKmwao0+YFgF78ebg8AaVfdPEksUvTW j2D+qAKR7gTn3irf+dof8jmp8F3+4BU9/rih5x9k/XvSfSbWzZIPnYZE95OVvvt+mWfb HXoxCNseBXnG1Isy/WPfzeqLbWNEh2y3OT98GLutnXsVHGyCqyPFeSnrtjUi/YOWe2RI 7RpjqxFaS201idlaxEx1LySfXTou4l2nrN17s/5tNQd5JnQBSzldiXNT49O1U+immdUF j7ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tTsfsWnB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sb9si9699866ejb.545.2021.04.13.22.17.36; Tue, 13 Apr 2021 22:18:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tTsfsWnB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347344AbhDMRtv (ORCPT + 99 others); Tue, 13 Apr 2021 13:49:51 -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