From patchwork Mon Nov 28 08:19:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13057151 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 141F9C433FE for ; Mon, 28 Nov 2022 08:19:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 63BA310E2A3; Mon, 28 Nov 2022 08:19:49 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6BD9010E2A4 for ; Mon, 28 Nov 2022 08:19:45 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C32335C013B; Mon, 28 Nov 2022 03:19:42 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 28 Nov 2022 03:19:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1669623582; x=1669709982; bh=3N/SfcTOuzx4Y/m8hSni9Wofv 8VWO9oPL6Rhphkdkqg=; b=DxYWV0u2Eu63lNQhHJyEKqpWitxipjGYDxo2IKeCx L3es6Rz5hcGM3wCd+KrEqoTZBi76+M9PPbTGs9u8ohP64Ncti1Pha4Ra+6V+3O5Q mxlx3ahx179ytEggkmhxBPbXhyl/9No2pAH9zPR92Sbv+oO9KBzsCr06LDXC1ChO tOfdylUJeJOeAQnsqfzA9Xxpzzm0RO6coy4MSiXxrJ7vZBWXCgMgxLSWIEiJ+16B 2c+qNohxatMPZZihOnMFmVQCmrTElU6r8+hRyhM57h52ro9gl6SmlXw4OAAs6acJ /e0OB1Wk2y2TNAWGEelRBDUOsICjgnb3yRBrCKOD5Prhg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1669623582; x=1669709982; bh=3N/SfcTOuzx4Y/m8hSni9Wofv8VWO9oPL6R hphkdkqg=; b=a0rH2qF+OnzNDNQa5/8ihimBR/uRfSvR9aXzMhhcqu40nmmu5p4 2xtrC3jM30sRhr5tBltaAUpDVoKXCGuoSVmrXG4IskAtkUu0rGR++43OrbGdBS82 HP1w66mNp2BSH/WwQiyZgkMn1Ip7wd2xH6dteHWCTpBmk5jGz55EdRXJV3PIA+46 ax/Kyxl+SO5Kk4SraOFTo2hly6T12wBj5FPeB91arxMMyReB7ka6eOQ5PLDNQtFn NM26WyAURewWUm1m8yB0pUBOAgOh5iZqvY2M3Zff3KGDCz5gfc1Y3vvXrqFzaNxQ +NkzQYjNuO4R/6mIKFNlALAatbrnbTXYzTg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrjedugdduvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeektedujeeijeefhfejuedtudegtdejffffvdettdeigeekffeileelgeevgfdv vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Nov 2022 03:19:41 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH 1/3] drm/doc: Fix title underline length Date: Mon, 28 Nov 2022 09:19:36 +0100 Message-Id: <20221128081938.742410-1-maxime@cerno.tech> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel test robot , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The underline length for the new Analog TV properties section doesn't match the title length, resulting in a warning. Fixes: 7d63cd8526f1 ("drm/connector: Add TV standard property") Reported-by: kernel test robot Signed-off-by: Maxime Ripard Reviewed-by: Javier Martinez Canillas --- Documentation/gpu/drm-kms.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst index 321f2f582c64..c92d425cb2dd 100644 --- a/Documentation/gpu/drm-kms.rst +++ b/Documentation/gpu/drm-kms.rst @@ -521,7 +521,7 @@ HDMI Specific Connector Properties :doc: HDMI connector properties Analog TV Specific Connector Properties ----------------------------------- +--------------------------------------- .. kernel-doc:: drivers/gpu/drm/drm_connector.c :doc: Analog TV Connector Properties From patchwork Mon Nov 28 08:19:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13057152 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 D24D7C4332F for ; Mon, 28 Nov 2022 08:19:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E4F110E2A4; Mon, 28 Nov 2022 08:19:49 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6B7F810E2A3 for ; Mon, 28 Nov 2022 08:19:45 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B8AAC5C013C; Mon, 28 Nov 2022 03:19:44 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 28 Nov 2022 03:19:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1669623584; x=1669709984; bh=D8 zB4e+do9rRHIqY9H6l6OnPHtwa6fVAtr0SaXuL7ps=; b=hGUktcZVSso3ibcvqc pd1cr3qIcKT4IuQi0AW9cr52ArPN9LZMsR9tcDMBJOxemgSE+tc9eT1uFNylFz+5 bZ7Gp1Uk1AoO6zX1VX188i0z58BXiRg7AfBeyP+AP0nFIK8mOjk94FE+r4cL/r2A mKttV3trMCiJDJTgGSBYuMUkeZNM3mYW//eR1ejEAZ/l4MtC+RLsnoysEqcWkLWl vVpy84eXXGQJiXfsfJwGSSLNQzTE3MKxk6NVLK9dw7WrOcHLvdAYC42ZR48QdkZh Z37md888uE9ERTWwMoyIk7qe4oKKO6RR10vr/38wExoDL4ohYAlSj5nagyDlgg5u cQ0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1669623584; x=1669709984; bh=D8zB4e+do9rRH IqY9H6l6OnPHtwa6fVAtr0SaXuL7ps=; b=FirzTXOM9AmdidEZ182K8x+dUCxUG ZhVHlfJJYlEX+27ZvxhQFwex7p52Ye1L0sD2eSlkX53uxNA6/o5YxD4+AxdKtltn 2fHwOH0CXenYqmqJV5une/z3XhBa73b9sYQakhONR/u2Qlb27ZN0DJjx6tDBvrhV Rrgbg9jP6h76K9Ipkr/vEsGGmj6uvtoVaJQlV9jgAUih5d99u/KIldeTH1KQu92t 6YobF5/jum8v4SBHSHxZcgwV80WxTnRBBbQ+v6ZImDsK8t4d/9A/aS7DFntq6t2M ZKkPOHQ3akuA0Ce5XNqZz7SOS/W7xsixxD1feqgpIEt8t2aKge2iVUuQA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrjedugdduvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeelkeefteduhfekjeeihfetudfguedvveekkeetteekhfekhfdtlefgfedu vdejhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Nov 2022 03:19:44 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH 2/3] drm/modes: Use strscpy() to copy command-line mode name Date: Mon, 28 Nov 2022 09:19:37 +0100 Message-Id: <20221128081938.742410-2-maxime@cerno.tech> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221128081938.742410-1-maxime@cerno.tech> References: <20221128081938.742410-1-maxime@cerno.tech> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: coverity-bot , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The mode name in struct drm_cmdline_mode can hold 32 characters at most, which can easily get overrun. Switch to strscpy() to prevent such a thing. Reported-by: coverity-bot Addresses-Coverity-ID: 1527354 ("Security best practices violations") Fixes: a7ab155397dd ("drm/modes: Switch to named mode descriptors") Signed-off-by: Maxime Ripard Reviewed-by: Javier Martinez Canillas Reviewed-by: Kees Cook --- drivers/gpu/drm/drm_modes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 699c66e54668..be030f4a5311 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -2316,7 +2316,7 @@ static int drm_mode_parse_cmdline_named_mode(const char *name, if (ret != name_end) continue; - strcpy(cmdline_mode->name, mode->name); + strscpy(cmdline_mode->name, mode->name, sizeof(cmdline_mode->name)); cmdline_mode->pixel_clock = mode->pixel_clock_khz; cmdline_mode->xres = mode->xres; cmdline_mode->yres = mode->yres; From patchwork Mon Nov 28 08:19:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13057153 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 C1C1DC46467 for ; Mon, 28 Nov 2022 08:20:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 19FF210E2A8; Mon, 28 Nov 2022 08:20:03 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by gabe.freedesktop.org (Postfix) with ESMTPS id BB60910E2A3 for ; Mon, 28 Nov 2022 08:19:47 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 21D5F5C00D0; Mon, 28 Nov 2022 03:19:47 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 28 Nov 2022 03:19:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1669623587; x=1669709987; bh=YC Qih31h4phJIOL40JWML9l9DvEpKwZX8JQjgXcSSq0=; b=ONvU4Gunjx5Q2tarsy 3ZfhpyIY0hBBwoLbLPBnwZqCsdxlBd3dH1HSqybnUZNlZ4eruSW/6NGCL8uN5dPl GszYlOKlNXVFUuTmR/34H8rjM9jVbzRMH7OSG8szt8d9RgFND+xNNAfwsWPB712u JVYl9+mveQcD3FuW4yNEXsabE7WTnaGTuu1fRHN4XuibfzGhtDYV8yHW+1UkZSbZ MGz1MRUVFzT3M4DMzCxb66dHFQBQpKrzvaPdKkbK68Ta0GXS7H+2/gmKXFtpbLPD zxI56i2pCoBaEunk+j553ShsWOI4cNvcnb0/mR+sIoTsewGHOMLmW1rw5Wc5JdcY tMLw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1669623587; x=1669709987; bh=YCQih31h4phJI OL40JWML9l9DvEpKwZX8JQjgXcSSq0=; b=m/5vNSJZJMO6huHfXhuq6SC1fXOLx IC8jDX9ET9dz4VeiIgyunQr1VgMfnELGbEj78YJBoF3CZ1xNb2U7USG+qsUkHD75 HedtJ8v1cuEqUEfHbwuiY6IO7cpazNbmq1KYW4TLxNi1BZ4u4ZjKWDPi8e+dKL+p OHkezFcqISqrgdqXpAz5cq+R+otm3FPmORH6UOnp1Qo/tDWP9aqmuIqsEpROGjPR tWXA+erJNScHe5bIX03jy8hIm1e7bjwoQXkNajA9qkQRLuAKazO3gD14wgug9ccL 79iiLdgbnFKhyUDbgpAEc9WoIucXmLesBI2C29FnzNYgB7nsMM8TkOqpg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrjedugdduvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeelkeefteduhfekjeeihfetudfguedvveekkeetteekhfekhfdtlefgfedu vdejhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Nov 2022 03:19:46 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH 3/3] drm/tests: helpers: Add missing export Date: Mon, 28 Nov 2022 09:19:38 +0100 Message-Id: <20221128081938.742410-3-maxime@cerno.tech> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221128081938.742410-1-maxime@cerno.tech> References: <20221128081938.742410-1-maxime@cerno.tech> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel test robot , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" drm_kunit_device_init() is a public function meant to be used by other tests, but isn't exported. This leads to modpost errors when the other tests are compiled as module. Reported-by: kernel test robot Signed-off-by: Maxime Ripard Reviewed-by: MaĆ­ra Canal --- drivers/gpu/drm/tests/drm_kunit_helpers.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/tests/drm_kunit_helpers.c b/drivers/gpu/drm/tests/drm_kunit_helpers.c index f1662091f250..8c738384a992 100644 --- a/drivers/gpu/drm/tests/drm_kunit_helpers.c +++ b/drivers/gpu/drm/tests/drm_kunit_helpers.c @@ -66,6 +66,7 @@ struct drm_device *drm_kunit_device_init(struct kunit *test, u32 features, char return drm; } +EXPORT_SYMBOL(drm_kunit_device_init); MODULE_AUTHOR("Maxime Ripard "); MODULE_LICENSE("GPL");