Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3034889ybt; Mon, 29 Jun 2020 13:30:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztYJxGgV66OXzRHdUp1XjatmyIWCQ5eRke7Iu0AgLkiCrS8Mn4warQETRrhCmVFVHSmORa X-Received: by 2002:a05:6402:30b2:: with SMTP id df18mr19624383edb.229.1593462627090; Mon, 29 Jun 2020 13:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593462627; cv=none; d=google.com; s=arc-20160816; b=c3kQbXfDC7wZa4HxdpAyylNaR7NhyyGHb6NrKJzsNsPbFgJJfZAc23TkH29FLCIKYa XUo1l2ZUd0JUZNx75MZ2PCH505Icz0IyoeSosa0+6G7jeBUU7cLuri8qWNS9SQCa7cKi olNmtEmarYt/rXCMgRRammVDn+q03WWqIo4ripq9sUs1BjTubfXUMLYhrrnOwIaekAMD TLwWeiyEnnYgdQa9QxOEUML4Xj5+71HKWtTdPTJYPIb0LeqNiAPkrQa4fFJHKyKdT6ZZ s+NMUGs96EnMUzWt491tCHganczXFfjoHtQyFhRX0qK/RHgUOfXA5yXFsbYV0d2ejUQP YtcA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PNA9NlDiwfGJdqc80PQdCEI3BbKj7y9ISzAYcfpAX84=; b=KCnmaRtm9wFLHGnaFVTRCO8gHxXrz95sR52NeCSOQ4FOKOe70cZTZ5aEyfhNDLKXBm YXGSTTmtgy3RMyyDwR4Uil/ZQqZvKVo1wTH9CdGKBdFf2ZLtmdlz7ZQYb9Lp0UEGN/lH 89IHDZLSPCbkkD4XWl2MO5UAVWVVj/31MndFLVOTWv9qu/cdfDnFfpt3mYYPFDxQ8zdK vYWmQH5H5dXYGHJQU6rT9H8bxz72RfOV/v2dH6TcinrFQSH+sBQNAG9eqpdJU4ahyS5B gxA2gTU/UuKfy1oASG0qy/M+dSTc4cbDlcQ4xVWkv4cGZnhEcAvTYiwSjsMwR+1RXzy4 R/Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LApN4g4L; 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 h21si445634ejb.246.2020.06.29.13.30.04; Mon, 29 Jun 2020 13:30:27 -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=default header.b=LApN4g4L; 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 S1730570AbgF2U2V (ORCPT + 99 others); Mon, 29 Jun 2020 16:28:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:37040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732503AbgF2TZX (ORCPT ); Mon, 29 Jun 2020 15:25:23 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6EDE4253ED; Mon, 29 Jun 2020 15:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593445329; bh=pt8TGwydI0Q2NG5Q0h+jWjnuF3rsdC1OdZDVC8mGVLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LApN4g4LCo7QlxCj3Qyr/bPULYTLoBL9cwAHAGrr2HjsajLsMplCFQxw8BLt/FTwW QOD5ywrPizbhUa+SmFZVKMq7KHbBi1kcxrH/icw9XusmS4H3q/+1hLptjACj8H8x3w ebo9sUeNPjNoS4qy+TPHBC2BLpiLdw6RkJ8bewtk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Naveen N. Rao" , Michael Ellerman , Sasha Levin Subject: [PATCH 4.9 093/191] powerpc/kprobes: Fixes for kprobe_lookup_name() on BE Date: Mon, 29 Jun 2020 11:38:29 -0400 Message-Id: <20200629154007.2495120-94-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200629154007.2495120-1-sashal@kernel.org> References: <20200629154007.2495120-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.229-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.9.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.9.229-rc1 X-KernelTest-Deadline: 2020-07-01T15:39+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Naveen N. Rao" [ Upstream commit 30176466e36aadba01e1a630cf42397a3438efa4 ] Fix two issues with kprobes.h on BE which were exposed with the optprobes work: - one, having to do with a missing include for linux/module.h for MODULE_NAME_LEN -- this didn't show up previously since the only users of kprobe_lookup_name were in kprobes.c, which included linux/module.h through other headers, and - two, with a missing const qualifier for a local variable which ends up referring a string literal. Again, this is unique to how kprobe_lookup_name is being invoked in optprobes.c Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/include/asm/kprobes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h index 2c9759bdb63bc..063d64c1c9e89 100644 --- a/arch/powerpc/include/asm/kprobes.h +++ b/arch/powerpc/include/asm/kprobes.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -60,7 +61,7 @@ typedef ppc_opcode_t kprobe_opcode_t; #define kprobe_lookup_name(name, addr) \ { \ char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN]; \ - char *modsym; \ + const char *modsym; \ bool dot_appended = false; \ if ((modsym = strchr(name, ':')) != NULL) { \ modsym++; \ -- 2.25.1