Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2744551imw; Wed, 6 Jul 2022 11:00:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uBsDNaEmQwVPoUre8Ncodrra1Yk3dL6aJRqJ6JRmJ8gVknSWhJWj9ElcpgOHlJv0gUhzzK X-Received: by 2002:a17:906:38ce:b0:715:8483:e02e with SMTP id r14-20020a17090638ce00b007158483e02emr41851629ejd.442.1657130421351; Wed, 06 Jul 2022 11:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657130421; cv=none; d=google.com; s=arc-20160816; b=h3mk6O5oZVzIuzRBKD5dS4ZEwXBrsFCQIO/BoqCpj5ZC/oOi+VDlkSijMVD9mGlMPK c3/6zxu8rMaG4voLKfbqZLHfaenQISw3EY4wL8srXkgaolhBhC0gfffpi5aKyC52Z2ik i9rQ+m6TbRuEJBOB/Rn9Mgq04C9HfGwAXTky0HrXxiNNqUdN4BZFYBiZqlpzFRn+Dj9I +W/wKEWm44pp8vDf8WxP3usmbTKIM0CoH6kklgvY/ufMP5znyvTWQuyvRS+SBYULo8uv LX1jwdG9ZWXDPEQHoNv1TzhPT5kYzmFE08rMblw9TSH8E5dHtghT9SBaX4nrOX+LTQ+t PjZQ== 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=wIX3xKGkHpy5joBvYNCPfPDTfzV+c1/g7GJKc6QUDtk=; b=MStW7wt6R38Jd5GYfWeQn21L21pzt4Go1a3pMbJySECQ+IJVcUA3vVpNYvZr/xSfQK rV0NinEioQfW7l3sFIyrWw4uJyLrNR5V2W7k3IpKoERU5zJurKHw9luy0DmDZpBCXqYr u1RMeq/QDYP02EIqa2rL/6I0Pvcr9yhrIq0y1mvt/CIj7qQ3OFChE8JRluk9ysDez3nk BiKrrUkVjrK0b2BJDeBx4hECvQxhbmP+pNb1fL3rtrqvaZbfkGD+vUN6k3W2RuUH6I2u 4Iq8v1d9cjWMT+cyLSf0IclU1MKXdWPLBA6zSnkNK/WJUSgA+gVeMuCWDSM+egw90ysk zetA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=gEt5kyoN; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji6-20020a170907980600b0070d00528830si8024587ejc.221.2022.07.06.10.59.56; Wed, 06 Jul 2022 11:00:21 -0700 (PDT) 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=@infradead.org header.s=casper.20170209 header.b=gEt5kyoN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234009AbiGFRxy (ORCPT + 99 others); Wed, 6 Jul 2022 13:53:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230472AbiGFRxw (ORCPT ); Wed, 6 Jul 2022 13:53:52 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 288311DA7F; Wed, 6 Jul 2022 10:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wIX3xKGkHpy5joBvYNCPfPDTfzV+c1/g7GJKc6QUDtk=; b=gEt5kyoNliPVilPC0D90PK4vJo S4k1NidEXXLSSp+GXXKr1ocUWr9QZvoWNrpI7kT5EFzYHa/qAZebjZFi4uUcTD4BRAWplc2YGuOkn vjh98+S83dHEmiOj1NFLkmxLED09BvIvTSlCGfS0/IZtO+wyUR2l7JA0nFXiJipnqO/nxRdb1i4vF P+wIBQ5eff14eaCW1NbyfLafWY9brSPtl/nBcQo7OvBAz21c4EEcfeGPEJZO7WZAnRy7IzymWKXeZ A/pVz/oOZHj2kHJ1BXfH4m55/NGtAdQPmZdEK3J5pZo8WJXd4EM4kot2yUigHGexwpm/HS00HqM3q AeSI/uMQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o99DF-001qad-79; Wed, 06 Jul 2022 17:53:21 +0000 Date: Wed, 6 Jul 2022 18:53:21 +0100 From: Matthew Wilcox To: Tao Zhou Cc: Daniel Bristot de Oliveira , Steven Rostedt , Wim Van Sebroeck , Guenter Roeck , Jonathan Corbet , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Will Deacon , Catalin Marinas , Marco Elver , Dmitry Vyukov , "Paul E. McKenney" , Shuah Khan , Gabriele Paoloni , Juri Lelli , Clark Williams , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org Subject: Re: [PATCH V4 01/20] rv: Add Runtime Verification (RV) interface Message-ID: References: <60548902dbccaa7ba420e40e46835693e27f643f.1655368610.git.bristot@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Thu, Jul 07, 2022 at 01:49:02AM +0800, Tao Zhou wrote: > > +struct rv_monitor { > > + const char *name; > > + const char *description; > > + bool enabled; > > Can the 'bool enabled;' be put at the end like the definition of > structure rv_monitor_def. If '8+8+sizeof(bool)+8+8+8' not the same > as '8+8+8+8+8+sizeof(bool)', I mean is it possible that after the > end of stucture there is a int or char not require to align to 8 as > an example from my nonsense. That will make no difference at all. C doesn't allow other variables to "fill in the hole" at the end of the structure like that. For example, one could legitimately do 'memset(&rvm, sizeof(rvm))', and that would wipe out those other variables as well.