From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D755AA00C4; Wed, 27 Jul 2022 10:22:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9D6440141; Wed, 27 Jul 2022 10:22:11 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 649F2400D7 for ; Wed, 27 Jul 2022 10:22:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658910129; x=1690446129; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=QdvDMOvRlu9OWqHkmb/dKrsIkf7LuNhFeGuxKhLZtdY=; b=KzwqzQGR2ao1vE18hDc7NMNMX5Tr4A7dYBTLPhgBp1c/R1QnNplUDS3T GH1jrC6N3kiKVZDjcG/4gJNsYIxH5QuE8qUOfIGg0cCOHcCKFHj3AZUB9 1kDGhLFj8z1uwdi1zqjYamg3J5gJIleDomiFjbZM+1Z+ycoWIYFcsrxQJ z1q34KpjRRhI6wJnAtlarCAV7AJWefr4beXzQTfpiuSu1zgSo3LZmrLNk Kzb15r8DOBNa9njCwquiwt9if+FOkGUirB1iPShaLszx4ZRsiiox6UjPk dr6p/qGb5cd8CVshfd6rk8/EdQyZKxGA5PrI1hGaISZJixP9+tLfEW0KK Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10420"; a="275051668" X-IronPort-AV: E=Sophos;i="5.93,195,1654585200"; d="scan'208";a="275051668" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 01:22:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,195,1654585200"; d="scan'208";a="575882047" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga006.jf.intel.com with ESMTP; 27 Jul 2022 01:22:08 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 27 Jul 2022 01:22:07 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 27 Jul 2022 01:22:07 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Wed, 27 Jul 2022 01:22:07 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.45) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Wed, 27 Jul 2022 01:22:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iX404BE6ssP2PkaKOA950MmibGt+obhKWgXXmIVKWC52rUfHoR6PwHg8ZcfbKavohpq1zDMKtZilzkcs0FYFk1dUfnrV8M5/IeHrt07o0rZyul2em/nnCsDlzmT00nZZ+Bc+2J2HWaXX3bKnIGaAgHjyliFo3SRLOGBVPRWLwnDFthwySr8Hqb3OCfPe8RUuy6gNL2JrEfJ7qhASVGZR0o2KoUqd1W8VcT7EtuW51Zw4nJ8YfWJNrayy8yHfEFDp1B1tB190xIjkJbE5S9s+IlBwfPK6A0CRBVXyWkIcQCaUFKzqJ15qsWbnWy3OlgpjqKzoEZ89fuH+iQ4extbfwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=g4bcHbmAI/h/Ikgn/sg2Wgs4l66jPNO6IhHdIFtHoP4=; b=gKM2gNLlD3eJiN1EWm2LNcA1knN4/D+R6t9h35ycJiP+zwUl5gJ6THr+fLaF7avc50rCm7kNi1YDst6Qxf5IB1eQi0Y2NcaMAW6vZa9IpF0qgb+127hz/mHk9Yn9xYLV9I2qZHbFVARB7z2BNOlicsyNBZD1awuz8LHDdwTrqKM0VByRsZVU/MD4oIau0kCIzDnxJ7dJSsumTyaIr3u1JXheUN5jPVaM7IWVvlBTEVK40T7AFiCKrXryxgB5SdLAnDxJAe3+EXFDzduxQae1Y4LOqlOJN5lvcC7a4xk8OfoYHY0lwo+RPpG4pvyhs+uin2vQCfUmPCo2os1T3CSUeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) by MW3PR11MB4556.namprd11.prod.outlook.com (2603:10b6:303:5b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Wed, 27 Jul 2022 08:22:04 +0000 Received: from MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::8e4:e1e9:a851:4b0d]) by MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::8e4:e1e9:a851:4b0d%5]) with mapi id 15.20.5458.024; Wed, 27 Jul 2022 08:22:04 +0000 Date: Wed, 27 Jul 2022 09:21:58 +0100 From: Bruce Richardson To: Morten =?iso-8859-1?Q?Br=F8rup?= CC: , Ciara Power , Keith Wiles Subject: Re: [PATCH v2 02/13] telemetry: fix escaping of invalid json characters Message-ID: References: <20220623164245.561371-1-bruce.richardson@intel.com> <20220725163543.875775-1-bruce.richardson@intel.com> <20220725163543.875775-3-bruce.richardson@intel.com> <98CBD80474FA8B44BF855DF32C47DC35D871F0@smartserver.smartshare.dk> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D871F0@smartserver.smartshare.dk> X-ClientProxiedBy: LO4P123CA0584.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:276::15) To MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8f9f954-6ed4-4fa7-e56d-08da6fa91645 X-MS-TrafficTypeDiagnostic: MW3PR11MB4556:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q0AJhjrRgPP1ja0rr56Rr0FlROVLK3FykEuNMf4yjuQRXo/m+Vbqg2m00lKpHr0RAP0cX4IcG1NpXCWe14GOfxizwvnAyLkgVNYs1oUyPw7gmecOTF9dv91nxUfWWozvroxrpZ0miy7eJDotwvOyRkwiLaN/PGzCTohGeOECHtNPmLAQTak3vLvDjf1vsKgSJWG9RPr7NXbzV/EFQIoZEm9Fqr9gyu0Kyty8O7X6ajV9gnWvMqkbK9zJoRlra4QEsQ5SjmLsqilL8xRjJaiucBnyxXl6wndfuEjljQKIoDbMd7f7+t0IpjaBRoieqU8+IYGr3tMMP+C3rzvJbKs8X/KmY6p41/752Hc4XWugSONy2JmpfD8lwT/ESJpuqCX7zuqUAEO3++R0U6TEAzKFuXliZfCw9c7V7h6m9efheC7QnpUd36BXP74T54lnN2vbTcSAKwoK6iQB14cl0lQvQ7OYQ82uNVdtSetSZ/7yu4o5mNRc9+zs3IvmusiHfa0IjEP+0fZ8tJAk1XDpsWggR7z0uf4ysF74t5+g6jWaUNdT/5CFaHe0tv68jzn5Ei2AvWh00rslC/iIn/EnJNbOREfI1i5M0Sot8Irup/YojRXHiShbzX+L77TniCsv+1ip8+YIOBu6Q9XcHKb2Ee+0ksbdMm3d9i9CfrPx909qwiTHHdlVBHcY6IFQL0ZNxhFCg2iRTWWPAxCRfhAH/eQZWD6gyamKM5lM4GsbpG6PodNaIxt/C/u1RaxeefyFlGselu0LcmJQDpB2yvWqzIeIrQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1629.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(346002)(376002)(39860400002)(366004)(396003)(66556008)(66476007)(6486002)(38100700002)(8676002)(5660300002)(66946007)(966005)(82960400001)(8936002)(478600001)(4326008)(6506007)(26005)(6512007)(186003)(107886003)(54906003)(6666004)(41300700001)(44832011)(6916009)(2906002)(316002)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?OUVkVpHf7dDvFHnGvd93bHaCMo1HZ6W6qIRXLDoBNCtW+sgaYtM6AEokC0?= =?iso-8859-1?Q?86L+my3IcHMbbjSQsjahNg0+p5mwpeWeDPE0seh7RrFXDWKfSevl+BO3LX?= =?iso-8859-1?Q?cD3GQL1EgclY7JtGpbLK5r3SnWc7gp9khXymBmIbc8dOM3fNEA+GEZLmED?= =?iso-8859-1?Q?uqPL3UMg5WElhBQeEwKbuOxZLReTHgRwOT+vbb0i6FBuNaN0undLC06qDo?= =?iso-8859-1?Q?0SEIcbzR8uBcfDYblKf6Ls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1fMjkgkAVF0Q9NW41k4NFOAUo4DZxJHte6eXTvge2DDSBPvsjf?= =?iso-8859-1?Q?MgBE6CtUsmWnnRLVnSxPYKp1yDfdQoBbzK2T+m+QmYQVjSqDuGU63MfVX4?= =?iso-8859-1?Q?BkcaODmFRp4rEA2DmSi25efccQfge2/La7xhnz9/ERSyOLS+TqSQDYAjcb?= =?iso-8859-1?Q?Th09vj9mLGVargQOHKTkoL+EKYkaceL3tMg7EUj07cEUwX2mHzyTcMpHsv?= =?iso-8859-1?Q?txytRt5WGG+v5pMbkpJ6tsMvym00sIWzpWuZX9JMqLGgrCqV10gqiHGCJI?= =?iso-8859-1?Q?g+pt9ugteIh/jA/AW2++7iMi8pe2rrJQitXFBZmnaND/EatjAlcQd4lHgb?= =?iso-8859-1?Q?0DCPopZtFc2g5JKu1gVS9vi4zSFxsBO/g6Ep77iA71DCdNueRsKIPJSzVg?= =?iso-8859-1?Q?3jq5xe9Y1F9nHZOpSAV3/pokMuOxxa3EZN7ubv/Szx6AlAKELBr2oGIMdm?= =?iso-8859-1?Q?eS1SZ05OBVjcXUY4VyV8Krk22sg5gxm/F9hj3El1pwjR9jrgiFr5rYIA?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: b8f9f954-6ed4-4fa7-e56d-08da6fa91645 X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1629.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2022 08:22:04.3463 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fxX9yT7XVBUU88+/IMJ1VzYI1F64XVLUztLlq675PKzjMn2ZprwCZ5SweUlJCt2xWBsD8NEQD4N701lbrrb8/OL1xBeDVIjAvsOGPdpzsjI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4556 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Jul 26, 2022 at 08:25:05PM +0200, Morten Brørup wrote: > > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > > Sent: Monday, 25 July 2022 18.36 > > To: dev@dpdk.org > > Cc: Bruce Richardson; Ciara Power; Keith Wiles > > Subject: [PATCH v2 02/13] telemetry: fix escaping of invalid json > > characters > > > > For string values returned from telemetry, escape any values that > > cannot > > normally appear in a json string. According to the json spec[1], the > > characters than need to be handled are control chars (char value < > > 0x20) > > and '"' and '\' characters. > > > > To handle this, we replace the snprintf call with a separate string > > copying and encapsulation routine which checks each character as it > > copies it to the final array. > > > > [1] https://www.rfc-editor.org/rfc/rfc8259.txt > > > > Fixes: 6dd571fd07c3 ("telemetry: introduce new functionality") > > Bugzilla ID: 1037 > > > > Signed-off-by: Bruce Richardson > > --- > > Patchwork didn't pick up my reply to the 00/13 of the series, so I'll try again here... > > Series-Acked-by: Morten Brørup > Unfortunately, patchwork doesn't work with series acks, only individual ones. However, the maintainers recognise when they are present, and if I do a V3, I'll split your ack across the set so patchwork does recognise it. /Bruce