Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3591502rwd; Sat, 10 Jun 2023 10:25:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4zHTchD03nrPMhJg8Kg3oh8I7t+7ZsieF+RSp0O5gI+ohBP7pCGfj4WEItWsBRWozCnbqu X-Received: by 2002:a17:907:a05:b0:96a:928c:d391 with SMTP id bb5-20020a1709070a0500b0096a928cd391mr4701549ejc.4.1686417944451; Sat, 10 Jun 2023 10:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686417944; cv=none; d=google.com; s=arc-20160816; b=0Yx054M0bzGqR48Yy3Sbzy7j6G7GJ1jAfAI8mYR9HnF6db61v31iCIXOdADPFeTaq5 SN5lH9G0IYmjO9zTG/t38mICU3tdKPWwFm7HwudsTg1xO+XDijfBV/+1P/OpDWqaw2Q6 ddT39mcDjVmbEerB3yxPjTm2OiCLOMbneOUyA0Ir4HAREiV4vW8ZevqYZY7TPmzcliDu KXMxJTL/4hxJ2FlAAWjeATf70aEU83NBpiaFSbIRKaF/rRnTyko84E09iOpVYGyAgnYW B4FhfVAyRrV3Njh9aQlTHhM/5URqG1QebkeFUd6ytwrN8w8a1U5/V3UNJwx5MX2T1B8C 1sVg== 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:feedback-id:dkim-signature :dkim-signature; bh=CFxrsTHk2WZ2bHj5E7HOWzGC2M6TbCCvBJcoVes5ASQ=; b=GnGhpQ4h9B37nvsfBdKwHIr6/rBHKeVUPB5fzvKYatPs9KdtUUw1+x9R/gW54zhUKW MAa9EK5KNG1Ji/si0Ab//Oj3Qe/ZfFr2TmpBCTGSJQR0G2pb0fl40dGEoOTZgyJWcbqr Wg+UWV9JxLmBSuxwVRr3GWWKtv91G0LvKSRVe4/BRIv0+/jIarhb0DbSGPtmrkYLqiqL YhJfrWbRPOgvDjSOL8IVthOGLrDTvVJrLv4MBLReoo5rzUzvsW/UGOxt2EASEXxYroqk 6QuVv9p3iSfkNVlejBAQuGWLVc5Cb3XPXzwi0IwB9xZ2HIE07i1/SleXGwtuSdyLhmnU H7ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@invisiblethingslab.com header.s=fm1 header.b=HO0vJtT7; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=NjIw4pIC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a170906110900b00977c4061020si3887148eja.639.2023.06.10.10.25.16; Sat, 10 Jun 2023 10:25:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@invisiblethingslab.com header.s=fm1 header.b=HO0vJtT7; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=NjIw4pIC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230310AbjFJRIB (ORCPT + 99 others); Sat, 10 Jun 2023 13:08:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjFJRH7 (ORCPT ); Sat, 10 Jun 2023 13:07:59 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B300C2D68; Sat, 10 Jun 2023 10:07:55 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 76A435C00BA; Sat, 10 Jun 2023 13:07:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 10 Jun 2023 13:07:52 -0400 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=1686416872; x=1686503272; bh=CFxrsTHk2WZ2bHj5E7HOWzGC2 M6TbCCvBJcoVes5ASQ=; b=HO0vJtT77+rZndOX90RQX40x6vq642GbuMdxU55Ca zeVatV2LwToz78+BK08NzP769skVN+z1oFdl8bU5R0yZdNJ9jpkOcn2Q/JfzDTQQ Ynz3V4ag043lIML+1y895NbuI+eXWQM+vf0q7tIEhg3Y1irGvhk1r/GeSqC26ceX hATz9XyCucDSV/zhLfdkBcBO/QulWpjU9VY8T2Ehu9xXxtrv56Samma8R/JICMc0 d3uE+rvdtv1Nm19G4eocL0vTbxmsjOc5ljGXADTU7zOnwI41Ii+7deQXrNPM4CJA hLDYENmpLE0N/5ccHG1kBTmUUASAmZ0Vha3NaQ0oDXffw== 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=1686416872; x=1686503272; bh=C FxrsTHk2WZ2bHj5E7HOWzGC2M6TbCCvBJcoVes5ASQ=; b=NjIw4pICWS+wOmKQm 1JvFxSVOo56p+oLMbtOx+kbeeI6t01RsLM8kprlB/zc679knq1dlFrOL+wE8FEME mmAFpuvGIGrP49cxKoc9kqWhPlX0wpzo6RsFb5N3R67UJ2dptFmLg06xx4lcCyZ7 UlXREv/EdYUaSjvsbWGWYqUgABLfxE9j7iDOgeBiovjD/HzfPodvq+g029XHvUfh 6R7pVnLpqOA8rK5qepvydgnq7z/Y5Rmn8VRt5rket3TftfDCvOD0oT8URRDlfhgR YWiRqygOUFRunE901x96yp3zyPNkOwHDuYirhZkoe6fFfxT2NBDPynKznM6S/HYa zNNsA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedutddgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffogggtgfesthekredtredtjeenucfhrhhomhepffgvmhhi ucforghrihgvucfqsggvnhhouhhruceouggvmhhisehinhhvihhsihgslhgvthhhihhngh hslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhephfeggfeiiedtieejgedutdekgfet geehheegteekvefhfefgudehtdevleegueegnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepuggvmhhisehinhhvihhsihgslhgvthhhihhnghhs lhgrsgdrtghomh X-ME-Proxy: Feedback-ID: iac594737:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 10 Jun 2023 13:07:50 -0400 (EDT) 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 v2 0/3] Make sscanf() stricter Date: Sat, 10 Jun 2023 13:07:40 -0400 Message-Id: <20230610170743.2510-1-demi@invisiblethingslab.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 (3): vsscanf(): Integer overflow is a conversion failure vsscanf(): do not skip spaces Strict XenStore entry parsing .../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 | 90 +++++++++++++------ 6 files changed, 80 insertions(+), 35 deletions(-) -- Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab