Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp717600imm; Fri, 1 Jun 2018 08:22:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIwOEhi0Z9VT7Ji6XPe0HZTUQ9gUlHMzVq6Lv+liGXkStOJxn5fv18O21WMBoAgAMgqp4XT X-Received: by 2002:a17:902:3124:: with SMTP id w33-v6mr7035215plb.235.1527866537173; Fri, 01 Jun 2018 08:22:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527866537; cv=none; d=google.com; s=arc-20160816; b=U5CnFXy8OyIttRL1mO/dOE8djvY43G8imlBLTjeynYpeztaLCmC10GoFh+1tUBbsoO 32rHZyKBCYV//d8PTY3K1RfYSwT9bN8uOgSMcpcwetYsxdwgGgYi63U2Hf7sNrVl0wwo nD00qp4jKjzWabZWcirzuPrXzxrXqj77Q1q46rnDQYvGWNlbpdCCWzbfr6/+dSUKyCO2 nVgv9NT0yr4GAU6WNQQ2ZQmqmyyK9UicTpxG0nSjlXrpH2Oi84hqtByE1mDSuv41jD/x jfPQy9ehutVUYADF74CymaP01G2qGyNUGngVSPcgow9QHUpcqaocp16Nv/vexqyToeKQ O6kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=bepqTmRu6FeUtan2mJW4XD9MujoYYgOsQnQ1fa95vbI=; b=hiEIkLPgfsZxAsoKTA5Jq1O5l53eElbHdq1iWAmQ8lc9oOQjIGqDpS6MVlNOSnEwl0 sdW07HxvZaXDjXs/9GcWg6G2zEaMSTcokDjCd50sa4q7ufmp3sVwknHanlFJnBH7QrX8 uG2nZolZoAurWzUGzNwUzHshjcb6qxKZtbJctkpkDAGFBSNRz6y4wvuP/q/xTvSq/e3U VKQ+WhEQhhADJ+NwFCtuLrqMjp9xor3TIgHxfF8nD2ueerJk0o5X//pBYS86ZYiHTIj5 jA62AxawpaXz19GCcyePm+mXZvdOPLevM9unc6iSgBLbdZk0z1Lz+lxKC8LDN2ZtGAyS OiAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kHjUXeHm; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v137-v6si5827924pgb.682.2018.06.01.08.22.02; Fri, 01 Jun 2018 08:22:17 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kHjUXeHm; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753050AbeFAPVj (ORCPT + 99 others); Fri, 1 Jun 2018 11:21:39 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:53098 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751988AbeFAPVb (ORCPT ); Fri, 1 Jun 2018 11:21:31 -0400 Received: by mail-wm0-f67.google.com with SMTP id 18-v6so3749893wml.2 for ; Fri, 01 Jun 2018 08:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bepqTmRu6FeUtan2mJW4XD9MujoYYgOsQnQ1fa95vbI=; b=kHjUXeHmHjdM+672IofbOZ9DqYFfkFO3etQEPM13+lGR3TgdakT/jaPLbbmFaVH9fB CZTdxTPO2tQp6ybr3BNVjS3BQlNk0YXfp0Re/u66o/xUQuBEBTzs33x0LjOU+zGwS65+ p5sY9oPX9FL9t41TaAJd4Bf4OcQIV1sSeivTQg2mAZQA3AWyGtjyKB7eSQFBLLbZDcwr DqCmkQb/KBeVLOZOSYTGSFkaIvDLPnYBmBKhWG1pCeuMOKV7JpFzqGydxQH9LO8ziUv4 RCaiHYR0mpQ1R8YIMAmWybBnDKktjoR+VgQtTBRbs0qetQI7GeJVo6UP7nubwNdUSABS xUNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bepqTmRu6FeUtan2mJW4XD9MujoYYgOsQnQ1fa95vbI=; b=DADWgvQI32d/00HMXBagmprAIkLD/U5jTSZ0sLfZZAG+XlqFxcPa8muSjq9wHWWTJh GdbDMkGt+TW7ey5M7xqJg5K6lxcB7ppYkpjbF0MZ7uwyyXTVkPvKBZJaQVw8uuht7Jo7 0qWekq3Og50dww16B6XuTLsek8ikDUMWZ79kMuywELRiONTk1nsupnvrI38sDSb7PrJS l8JgFssm+7i8CSrJGhfsSparJY2bv7JlPzRFR7swdlhnTTsoHa8DsHRKJ04hLaWdttDB GmH22BuNGq3QqmyDjUnijympV8zH8zfeTFEld94YgTrLW1Vb933g9K+cBwwd4/daLVBQ 45oA== X-Gm-Message-State: ALKqPwf+l89QnhJZ/IvGax+DeqYc+5VODwrfDLpUa/ZAnda0c1EMqhce 5hhDetEisVxJpnhbaNIIce8= X-Received: by 2002:a50:9ead:: with SMTP id a42-v6mr2832669edf.92.1527866490751; Fri, 01 Jun 2018 08:21:30 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:4023:8a00:1051:9318:8490:3b94]) by smtp.gmail.com with ESMTPSA id j16-v6sm516409edp.22.2018.06.01.08.21.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jun 2018 08:21:30 -0700 (PDT) From: Luc Van Oostenryck To: Palmer Dabbelt Cc: Albert Ou , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Luc Van Oostenryck Subject: [PATCH 2/3] riscv: no __user for probe_kernel_address() Date: Fri, 1 Jun 2018 17:21:22 +0200 Message-Id: <20180601152123.47256-3-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180601152123.47256-1-luc.vanoostenryck@gmail.com> References: <20180601152123.47256-1-luc.vanoostenryck@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In is_valid_bugaddr(), probe_kernel_address() is called with the PC casted to (bug_inst_t __user *) but this function only take a plain void* as argument, not a __user pointer. Fix this by removing the unnneded __user in the cast. Signed-off-by: Luc Van Oostenryck --- arch/riscv/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 93132cb59..4c92e5af8 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -160,7 +160,7 @@ int is_valid_bugaddr(unsigned long pc) if (pc < PAGE_OFFSET) return 0; - if (probe_kernel_address((bug_insn_t __user *)pc, insn)) + if (probe_kernel_address((bug_insn_t *)pc, insn)) return 0; return (insn == __BUG_INSN); } -- 2.17.1