Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5673820rwb; Tue, 22 Nov 2022 03:28:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf7sUwPUogsqSJKg5sxsOdjF+9AtgD3SRQS7qna3dnwAb9WjirPQke0mpUKhmeJnmIUpO1ix X-Received: by 2002:a17:902:748b:b0:186:8111:adff with SMTP id h11-20020a170902748b00b001868111adffmr16482758pll.81.1669116487425; Tue, 22 Nov 2022 03:28:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669116487; cv=none; d=google.com; s=arc-20160816; b=R8qv04FAbHVdX12ZpjjdzVdXvClDFi6+4xoX/owYC2wDvLThLtKjoONxaXStZR1CQN FiKq5agjNDmN1mlt9ZG8XZrOiEgpYF7A2sYf1vcgp25ApexQY8TyPxIXhHbbj7JxU2+c 55oChQBZBxhKfvifWqqpZw1+0hcg7/ztexVWC6HU7MQqsH7vca5IvUP8Qtf68xKVLNHY bFNakv+AlRapWmnPFWCUVsv5Gor7lO8qUtut53JO/pst897LVURaWulKueuzMsBhX+KV JT4GisPsjfC9bYtokTl7dtBplU5t6ZzkhwAbE0N1aX/KlCHrZIfLC3Ew2YfVvOGca5qi LkgQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=n8rOvLnkpr7DU4/g+Ojdkm89PZHuDF2laztQuxOpyCI=; b=i1pICwvKfgWGKK5Fd1/neYnO2Xp7y+EdRrw9kMHREhicETlut+HVivRy5G4Cj28VM8 J39/iz80o28Kv1bBzYt0ETMQs/MnEt3krEWXyc2CyNjtcHtYbXYgzInMx+WwEMqlzaC0 K37uMPWPFnd3BaPu3LRAkz//X5qX7mD9fL18LMkIO02q8gFWPAsxeRhIGtCEw6/daXXK bcBkJNkZmYrwjualhJj1biOLzf8Ox+GdJNA9OvfnLZ6hgSTbYy8sjpxAsuTTDbu47jfc 9Fstr9r2ZRhoqrOchdWt9Y4cc4sU6YYeIthsYC1KkyYMqQ8vg0u3VqUwBRWLjg1Ikx9x 6X7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crudebyte.com header.s=kylie header.b=lpWTvJ3v; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=crudebyte.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s144-20020a632c96000000b004776271965dsi7134983pgs.41.2022.11.22.03.27.55; Tue, 22 Nov 2022 03:28:07 -0800 (PST) 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=@crudebyte.com header.s=kylie header.b=lpWTvJ3v; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=crudebyte.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232881AbiKVKs0 (ORCPT + 90 others); Tue, 22 Nov 2022 05:48:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232874AbiKVKsB (ORCPT ); Tue, 22 Nov 2022 05:48:01 -0500 Received: from kylie.crudebyte.com (kylie.crudebyte.com [5.189.157.229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDDE52600 for ; Tue, 22 Nov 2022 02:46:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=kylie; h=Content-Type:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Content-ID:Content-Description; bh=n8rOvLnkpr7DU4/g+Ojdkm89PZHuDF2laztQuxOpyCI=; b=lpWTvJ3v5Va4Mt6qKKjEdQ08qC pCLdCeTc/pJMUuHkSbDybeq8lVRBQGuRvxVvJuyLnGVECKmdbUKLiadFAiRUGZInxM4d3vWlEQcgj c8UzV9kJN9mMMaDwkRgS7oF0AAjM/PFFK4UGcoB67QIiCREXE17WeMJC+mbx9edCmQRee4xaxP/3B 3QJ/TryXBGJm610Ilr4ndx1TRLZevHVRhN1hI097ZU/JWGhcPpgvlA+tGwioI/wI9XpYTsiKMfg3Q sTsfGPXYNcfiHZDrHBpMPRm5QXQwj7ZLYvhzLlc8QFTO05IdEB7vo4CQ+vN53OL3qvZmR71+84Uvq LuWN9kDK6D5ognMMybyCN7EvDdD15uo6KpEkS7pFysYXyh6/Cfp+OtX51/V6RuAHjZhT6taEwRwZg g9QobxjQR1Wb8+Lvl9aEUuRyYvGw25jzEnJa4APJfXrnVVto/HdvjDA0TE5Yi19LOLjkTtHmr58N0 dKtgYNC26090VksegOCTK3oJ5U9562vFuuyA3/B95+8GVMriny2Yz4BtV+oea2X/WFty7ZLXZhmFF tjZMhWE7+58TshFnaBTdQJafN8imr7ylAHLJTRSeKtBj9uhN8pshSNv7ferWpt3TzdlOuup5O03K7 Al4U3tDCppEDyXhaWEgemHEFAkmgEKTU1QktQbyfY=; From: Christian Schoenebeck To: Dominique Martinet Cc: Stefano Stabellini , GUO Zihua , v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] 9p/xen: check logical size for buffer size Date: Tue, 22 Nov 2022 11:46:13 +0100 Message-ID: <2955638.xlpIv7zoH0@silver> In-Reply-To: References: <20221118135542.63400-1-asmadeus@codewreck.org> <37091478.n1eaNAWdo1@silver> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 On Tuesday, November 22, 2022 1:39:39 AM CET Dominique Martinet wrote: > Christian Schoenebeck wrote on Mon, Nov 21, 2022 at 05:35:56PM +0100: > > Looks good (except of s/rreq/req/ mentioned by Stefano already). > > Thanks for the review (I've taken this as a 'reviewed-by' under the > assumption of that fix, sorry for being a bit aggressive at collecting > these -- I'd rather overcredit work being done than the other way around) Yes, you can add my RB of course! > I'll send this and the three other commits in my 9p-next branch to Linus > tomorrow around this time: > https://github.com/martinetd/linux/commits/9p-next > > > > > memcpy(&req->rc, &h, sizeof(h)); > > > > Is that really OK? > > > > 1. `h` is of type xen_9pfs_header and declared as packed, whereas `rc` is of > > type p9_fcall not declared as packed. > > > > 2. Probably a bit dangerous to assume the layout of xen_9pfs_header being in > > sync with the starting layout of p9_fcall without any compile-time > > assertion? > > I've done this in a follow up that will be sent to Linus later as per > Stefano's suggestion. Great, one patch less to send, thanks! :)