From patchwork Sat Jun 10 20:40:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Demi Marie Obenour X-Patchwork-Id: 13275076 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 1A0C8C7EE2E for ; Sat, 10 Jun 2023 20:41:28 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.546620.853617 (Exim 4.92) (envelope-from ) id 1q85OL-0001RL-LT; Sat, 10 Jun 2023 20:40:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 546620.853617; Sat, 10 Jun 2023 20:40:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q85OL-0001RE-Ij; Sat, 10 Jun 2023 20:40:57 +0000 Received: by outflank-mailman (input) for mailman id 546620; Sat, 10 Jun 2023 20:40:56 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q85OK-0001R8-Ix for xen-devel@lists.xenproject.org; Sat, 10 Jun 2023 20:40:56 +0000 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 1726e3db-07cf-11ee-b232-6b7b168915f2; Sat, 10 Jun 2023 22:40:54 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 462AD320005D; Sat, 10 Jun 2023 16:40:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 10 Jun 2023 16:40:50 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 10 Jun 2023 16:40:47 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 1726e3db-07cf-11ee-b232-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t=1686429648; x=1686516048; bh=SKMdRs57+W2fpRqekdSA2J6KD xjMwUiujtGE7TR4ltw=; b=iWSZtvr/wOJi0wlhO3pBcPbc+O5csKxNy6ZbBr6/z sQuqXbv5mfP0nj9uydkrJEq4GNZ+AxtBqM/XymTVq27Kdibbg/owykCcv2gYWewB feBmyp1jWsd3nkXfusn5kg4Xcmp7M1BAqpaymmOe0MTJOXGLXXfz8FKTYc7oheOo taQ5XDo0EIWBmHvd2CA6OjrxBqSEmPjU8JyPzREcdXBZZl5R+aMRBDRgAAmSdgEs YyZz/bo/SvXLUYg7leX96R0SxnuazEe6FFgvF0ebzXF7zl0Z76fjkKbKW7H2La7k GR5HBBfHmKEb92JHZAvTA97AUpglt5ii8fyEJMOOyKakw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type: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=1686429648; x=1686516048; bh=S KMdRs57+W2fpRqekdSA2J6KDxjMwUiujtGE7TR4ltw=; b=fXqsplFSR3vCtQ1Du ZRvZCdC67ZvOFOo8dxrJS/LitSkCOqrS2Bwb1GD+RXO8dpwBNlP+aizdvyTmHkGA Wwu4ydoBuAEptGbMW9mpArx5tJ6fw3m50wSk0TpwHmjQe5AylLx13Ywah7pBMjm6 sdIuyg1FU6djI3vFdK2FnC9l9FpYyDltVZKzdT13Lcg9Nzp0mtnjIHBIAxDB9wLq vNuZjUyY0GB4WOr+WfZ5UAyajb5FuLWLmDlHpnDUScGqFu6yTw0r5+KW15MJxRNy 49Ns03EpS3wS59qnR3WdZaTF6CTsIM0nMlfTHM1flevecgOkEhQ+XrGUmLBzLskm bt+tg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedutddgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffogggtgfesthekredtredtjeenucfhrhhomhepffgvmhhi ucforghrihgvucfqsggvnhhouhhruceouggvmhhisehinhhvihhsihgslhgvthhhihhngh hslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhephfeggfeiiedtieejgedutdekgfet geehheegteekvefhfefgudehtdevleegueegnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepuggvmhhisehinhhvihhsihgslhgvthhhihhnghhs lhgrsgdrtghomh X-ME-Proxy: Feedback-ID: iac594737:Fastmail From: Demi Marie Obenour To: Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Lee Jones , Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes Cc: Demi Marie Obenour , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org Subject: [PATCH v3 0/4] Make sscanf() stricter Date: Sat, 10 Jun 2023 16:40:40 -0400 Message-Id: <20230610204044.3653-1-demi@invisiblethingslab.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Roger Pau Monné suggested making xenbus_scanf() stricter instead of using a custom parser. Christoph Hellwig asked why the normal vsscanf() cannot be made stricter. Richard Weinberger mentioned Linus Torvalds’s suggestion of using ! to allow overflow. Changes since v2: - Better commit messages. - Fix a compile error in simple_strtoll() (found by 0day bot). - Fix an uninitialized variable (found by Dan Carpenter). Changes since v1: - Better commit messages. - Use ! to explicitly opt-in to allowing overflow. - Treat overflow as a conversion failure instead of returning ERANGE. - Drop the first patch (removal of simple_strtoll()) as it breaks bcache. - Stop skipping spaces in vsscanf() instead of adding a separate vsscanf_strict() function. Demi Marie Obenour (4): limits.h: add UCHAR_MAX, SCHAR_MAX, and SCHAR_MIN vsscanf(): Integer overflow is a conversion failure vsscanf(): do not skip spaces Reject NUL bytes in xenstore nodes .../hive_isp_css_include/platform_support.h | 1 - drivers/xen/xenbus/xenbus_xs.c | 17 +++- include/linux/limits.h | 1 + include/linux/mfd/wl1273-core.h | 3 - include/vdso/limits.h | 3 + lib/vsprintf.c | 98 +++++++++++++------ 6 files changed, 86 insertions(+), 37 deletions(-)