Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7562817imu; Tue, 22 Jan 2019 07:58:55 -0800 (PST) X-Google-Smtp-Source: ALg8bN439JJvOX19oIffEoLOrwNhPg6WfJDRV5niFMMqevY9oJJSxvVJXK3TQVn7tyoGOM1prfTm X-Received: by 2002:a17:902:9a02:: with SMTP id v2mr35448470plp.180.1548172735713; Tue, 22 Jan 2019 07:58:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548172735; cv=none; d=google.com; s=arc-20160816; b=ssp219slGXvaV66H2ZkERb2vF5Zw9dRyebE6n2qSE5IbTIMuqfulTfs5bdmor70l7e AAF9RIhn7ORX9bQstBuXB9L/VXY1gBSgFFkrwBZ7KlfPU/t2fUeuxE2uPpR0L/MOKkc0 5/DKVblhBUeTtl3JuSsd/+8w8Uf3HAFhnC1Omc2nFuuC9/UR3Aatrqr0VhO0yee8aAhL sRedvOsxk9/Y3AdXbs2aPwSc/JwgNU+xsv873E7H2RcLfzM4JdlauKxdA/3/z/I43MSS ixTAprsFetZqAF9ckyVKUm3N1FyBy1WHyMuZsCYivoptY3SSF2GImPIEwkwnfVVkWlrT 9y9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=SXD0HF3FXHC97sxU3j5QLVXYLfDhZ7RLg+0DYIpi6m4=; b=UDpQFUSsI2zz3msZcxKxH2g4d0f/x6sOLWzMqM7WF1QbLOQkUzaskiSfBLzECCU+nn snsGL/L4HSD17tQPKWTw2rUvfl9FIP/KRvhr78NpNbuIRbYDs4vUU9evIf/W7++Z05aS 8xSS0GY8A//F470NAyx1fdsdyahVzeUfzi9u2jXncrAeSHafO/P4Y+YI5spKhMIKAK25 EfXghsgZVtrdB5SkH25aDe+y2td9NXAHAzJP63om/2NGhb8tur/ds9Z6ABIRAi70IiSx X54v0ogRAypLOpds2YQUYeTJDLyqyE/SrclFPh6kgjqBkephWjtcF9R3mrwuY2uz3jet Iaiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10si16342921pla.173.2019.01.22.07.58.40; Tue, 22 Jan 2019 07:58:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729076AbfAVP5c (ORCPT + 99 others); Tue, 22 Jan 2019 10:57:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53346 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728756AbfAVP5c (ORCPT ); Tue, 22 Jan 2019 10:57:32 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E837A87622; Tue, 22 Jan 2019 15:57:31 +0000 (UTC) Received: from jlaw-desktop.bos.redhat.com (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id 932381019637; Tue, 22 Jan 2019 15:57:30 +0000 (UTC) From: Joe Lawrence To: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, live-patching@vger.kernel.org Cc: Balbir Singh , Jiri Kosina , Josh Poimboeuf , Michael Ellerman , Nicolai Stange , Torsten Duwe Subject: [PATCH 0/4] powerpc/livepatch: reliable stack unwinder fixes Date: Tue, 22 Jan 2019 10:57:20 -0500 Message-Id: <20190122155724.27557-1-joe.lawrence@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 22 Jan 2019 15:57:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset fixes a false negative report (ie, unreliable) from the ppc64 reliable stack unwinder, discussed here [1] when it may inadvertently trip over a stale exception marker left on the stack. The first two patches fix this bug. Nicolai's change clears the marker from the stack when an exception is finished. The next patch modifies the unwinder to only look for such on stack elements when the ABI guarantees that they will actually be initialized. The final two patches consist of code cleanups that Nicolai and I spotted during the development of the fixes. Testing included re-running the original test scenario (loading a livepatch module on ppc64le) on a 5.0.0-rc2 kernel as well as a RHEL-7 backport. I ran internal tests on the RHEL-7 backport and no new test failures were introduced. I believe that Nicolai has done the same with respect to the first patch. [1] https://lore.kernel.org/lkml/7f468285-b149-37e2-e782-c9e538b997a9@redhat.com/ Joe Lawrence (3): powerpc/livepatch: relax reliable stack tracer checks for first-frame powerpc/livepatch: small cleanups in save_stack_trace_tsk_reliable() powerpc/livepatch: return -ERRNO values in save_stack_trace_tsk_reliable() Nicolai Stange (1): powerpc/64s: Clear on-stack exception marker upon exception return arch/powerpc/Kconfig | 2 +- arch/powerpc/kernel/entry_64.S | 7 +++ arch/powerpc/kernel/stacktrace.c | 74 +++++++++++++++++--------------- 3 files changed, 47 insertions(+), 36 deletions(-) -- 2.20.1