Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp774802rwb; Wed, 16 Nov 2022 07:31:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf4FuS629H2CHOXyiMWNmaWP4SLZHaPRYKXDKcgUmL+e2mz/MBu3WPAI4AqnFWd2V1vA+bE5 X-Received: by 2002:a05:6a00:a13:b0:56c:14a5:2245 with SMTP id p19-20020a056a000a1300b0056c14a52245mr23835624pfh.12.1668612675813; Wed, 16 Nov 2022 07:31:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668612675; cv=none; d=google.com; s=arc-20160816; b=ucn8x+VhLlB49JCln4WJ9Szf6eja7wXWS+LZfXVI1FGJMi2a7SR9INOfQHDB79dWhx KjUNukBbltp3jTPXPzC/PQvjSaIPAEMIvk3/+d06nvjYIqKCB76mVHyXNaL1zOj16Enn Vd6LhUS9gISV1laTurKq1y7u1jmzEP29bdrGRL1QTOrU0rpR9D4jTRKqZGMqPndMvjXd QsCDtfulONgvsA50NpFWiJ40mvs3ECUP1GPyIaq+XAvEqRcZWtonfZr6acbdgkOOay13 Sl+/OhI+hGFQdRTgLkmXsKE8OUbnDz+5b4ZY0Ba1tJDVtiQhyRJUK2Nu39jTlqL0szSZ e7zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ks7r9DQql2EMZw+y8WssqX3ZUcXGKQ1yzpUDTk2u/1E=; b=ofgOl1pw//5cJBw+QKuah+znTg+yDIolJkL1Ou/aLGbyWQwO+iN6hZvzjEdSfVANp/ 7SleYzqP7imktmJe9A+3/7KYO8NnihQ5FpwjAECAvctRuiJDA/snWehfc9SbFmdy2EzG M7wehCjws1IW5vG+k5m3g04BdaWCMJYXeuGVhntzxsUOyi8rLHLRmqIAuas3nEcW2SWu Yn6IRMkm8wfGvyCfVbn6dpYo0+GmMgQO+s9ASww71BFryGjXtfCfOgJudzQJlIO6Wm7G +pz1ZviUBVzAOL62K1Bxk1nTbYP3s0/k5y/vjhLJOYXQkoR6hIP1qU/uUnzfhoBk6Hsv QAlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QdaintBu; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id my11-20020a17090b4c8b00b002182059ec60si2468063pjb.80.2022.11.16.07.31.03; Wed, 16 Nov 2022 07:31:15 -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=@linuxfoundation.org header.s=korg header.b=QdaintBu; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234075AbiKPPUs (ORCPT + 91 others); Wed, 16 Nov 2022 10:20:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234879AbiKPPUV (ORCPT ); Wed, 16 Nov 2022 10:20:21 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EC8654B01 for ; Wed, 16 Nov 2022 07:20:11 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 86F5661E68 for ; Wed, 16 Nov 2022 15:20:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BEC5C433D6; Wed, 16 Nov 2022 15:20:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1668612011; bh=U/jbZLeft56Z3hxy0pMULS5BHNRXuyE6m2kBdtKxdkY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QdaintBuvVizx1uOplIwVzmDJuf579uy+UfYaeE0pnc2/7XsbvHvkDm0VQwKIwNSs 82xqrapnlbKZClbol/H+0WvVJxPg987/L0hYW/gGBO7llsH+9E+XDhnsmEWy62QxQ/ CNH1ggR1UweUpRt7xnlh8fcysk6K6xqrc+GwJSn0= Date: Wed, 16 Nov 2022 16:20:08 +0100 From: Greg Kroah-Hartman To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org, Fei Li , "Rafael J. Wysocki" Subject: Re: [PATCH v4 1/1] virt: acrn: Mark the uuid field as unused Message-ID: References: <20221116092254.66234-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Wed, Nov 16, 2022 at 03:29:31PM +0200, Andy Shevchenko wrote: > On Wed, Nov 16, 2022 at 12:42:16PM +0100, Greg Kroah-Hartman wrote: > > On Wed, Nov 16, 2022 at 11:22:54AM +0200, Andy Shevchenko wrote: > > > After the commits for userspace (see Link tags below) the uuid field is > > > not being used in the ACRN code. Update kernel to reflect these changes. > > > I.e. we do the following: > > > - adding a comment explaining that it's not used anymore > > > - replacing the specific type by a raw buffer > > > - updating the example code accordingly > > > > > > The advertised field confused users and actually never been used. So > > > the wrong part here is that kernel puts something which userspace never > > > used and hence this may confuse a reader of this code. > > > > - * @uuid: UUID of the VM. Pass to hypervisor directly. > > > + * @uuid: Reserved (used to be UUID of the VM) > > > > If it's reserved, then don't you need to check for 0? > > Reserved in a way that it may content something we just don't care about. "reserved" in the kernel ioctls mean "must be 0 and we will test for it, otherwise this is an empty/useless field that can never be touched again in the future. Please spell it out in detail as to if you can ever use this later on, and what the kernel will do (if anything) if it is set. And if "the kernel ignores it" then that means these bytes are now "empty space never to be used again", right? > ... > > > > + __u8 uuid[16]; > > > > You just changed the type here, so what is that going to break in > > userspace that depended on this being of a structure type and now it's > > an array? > > It's the same. The previous was hidden behind additional type level. Same size, yes. Same C structure definition, no. > > And no other kernel changes needed? Shouldn't you warn if this field is > > set? > > No, as pointed out in the commit message kernel never ever used this. That does not mean that userspace tools never did, right? You are changing the structure definition, what tool just broke? thanks, greg k-h