Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp284985rdb; Sat, 27 Jan 2024 06:33:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMOtJfVIPLzCy6rCIRyfGDziBBNwjd5ycFwuGyuBUDiseeCm0TSl/x4y5al5LqYhzKxrRc X-Received: by 2002:a17:906:af08:b0:a35:7069:d0fa with SMTP id lx8-20020a170906af0800b00a357069d0famr5909ejb.17.1706365982421; Sat, 27 Jan 2024 06:33:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706365982; cv=pass; d=google.com; s=arc-20160816; b=cxUsjrBQkkEQJ1iRqJaQsEPr7dToXuNrXjRzxSeLpkg3PBkb4Ke2rhR3+pdIgXH83l zUbQRsCagriB88rkmpKGM3Oo86YWlhyBP7o3NNbH7qMMBw9laPpDku4biMifRKS3Vw/2 26kokelWamGmmahBpyEPSOu95LdLbpdfj/vNOMbKyKyzzfjAQH3t5lJMQ7jegvci7ewk clnLgTwe805A1V4WUiEVcdThhqfk9VfE6j8ygP+Hc1R5VmcU0097NbAEFTZNT6xKZ7pT Hm3+oMk85QdZwJgD9hxWw945Gk2mQbyUkuyvdtn6h6nxrAbBQFcRujApbIL8mO4jZajP +Xog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=uoG4wqLPKU0xmRMHAJDwi4nyNh2pi3z2SytMACzUiiE=; fh=G0UkKRAgZthRBodYoqiRUtvLFrF4V35UFdVyrJcpwWA=; b=QJ7+caWtog9BJH7Tt2kxp5+grjtphTT+3P7UBTnn8pQn2r4EcFNdRoAjY2z/gdo5OF +4agAaUR7MS9zaw7sdb5/guDmvzMAF67bkJ8d52CWlPtvC3Lph00K12pnPG3wv55xxHV ZiW2DcvdoEAZeJI1g8hPP4DeCrZgPexzySU43jk2TS6zNDanRLbM8iRv1vUHMhwQtEm+ cdc14pmpdCF2wjutR5fpWzgpS2bPvA38ob0qBB7XyaTQYAdlm/AvYV9qTrd7PH1i6WyL 2//re/qOgxCPouIH3MpLigyEc88zz9+WD+q3rlNUdT/32X/lRvZchPtL9deXJhY1zzrb LDgA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aculab.com dmarc=pass fromdomain=aculab.com); spf=pass (google.com: domain of linux-kernel+bounces-41212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41212-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l13-20020a170906a40d00b00a352a39fa03si950619ejz.1011.2024.01.27.06.33.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 06:33:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=aculab.com dmarc=pass fromdomain=aculab.com); spf=pass (google.com: domain of linux-kernel+bounces-41212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41212-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 236561F229D9 for ; Sat, 27 Jan 2024 14:33:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D60FE2577A; Sat, 27 Jan 2024 14:32:53 +0000 (UTC) Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BEAD2560C for ; Sat, 27 Jan 2024 14:32:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.58.85.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706365973; cv=none; b=Y7tK+h/KSFkolD3dDcC1fQRsrQ4JRmxjSzm0Bx/Cy1gUYSIycqL/2VpYUNfxu7DxGRkLEhVxVIZBjnqg454xmUSXccdpuQ48lOrDxvXmY/I8bXXW7qioS+JqRxku/LLaQ/a1VX/AGo4dLsVVgN1InYFpwX2M6kF+67zERZEbFO0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706365973; c=relaxed/simple; bh=uoG4wqLPKU0xmRMHAJDwi4nyNh2pi3z2SytMACzUiiE=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=AFrHdhl41adoRzRLXgin1UuBXuossfsSsMq05xUlykq1xdDGVJiU0yy40sUWj7h63H6FwjCWGaXZcQquDYnTMH95+me7ZvtPlpYZvBcL8AtNidBscaxaXT4BLioYzBF8yD22R70ilk4bMlFlp7Kw/99gyYh4uRdQg7vYxxW0yL8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM; spf=pass smtp.mailfrom=aculab.com; arc=none smtp.client-ip=185.58.85.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aculab.com Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-42-K5Ny_hd0OVOELPLriuF_ng-1; Sat, 27 Jan 2024 14:32:43 +0000 X-MC-Unique: K5Ny_hd0OVOELPLriuF_ng-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 27 Jan 2024 14:32:23 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Sat, 27 Jan 2024 14:32:23 +0000 From: David Laight To: 'Lee Jones' , Rasmus Villemoes CC: "linux-kernel@vger.kernel.org" , "linux-hardening@vger.kernel.org" , "Andrew Morton" , Petr Mladek , "Steven Rostedt" , Andy Shevchenko , Sergey Senozhatsky , Crutcher Dunnavant , Juergen Quade Subject: RE: [PATCH 1/1] lib/vsprintf: Implement ssprintf() to catch truncated strings Thread-Topic: [PATCH 1/1] lib/vsprintf: Implement ssprintf() to catch truncated strings Thread-Index: AQHaT3pqpS+sRHqV5U2M6pwWmFnMHbDtupAw Date: Sat, 27 Jan 2024 14:32:23 +0000 Message-ID: <54e518b6dd9647c1add38b706eccbb4b@AcuMS.aculab.com> References: <20240125083921.1312709-1-lee@kernel.org> <20240125103624.GC74950@google.com> In-Reply-To: <20240125103624.GC74950@google.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transf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