From patchwork Wed Apr 12 04:32:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Kondeti X-Patchwork-Id: 13208477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 89C58C7619A for ; Wed, 12 Apr 2023 04:34:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=jRqvF4peNlC/5lyPvBckn7pkBiqk5GAd04od/Bav5jc=; b=m+eaxzu/OA2wP4 sBaxrJE/RkebYlwHjRnvZ2hLTVchYsMftNSwiKAwZSuBMGe0DZr6+xWLOZR7rOQSxlgx+KczF84tW vFZkNucek6jdcGRsfQv0wGj6b/lKvpuvfFv2wFjBfyJeKJM/2L8YtNEdXhznQ2EUy7mmHPcLbX0I4 Lxfg+l6hQJ+J5BrN66q7eOmdZp1W6vvMwn250AxPV4Hgikv0mer4w7Kg8vFCrUvQkswV/c5jd7X43 n/4Zt3x/2jAnrh34d7LCKzZfzdIqCYbmtRVILpwgpf35xSC0EQ1q4aso87lnqcoJhHuD16OX1l36n flSulq0jXAhehA33z0fg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pmSAd-001ll3-22; Wed, 12 Apr 2023 04:33:23 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pmSAa-001lk5-0e for linux-arm-kernel@lists.infradead.org; Wed, 12 Apr 2023 04:33:21 +0000 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33C447kn019794; Wed, 12 Apr 2023 04:33:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=5jqR/gmWFAuu1wVu6uuEschRlPfhwalbwHfoHfxxsIo=; b=mJJuiWZu6jN841JxTOE1F06BMFDrdxmFraveRe1JPKu8/ABdt/P8W80qICNCCD4mgdvp ZIg1J4TrICqZkbEgi3mKhjJc8wBg+1YQ3q8RHX6Ffc6f/DwSx/sTfGF6gwjOXWX/TGKH ga0qz12aqPwDVnEjobSf9rqlgAr9V+97rW/EautOuBEsslJ4TGpv4JOZg7KHQkUBi0Vj oYx8L9FTClGDV8s8WkDFxNFFsjkod1jgaprF6Yr/c9FbPBKa7UkXmTihroOVSa38kan3 AjvnnG+xUKPiOntDewCuXFOzAHfBfb5trWlFzThIGS0LG292WefSod79czvxbUdnOFd1 KQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pw9b9hfk6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Apr 2023 04:33:11 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 33C4XAF2007956 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Apr 2023 04:33:10 GMT Received: from quicinc.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Tue, 11 Apr 2023 21:33:08 -0700 From: Pavankumar Kondeti To: Catalin Marinas , Will Deacon , Marc Zyngier CC: , , Pavankumar Kondeti Subject: [PATCH] arm64: kernel: Fix kernel warning when nokaslr is passed to commandline Date: Wed, 12 Apr 2023 10:02:58 +0530 Message-ID: <20230412043258.397455-1-quic_pkondeti@quicinc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 54WOu-MfX6C5MyJb_hz-35BsfmgnFRTu X-Proofpoint-ORIG-GUID: 54WOu-MfX6C5MyJb_hz-35BsfmgnFRTu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-11_16,2023-04-11_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 mlxscore=0 phishscore=0 priorityscore=1501 bulkscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304120039 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230411_213320_274210_08826A48 X-CRM114-Status: GOOD ( 16.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 'Unknown kernel command line parameters "nokaslr", will be passed to user space' message is noticed in the dmesg when nokaslr is passed to the kernel commandline on ARM64 platform. This is because nokaslr param is handled by early cpufeature detection infrastructure and the parameter is never consumed by a kernel param handler. Fix this warning by providing a dummy kernel param handler for nokaslr. Signed-off-by: Pavankumar Kondeti --- arch/arm64/kernel/idreg-override.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/kernel/idreg-override.c b/arch/arm64/kernel/idreg-override.c index 95133765ed29..75ceb7c07af7 100644 --- a/arch/arm64/kernel/idreg-override.c +++ b/arch/arm64/kernel/idreg-override.c @@ -177,6 +177,13 @@ static const struct { { "nokaslr", "kaslr.disabled=1" }, }; +static int __init parse_nokaslr(char *unused) +{ + /* nokaslr param handling is done by early cpufeature code */ + return 0; +} +early_param("nokaslr", parse_nokaslr); + static int __init find_field(const char *cmdline, const struct ftr_set_desc *reg, int f, u64 *v) {