From patchwork Mon Oct 23 17:24:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 15771 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1448655vqx; Mon, 23 Oct 2023 10:33:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEw405qJzZYYMc4/ryXIzKV9ivv7/aTo2qFZpLo5iuUTQ+VmpB7Cu18Dfid7XGHARKwaAa2 X-Received: by 2002:a05:6a00:24c5:b0:6bf:4cb1:e78 with SMTP id d5-20020a056a0024c500b006bf4cb10e78mr8513086pfv.6.1698082385410; Mon, 23 Oct 2023 10:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698082385; cv=none; d=google.com; s=arc-20160816; b=EDnk+XFbRcarn7CIDMogofzTDqLabokUww9IdeP3g6MLXoWliqDDijiJaLvbxTPrSz vgyTwAkHAAScpAP7vDcuTOjUL9ukq7haVpWC3kN0ooGMeHgI6+cGPPEajG+/dFuy71Vt H0XHqOvhQj31Qt3iUMNxUR3Z2WGdMbRA0UzRcWRQyrLjp3SlySc1+5GSPP8tUuON2vbp 13XMcPuP6pqUimkacJUipkaEQsBA/A87JioX6c4aUFSNIqa0WzoORxUU0RgsF0a7ucqr iXS52MeSha8aHBy/lQtxYVBzi6ZQNXde397VAC1dfV8/jYY5GNMdmLSabLTSskYqopJT p0Qw== 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=t7dPTH86r3T7OE/Hsg6Sc2j1I/GQSk2tQP+zV+h/AG8=; fh=BqhVhkt11hdmkbujRH8QIfD2cez9lYpeRoddPZBJma8=; b=wsrQ0Uoj+HTOM32+gKdfnkueVBCjMjYlV5H+1L979kSCWtHECMygSGuXVd9hpuMMrv 8hKhz0Gr1aLIO9L6VEB0MKuwzmmzoD7ReJdWy5vG7WvbA/uW/FH6sj7OCxYTmGsj3f46 h4JyGlXDb0u8lCmnksu2tQR6HpzcAX6UgqV6f8FNIHKb336e3mIQwdtQv3TGaKIIzPj8 a4cxbiQPoLaicqQQyzvM8hM4SUoOa4qjh36lNQhHb5iaLZtOFJP/obuFAUQieNsloVoM W9symCNaSBYY/P08X2eGzzNpU0cKAlcu0Sy3tPDrRN5sFq42nqQzaFyIPk4XlPuNGVan RCaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=MFBZI8p7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id x9-20020aa79409000000b006bf62739e66si3718860pfo.22.2023.10.23.10.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 10:33:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=MFBZI8p7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5E0308076D06; Mon, 23 Oct 2023 10:33:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233628AbjJWRcl (ORCPT + 27 others); Mon, 23 Oct 2023 13:32:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230228AbjJWRc0 (ORCPT ); Mon, 23 Oct 2023 13:32:26 -0400 X-Greylist: delayed 450 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 23 Oct 2023 10:32:16 PDT Received: from out.smtpout.orange.fr (out-18.smtpout.orange.fr [193.252.22.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B8098110 for ; Mon, 23 Oct 2023 10:32:16 -0700 (PDT) Received: from localhost.localdomain ([89.207.171.96]) by smtp.orange.fr with ESMTPA id uyfSqiNV2aLS1uyfTqByU0; Mon, 23 Oct 2023 19:24:44 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1698081884; bh=t7dPTH86r3T7OE/Hsg6Sc2j1I/GQSk2tQP+zV+h/AG8=; h=From:To:Cc:Subject:Date; b=MFBZI8p7FmZLlPFCzeqUapweAH47vcCK4oyUBogCqv7EhD1XnR6I6QzcFo4tbNaM/ 9WoAIH9zWCABgwlyw+DoowNcv/UinyDoP2xX86rAW77+CpXkm6NCGxaBmrHi+t02W0 qeh4Ax+YLsbjbn2Pc3gqcgu60E+eySej/jW/0rKCUhEcrCCywNj8RS2QgOjXdptSkz syd+ioJdbyJRyBluDc3kBs7PIoC1ScZYf137hks9+/XjQcboh4MP1dLRwA06HkKc7S 6Vx+Rg552JZnrz1IrgcHC3ocgZXZGNCq2GiHYAZRkQDdrVYfzm2tK5d1qjMPL0cmyV YNOkBT5NZZB2A== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 23 Oct 2023 19:24:44 +0200 X-ME-IP: 89.207.171.96 From: Christophe JAILLET To: rafael@kernel.org, lenb@kernel.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 0/4] ACPI: sysfs: Fix some issues in create_of_modalias() and create_pnp_modalias() Date: Mon, 23 Oct 2023 19:24:37 +0200 Message-Id: X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 23 Oct 2023 10:33:03 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780568435326198812 X-GMAIL-MSGID: 1780568435326198812 All issues have been introduced by the same commit, 8765c5ba1949 ("ACPI / scan: Rework modalias creation when "compatible" is present") The first 2 patches fixe some issues related to string truncation checks and to computation of the available space in the output buffer. The 2 others are just some clean-ups. Christophe JAILLET (4): ACPI: sysfs: Fix the check for a potential string truncation ACPI: sysfs: Fix a potential out-of-bound write in create_of_modalias() ACPI: sysfs: Remove some useless trailing NULL writes ACPI: sysfs: Remove some dead code drivers/acpi/device_sysfs.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)