Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp857700rdf; Fri, 3 Nov 2023 18:51:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH5SgceBojCUwRjzASbECJPpAKOMqA14eMYv9j6ep41kZ+kWmXqZh88vge1jKud1P2+xXLt X-Received: by 2002:a05:6a00:93a5:b0:6c3:703a:c394 with SMTP id ka37-20020a056a0093a500b006c3703ac394mr3622461pfb.27.1699062684053; Fri, 03 Nov 2023 18:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699062684; cv=none; d=google.com; s=arc-20160816; b=lPiTcXDbKByNaqknJJUdlRqu90H6X2lQqgpsNLNXNd+ieUB5zifah3U0jJnMQQrM1Y oLcGtsjKfycDterFnoDCU0ruyF556pymDNSoAsglA3E2mHcCH/jAg8jzehQ+HQ0Zis/a MvN7WxoENyC0Gz7Fp9FfJIxaFFBmkdHHmYDztO/vEP3Y34RqXj0rrBh0hGWGNp5Yu46E 7jWZ8JbHG0hJWHThl2XBQGdiYv1xA451xEM134ZSAOCKufXeuuZYqVy6EQSn/2Gbe47h s9JjY71GbAN/c9hjAvAR0nrXJMru5VexDxOgYKSr+iHLEU2XKWVwmdy2V+5fM78bg+hO GGFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=4V0CZIhZnqFOrTe30OO9qIEuDvO6VokAQVy132tMynk=; fh=hm8KtcG5XFjVZPkNvVhFffx0LGsjfjp8SyUB/UtwLxA=; b=vJ7+jcwaLpF05arx53pjWlZEcfc/lz5auymZ0Z4Aj0KFXVzUZZjNVDy/KEbDriPy3d 4O3t5f/xLjC8a192uvYnGv1NddnoF/15C5UC5jf3BxjpDsqdY/aWm3qqm0FBY9/PwyMN 6914iJPKq2GlfLXa9Z/QlqXadARKEhv4PJOh3Y/gStA+OY2uva1ClWzpKiTi5Hs509qO Iqg6Ul3hC7sDi1u5sLAHelJFe6BQMgPJYPdUvdfdAW17Jno094oRkM/4hZBNPnAGcutT KWiUJKBl4yPNj0VMOQdt+kabEtE++vX4wiXgkgHbnZwEUui6ee24yQQSlb56RAJFdxoa 99dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="CO/KYJrx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id c13-20020a056a00248d00b00690f8063627si2747281pfv.38.2023.11.03.18.51.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 18:51:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="CO/KYJrx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E601882E480B; Fri, 3 Nov 2023 18:51:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231209AbjKDBte (ORCPT + 99 others); Fri, 3 Nov 2023 21:49:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229557AbjKDBte (ORCPT ); Fri, 3 Nov 2023 21:49:34 -0400 Received: from mail-ua1-x92a.google.com (mail-ua1-x92a.google.com [IPv6:2607:f8b0:4864:20::92a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8264CD4C for ; Fri, 3 Nov 2023 18:49:30 -0700 (PDT) Received: by mail-ua1-x92a.google.com with SMTP id a1e0cc1a2514c-7bac330d396so927168241.1 for ; Fri, 03 Nov 2023 18:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699062569; x=1699667369; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4V0CZIhZnqFOrTe30OO9qIEuDvO6VokAQVy132tMynk=; b=CO/KYJrxljeLm9aXMukbP/TQeknvIisJ4LoPeIp+y1mD9zebd/iSH9bhyGTPaBCAuq iiiQORWgX4zRGmEYnAS0MJKGAYZCzNKi1JqtX6jDaqa5GbFKIa3DahBTy136xqLCIQUb lqJ7xyUA7qn5UYXbMtorkeykn3UHQu85vuvVvz/8xaXXzyJg8uNbl5yPHNneg/xTxHfd G3x3mYO4xbDMC2mCOH6OAaRrKxU1FAooOHo4L40+TkgcPj9+83+hpmSdG1epn1l48Pex 40JGwL1Xos6ZZWVOqZT4NEuRtfmRb7zwPZ0OS6XY7UP2FKX8Oo9hZvX0apjmKi0ZPSYi 8dFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699062569; x=1699667369; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4V0CZIhZnqFOrTe30OO9qIEuDvO6VokAQVy132tMynk=; b=rVFBtNywfkggROGTOizT9wB9mM0SwZ+WL6I51+R4zxshuctgJwiO1hmTh/lRm1u0xg ZOvgVySOwKfwZY1qcLhc72vPKN1EmIiEpHIdX51GvNCWp4lCF3jzoL7tDdAE3ZwjwIue rcqT3ln21AfqRmW19jpyhhsg1yKC+XsZxMstHCm3vAPWlQLpbvoYHSz7A7I0SLlaLkqy dhaA1DpGcUpkwa0eX6SCuwm1VRzJ+oJEEunkyC+sEWh3acRUP7zcaeCunYMh/1UnVH2X +S7o2VRho3b5BAvvPTs4moAoLp3E8rYfBteW0FrwTDL6R2cMJlCyaybq2Gpl1+GVyCYg 1dSg== X-Gm-Message-State: AOJu0YwjNZqs+8fZKCAitcIO55Ec4wt/KnbQDPcesJ4HsdD5EpdztrbS 1bgGigvXpTA+HAP3Gkvnb7HD3SVFwW7TH+wcamA= X-Received: by 2002:a67:c103:0:b0:45d:9223:9532 with SMTP id d3-20020a67c103000000b0045d92239532mr3873392vsj.19.1699062569495; Fri, 03 Nov 2023 18:49:29 -0700 (PDT) MIME-Version: 1.0 References: <20231103131011.1316396-1-lb@semihalf.com> <20231103131011.1316396-8-lb@semihalf.com> In-Reply-To: <20231103131011.1316396-8-lb@semihalf.com> From: jim.cromie@gmail.com Date: Fri, 3 Nov 2023 19:49:02 -0600 Message-ID: Subject: Re: [PATCH v1 07/12] dyndbg: repack struct _ddebug To: =?UTF-8?Q?=C5=81ukasz_Bartosik?= Cc: Jason Baron , Andrew Morton , Kees Cook , Douglas Anderson , Guenter Roeck , Yaniv Tzoreff , Benson Leung , Steven Rostedt , Vincent Whitchurch , Pekka Paalanen , Sean Paul , Daniel Vetter , linux-kernel@vger.kernel.org, upstream@semihalf.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 03 Nov 2023 18:51:20 -0700 (PDT) On Fri, Nov 3, 2023 at 7:10=E2=80=AFAM =C5=81ukasz Bartosik wrote: > > From: Jim Cromie > > Move the JUMP_LABEL to the top of the struct, since theyre both > align(8) and this closes a pahole (unfortunately trading for padding, > but still). > > Signed-off-by: Jim Cromie let me add, I havent really tested this, nevermind thorough. specifically, I didnt look for any offset dependence on the static-key inside their container. Conversely, maybe theres a free default or something in there. > --- > include/linux/dynamic_debug.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.= h > index 497130816e9c..b9237e4ecd1b 100644 > --- a/include/linux/dynamic_debug.h > +++ b/include/linux/dynamic_debug.h > @@ -14,6 +14,12 @@ > * the special section is treated as an array of these. > */ > struct _ddebug { > +#ifdef CONFIG_JUMP_LABEL > + union { > + struct static_key_true dd_key_true; > + struct static_key_false dd_key_false; > + } key; > +#endif > /* > * These fields are used to drive the user interface > * for selecting and displaying debug callsites. > @@ -53,12 +59,6 @@ struct _ddebug { > #define _DPRINTK_FLAGS_DEFAULT 0 > #endif > unsigned int flags:8; > -#ifdef CONFIG_JUMP_LABEL > - union { > - struct static_key_true dd_key_true; > - struct static_key_false dd_key_false; > - } key; > -#endif > } __attribute__((aligned(8))); > > enum class_map_type { > -- > 2.42.0.869.gea05f2083d-goog >