Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp669119pxb; Thu, 9 Sep 2021 09:20:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMRKdATVQZcZ3+6tcUIEpdlBGjzYsI5MArrzudFjq0R0nfTADxK30OZ58JLch8xA+1NciF X-Received: by 2002:a05:6e02:1d9c:: with SMTP id h28mr2893517ila.266.1631204444684; Thu, 09 Sep 2021 09:20:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631204444; cv=none; d=google.com; s=arc-20160816; b=FZyqeZcuWZiHgiW0+lYOXy0s46HBD2H1I4MqO7VZdnIJVyGiyluZldIMTp0UA1jMIt Ieov9TYhl/Esw83uRVA14xbTJebqPSNDtAkEepOfSqMleMDRTXoBWTVbfzXKNuzpeTHO 0Zd64EmpLzKHFSpWE01mXxmsCjLcI9nouRr3kFGa5g8O6Ds3Saymn0nYgRapmmNDlehu uzoKvSGZBpY6SyqdJFrqIs3JJ1KjXsqXN+Xldwwz9I3FHFS5nJBt+7LSCfSWQzj48Jwp y5tUuky/YN4QRUJaZFwqk5z/QbAEZTtkyzWyTaqMl5k8FH+FGk0+UzSJQlsJSzC7t0mb GWug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MRfmvePdX8oOz9Q0DkpWLyNgQ3mcavCdz3BsSy6225Y=; b=JheCq3/toLeDj/GnwUom1fGw0FO5NPO06Pfme8lYtxyv2FP7TDf/g8YG8YCgjUzKkR pHl8qsL8plQWgdpOtBshms7Y6EN1ormgsRkaVPZX1s6gySjGEt2KmkttQFGtoOjLS3mw sHo8mm49JQboAUudQdfaoeLGM4zCT2MSQEjDMk1z/bkBv7xhyCWaVoAxxEaw+TKk6b3i 1/CwQ3R2P02K8Eup6wNu1v+kQLRrediZ/5c2nlN7vfuJAVu1aCP0ZAen4CWq9DvTlyFN RKh9qdK570og3RkLDXJliw4v1uITRQbSHykjU53fkdoMYcrdqt9CMXgvVvgGEke/s/Dc 0bXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ChAq9KdT; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a94si1986267jai.31.2021.09.09.09.20.29; Thu, 09 Sep 2021 09:20:44 -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=@redhat.com header.s=mimecast20190719 header.b=ChAq9KdT; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234862AbhIIQTi (ORCPT + 99 others); Thu, 9 Sep 2021 12:19:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:56418 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbhIIQTh (ORCPT ); Thu, 9 Sep 2021 12:19:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631204307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MRfmvePdX8oOz9Q0DkpWLyNgQ3mcavCdz3BsSy6225Y=; b=ChAq9KdTzXi3cR0Z9jSkwNjBKnUJkBGJhHb1gSFvuCHjoYp0zWdud9Mg2Tqa+oomeA2J9M 2JOt1+e+YNnXvfgs+9h3fYfBsUhHgkK53y02HgBDosP11a7EPyTWKUaigNEUMtx+qboFDE D6pZGIn5kgRzW/W/LYrB3R4sJhuwIcw= Received: from mail-il1-f200.google.com (mail-il1-f200.google.com [209.85.166.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-86-EIgUeoy6N9u7zEK5dxp71Q-1; Thu, 09 Sep 2021 12:18:26 -0400 X-MC-Unique: EIgUeoy6N9u7zEK5dxp71Q-1 Received: by mail-il1-f200.google.com with SMTP id o12-20020a92dacc000000b00224baf7b16fso2500085ilq.12 for ; Thu, 09 Sep 2021 09:18:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MRfmvePdX8oOz9Q0DkpWLyNgQ3mcavCdz3BsSy6225Y=; b=MZJyprvlFJ2zKxVjRPY8w/Qxwm74+HjRBUHiqykGjfLD1eWJfrdA5PMPv2C7SmK8Cu 7/yj8NBRnykl5MQ6hCeX/skocAEpCMp6omi2YIUGaYYMRx1pSuL3fmI+5RlGjd5sS/Xv HacKfCk6DpqN5KvhkcZlYYif84yld0/M2rURJHqfZpB9fTmFtpL+M1W1fRC+PwBTbVO1 YHHMyKZY3qiNFSw2hZvzb/o49JtopAa78ym57XQT9jPCw7TXuGX23+knvcZ7b5jMJJPg NNDzfwlPWu/XMqEIYPhHVlatGPccFKqAosRxrnA9+POrS7lpwM0CKscnhvpJlaiJEELp kV5Q== X-Gm-Message-State: AOAM532hiIgAfHI0CCdvbL4Z4btyrJ89Ibm7e1IFD0PeeZiJdG/7ZGgr UuL654lSz/NMMFOYqqdScpv9U0V326sEfxN8zgezf07aX7vn/IP8T40lFRKNHx8S/jh3J56sOHZ 2svphxTHYSS3sCXweuoQpOqie X-Received: by 2002:a02:5184:: with SMTP id s126mr566120jaa.126.1631204305160; Thu, 09 Sep 2021 09:18:25 -0700 (PDT) X-Received: by 2002:a02:5184:: with SMTP id s126mr566106jaa.126.1631204304916; Thu, 09 Sep 2021 09:18:24 -0700 (PDT) Received: from halaneylaptop.redhat.com (068-184-200-203.res.spectrum.com. [68.184.200.203]) by smtp.gmail.com with ESMTPSA id k7sm1069698iok.22.2021.09.09.09.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 09:18:24 -0700 (PDT) From: Andrew Halaney To: jbaron@akamai.com Cc: linux-kernel@vger.kernel.org, Andrew Halaney Subject: [PATCH] dyndbg: make dyndbg a known cli param Date: Thu, 9 Sep 2021 11:17:55 -0500 Message-Id: <20210909161755.61743-1-ahalaney@redhat.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Right now dyndbg shows up as an unknown parameter if used on boot: Unknown command line parameters: dyndbg=module params +p ; module sys +p That's because it is unknown, it doesn't sit in the __param section, so the processing done to warn users supplying an unknown parameter doesn't think it is legitimate. Install a dummy handler to register it. This was chosen instead of the approach the (deprecated) ddebug_query param takes, which is to have a real handler that copies the string taking up a KiB memory. Fixes: 86d1919a4fb0 ("init: print out unknown kernel parameters") Signed-off-by: Andrew Halaney --- This is the last valid param I know of that was getting flagged on boot if used correctly. Please let me know if the alternative approach of actually copying the string is preferred and I'll spin that up instead. Sort of an aside, but what's the policy for removing deprecated cli params? ddebug_query has been deprecated for a very long time now, but I am not sure if removing params like that is considered almost as bad as breaking userspace considering some systems might update their kernels but not the bootloader supplying the param. lib/dynamic_debug.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index cb5abb42c16a..84c16309cc63 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -761,6 +761,18 @@ static __init int ddebug_setup_query(char *str) __setup("ddebug_query=", ddebug_setup_query); +/* + * Install a noop handler to make dyndbg look like a normal kernel cli param. + * This avoids warnings about dyndbg being an unknown cli param when supplied + * by a user. + */ +static __init int dyndbg_setup(char *str) +{ + return 1; +} + +__setup("dyndbg=", dyndbg_setup); + /* * File_ops->write method for /dynamic_debug/control. Gathers the * command text from userspace, parses and executes it. -- 2.31.1