Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp427381lqt; Mon, 18 Mar 2024 11:47:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUs0wgAt/nVZpH+sEPIMunsBVhjvGvHJlgvEbV6F/Hmk106UasUuEXiPB5WQ1KMLxjWPjVYZf4MDyYIgJkSsYzOHbAikpLeDdqMcyM6Tw== X-Google-Smtp-Source: AGHT+IEnGYl5C0W/ipocYOgHZNBEx55l1mL6G3PPcsZU/l/1ZSENZ+zjehW0nIDqwbF6ERDep241 X-Received: by 2002:a05:6a20:430b:b0:1a3:63fa:d0e6 with SMTP id h11-20020a056a20430b00b001a363fad0e6mr3800463pzk.57.1710787673078; Mon, 18 Mar 2024 11:47:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710787673; cv=pass; d=google.com; s=arc-20160816; b=lzMf6chLAbYRSCeUp/UW+YBTHip2bkJJDuiOcdB5JHQqVx0K5Le8JWkyQnkDxlNrR5 jZFr+1+anPv8FFR8pd1bSgZck9EklGvD3Blb0hfdHK1x0FN8UPC1FEOeFf74FujlMI+U YbfoRkKEl5vNAJfafLYzHw7bJLRFQFnf5c/9FNzIClWQNogykomQ5uJwkK8EYWc+aF8S u7YawpYDVWVWG94BID8UbtsrY0v9/GInV0oj2thWn3t5KYZdtIFBPY+8g+v+dfOaYfwv IUfEm12MTNvHp0SkPsOp1PxSjlhMkhbI/OtB7prawKhossBlTHUH0oc/NNYo2N/htlJv l+qQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature:dkim-filter; bh=2qDWxZlMr9OLeQtZl1hDoIzYJ0fyvUJXJtEfjRIAd6E=; fh=nBHIgDhaHYHIkgwoQ1TzM56nY+Uev2+4axy4JG0ietg=; b=AeRwC7rWxh7cqH691QnGZyI8se8DiT4WCxylyRUomMwUdf78zbp9Fd0T/I7OjfFWc2 QcqrxGvxJYx0PuBDy5qbZ/43B+EiVqBDPZTYjddssStJ7g+Ya7L+MqwBOFtjQU5Nq5lB XCn4ndwHVIwWSqtY549YAgg0p9TijoscofeTQsDMPomkPy1leMVIhtmT4gKuOoHNoN86 Q84QCi/aZAwAcyIQtZAps1PpNKn1K6StPL/gxDzhoMyoTryQgBF3m10/kJuhDs0k4KVh sf6YkvD45wNQjWzGfM11loEGqpGOdxwBilk/eec7FJmuL4haiTH0K0P7bK3h2bRBKFkb F+Yg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=aaJ63qZ9; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-106528-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106528-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e1-20020a656781000000b005d3adb65694si8457139pgr.757.2024.03.18.11.47.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 11:47:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106528-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=aaJ63qZ9; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-106528-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106528-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B41D2B218A1 for ; Mon, 18 Mar 2024 18:45:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 764E24779F; Mon, 18 Mar 2024 18:45:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="aaJ63qZ9" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 504152837D; Mon, 18 Mar 2024 18:45:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710787544; cv=none; b=RR4Ll32VQjFWF+rWVtx6cU3jm1vTqjVDW2o5DIMFCC8EQ2SJ32pcI1Y6sLOBODh6YWQS/P0UD+6TIPqgDMgwvh980v/MBIZfaGMNa7Dy1MHfSw6LSqCstzhOiTZMOMgrSwG8oRg7TVU9qKjQmFYQ0+oOEgaY9NdPVKIfDk7V0wA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710787544; c=relaxed/simple; bh=OYAKlIUSYWWb3PfM506o9FNEVaO34KNtnV3BREnAS3I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=e1nz0/sJ2GEQmJ6I286ZsT/9+tsjKpAwv343DKl8taaoHse48YN2ttfsuSTPkUTNcA1S/PJvV/hZ4M8yL2aO5x7PiQqJKDBbAiRHjxcrLhpWksH1m+jXsPnTOaYcoEEhcQPI7ErvXswfzJraC+0UimoH5x2uuqTJIaNvjmgCzeM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=aaJ63qZ9; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: by linux.microsoft.com (Postfix, from userid 1134) id DCC6820B74C0; Mon, 18 Mar 2024 11:45:42 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DCC6820B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710787542; bh=2qDWxZlMr9OLeQtZl1hDoIzYJ0fyvUJXJtEfjRIAd6E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aaJ63qZ9Qj0NDj6IkQRlaHtnDzcyulfmG6D8gQ82Dh1gKac9QtONxdbGBGUTR46Iv X7lYxlXNDc1HUX+BiVgGR1c4vW/dbR/wibdHx/OoODZyIybQEZEldu/jMEKmzkBs8R FGo377nsmwC+LoCksIsh2na3/bnxGGIT6BzulZ8Q= Date: Mon, 18 Mar 2024 11:45:42 -0700 From: Shradha Gupta To: Easwar Hariharan Cc: Ani Sinha , linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Olaf Hering , Shradha Gupta Subject: Re: [PATCH v3] hv/hv_kvp_daemon: Handle IPv4 and Ipv6 combination for keyfile format Message-ID: <20240318184542.GA9011@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1710729951-2695-1-git-send-email-shradhagupta@linux.microsoft.com> <9d24633d-b2bf-4cbe-86f7-6df56ba14657@linux.microsoft.com> <066c4b0c-c8a5-4abd-9456-20b0352ee1ab@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <066c4b0c-c8a5-4abd-9456-20b0352ee1ab@linux.microsoft.com> User-Agent: Mutt/1.5.21 (2010-09-15) On Mon, Mar 18, 2024 at 10:16:59AM -0700, Easwar Hariharan wrote: > On 3/18/2024 10:12 AM, Ani Sinha wrote: > > > > > > > >>> + } > >>> + > >>> + if (strlen(output_str)) { > >>> + output_str[strlen(output_str) - 1] = '\0'; > >> > >> You don't need this since you're using strncat which adds its own '\0'. > > > > If I understand this correctly, this code simply eliminates the extra ???,??? character in the end. Therefore it is needed. > > Since it is not obvious, in the previous review and before, I asked the author to add a comment to explain this clearly. > > > >> I wasn't quite able to follow along > >> on the discussion between Ani and you, so putting this in here in case it wasn't already mentioned. > >> > > Ah, great, that makes sense. I did see that it was destroying data but didn't spend enough time to think through > what data it was destroying, and if that was a feature or a bug. Thanks for calling it out! > > - Easwar > > Thanks Ani, Easwar for all the comments. Apologies for not addressing some of the comments from the previous version's review. For some reason my editor did not highlight it as expected. I will get them all with a new version. Thanks.