From patchwork Thu Mar 30 19:10:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Cabaj X-Patchwork-Id: 1763410 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Thg12fcd; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PnY1M74xhz1yZ0 for ; Fri, 31 Mar 2023 06:11:18 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1phxfv-0002w3-72; Thu, 30 Mar 2023 19:11:07 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1phxfs-0002vV-NP for kernel-team@lists.ubuntu.com; Thu, 30 Mar 2023 19:11:04 +0000 Received: from mail-yb1-f199.google.com (mail-yb1-f199.google.com [209.85.219.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id D6D473F20F for ; Thu, 30 Mar 2023 19:11:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1680203463; bh=flH3ABTqvv92wD0WpW1hKTpEFpOmkADE2oIGo7chjbY=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=Thg12fcdSg8ySThD9NxD20GKOw11f9JzXb+mg5pvh2lznVXAbcSkTvUvkiM5jq9qB iqGRb7i6O9gtz8l0GJ3JqPFqywI4BTqfnHedKF+AJRLcnL6PKbgG58lIFxlVhk2hAo jSjn9yHi7VBpRYTaKv4eA3hyFX6DRAhAfm/vXZRCqQJTMuuJ+xxTgfrTaBQMwt9ud0 wp8tkbihI4gDvQT9+t1UhnRtGmKWABSoSwz2W34E4SPonzus7LYfiuwChvT1QuHX4+ k4sA3ILDveGh1O39Iisbp9YGbrpLwBsq7Q50C23jElYaRin9DwbMvBj4XLmkpF37lH 6u3huGOMURu2g== Received: by mail-yb1-f199.google.com with SMTP id b124-20020a253482000000b00b72947f6a54so19792327yba.14 for ; Thu, 30 Mar 2023 12:11:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680203462; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=flH3ABTqvv92wD0WpW1hKTpEFpOmkADE2oIGo7chjbY=; b=JzlW5dYHwOLkLSefOg5KHqI92lFY6kCnP0TimuwEgYD0tVftMZa05hkgokP6bplPeY O0NThJg7tPpGkxcW4VUpeL6ONBj3fakOJJRGm01GopGRGM8VxOtgvJlj2TcLJnCfgkf+ VBGaqSS00C4mNMss4b5ReTWQayP2WfidN1/ELasctN2+M41ij0X7oY10fYq0WDbhuLms H7zRa10vCJs9kd+g67+p7Oybw20OoE2eIdySWMcBYlazzUJ6xRQnuQxr/i2xH/ZAwXYA Fpkp5zS+nvrnLfw/WE1Pp6/arJpFGACd322QAEj8UMf47M+vfN+zOmRufPIVJtL/ziFg 93Tg== X-Gm-Message-State: AAQBX9eJ6z8hs/MTaljtMvetmrt0q9kAToSw9xnk908q1OgosWT1dtvV jSk3/kZrv53q+MeP/LLlcmf+W8OqntaDW72lueVxaoGc7YB7tQW1pIVa5qoO5iXivBLk8mjmAvO AcKOqM59hQ57ymKXQ1R/io0/hf62CVkec5+Cferw3xVzcmWXkFw== X-Received: by 2002:a81:71c5:0:b0:538:6515:e6f3 with SMTP id m188-20020a8171c5000000b005386515e6f3mr23072910ywc.51.1680203462692; Thu, 30 Mar 2023 12:11:02 -0700 (PDT) X-Google-Smtp-Source: AKy350akNSqPqJqA8ijnsU+/zuJC1+Umfw6Vuy8kTdPkBYhBMgpXqNknTFc5Wpqn9+g7mB7aMLk+/g== X-Received: by 2002:a81:71c5:0:b0:538:6515:e6f3 with SMTP id m188-20020a8171c5000000b005386515e6f3mr23072895ywc.51.1680203462286; Thu, 30 Mar 2023 12:11:02 -0700 (PDT) Received: from smtp.gmail.com (h69-130-246-116.mdtnwi.broadband.dynamic.tds.net. [69.130.246.116]) by smtp.gmail.com with ESMTPSA id k10-20020a81ff0a000000b00545a0818473sm42251ywn.3.2023.03.30.12.11.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 12:11:02 -0700 (PDT) From: John Cabaj To: kernel-team@lists.ubuntu.com Subject: [SRU][jammy][PATCH 0/5] ftrace graph return address recovery support for s390x Livepatch Date: Thu, 30 Mar 2023 14:10:56 -0500 Message-Id: <20230330191101.2034512-1-john.cabaj@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1639924 (Kernel livepatch support for s390x) [Impact] * Additional patch required to support Livepatch for s390x * Fixes Livepatch transition issues when using ftrace graph tracing [Fix] 87cbae6dcc95 ("kprobes: treewide: Remove trampoline_address from kretprobe_trampoline_handler()") a9623ec2e36c ("kprobes: treewide: Make it harder to refer kretprobe_trampoline directly") 78ef68e5815f ("kprobes: Add kretprobe_find_ret_addr() for searching return address") d8dd7cae7285 ("390/unwind: recover kretprobe modified return address in stacktrace") da7a651be4dd ("s390/unwind: fix fgraph return address recovery") [Test Case] * Compile tested * Boot tested * Tested a Livepatch (patch to /proc/meminfo module) * Tested Livepatch from ftrace graphed function (via https://github.com/SUSE/qa_test_klp/, klp_tc_10.sh) [Where things could go wrong] * Functionality already exists upstream, kernel was boot and Livepatch tested - should have no regressions Masami Hiramatsu (3): kprobes: treewide: Remove trampoline_address from kretprobe_trampoline_handler() kprobes: treewide: Make it harder to refer kretprobe_trampoline directly kprobes: Add kretprobe_find_ret_addr() for searching return address Sumanth Korikkar (1): s390/unwind: fix fgraph return address recovery Vasily Gorbik (1): s390/unwind: recover kretprobe modified return address in stacktrace arch/arc/include/asm/kprobes.h | 2 +- arch/arc/kernel/kprobes.c | 13 +- arch/arm/probes/kprobes/core.c | 9 +- arch/arm64/include/asm/kprobes.h | 2 +- arch/arm64/kernel/probes/kprobes.c | 5 +- arch/arm64/kernel/probes/kprobes_trampoline.S | 4 +- arch/csky/include/asm/kprobes.h | 2 +- arch/csky/kernel/probes/kprobes.c | 4 +- arch/csky/kernel/probes/kprobes_trampoline.S | 4 +- arch/ia64/kernel/kprobes.c | 11 +- arch/mips/kernel/kprobes.c | 15 ++- arch/parisc/kernel/kprobes.c | 6 +- arch/powerpc/include/asm/kprobes.h | 2 +- arch/powerpc/kernel/kprobes.c | 18 +-- arch/powerpc/kernel/optprobes.c | 2 +- arch/powerpc/kernel/stacktrace.c | 2 +- arch/riscv/include/asm/kprobes.h | 2 +- arch/riscv/kernel/probes/kprobes.c | 4 +- arch/riscv/kernel/probes/kprobes_trampoline.S | 4 +- arch/s390/include/asm/kprobes.h | 2 +- arch/s390/include/asm/unwind.h | 13 ++ arch/s390/kernel/kprobes.c | 12 +- arch/s390/kernel/stacktrace.c | 2 +- arch/s390/kernel/unwind_bc.c | 8 +- arch/sh/include/asm/kprobes.h | 2 +- arch/sh/kernel/kprobes.c | 12 +- arch/sparc/include/asm/kprobes.h | 2 +- arch/sparc/kernel/kprobes.c | 12 +- arch/x86/include/asm/kprobes.h | 1 - arch/x86/kernel/kprobes/core.c | 22 ++-- include/linux/kprobes.h | 40 ++++++- kernel/kprobes.c | 112 +++++++++++++----- kernel/trace/trace_output.c | 2 +- 33 files changed, 222 insertions(+), 131 deletions(-)