From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A0DD3EFD0E for ; Wed, 10 Jun 2026 11:07:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781089627; cv=none; b=axkzxJhRR9wyZfeE48V9sr9i7pFeiae2c4HeNSLAaqaymn2lQgJuteFX0Zk/LHJvWQxxUyo6ykEo5IXQ2szdzi/veYKdOq4l9kv2zFkZ2ew1JeELK8raVF/ptXNooRAkpHjGZnHJY3H7rhaC41iKNR/XO77x05RJMP+Adj9JyYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781089627; c=relaxed/simple; bh=JehR0oU+hw1WQAoEsOX3iWYFXq1/Qs0MJtpZSJOhIMY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ceoWCjHpfQGDXRMpGZcx/0xcs4M/wDyYQqlo3YCt26kLb2pIr5iyRKrmIcnbmslmKr/DYkV9BfPiH4JTBhQbt1x67upoZ8H3Ux4dGa294dG1yq/ElnVHgR4h6JtoiwZMfA+NofqMxK19LhlVVHDIVLCxyAA6mEf9eft2hqsWxoU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=C/Yn1xRZ; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C/Yn1xRZ" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-490b7866869so72968035e9.2 for ; Wed, 10 Jun 2026 04:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781089621; x=1781694421; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=CD+jAvn+F6KZcBr47jRj5pM/yHOUpsx3lmiZzRlGXro=; b=C/Yn1xRZnhF25737NjWSEkIg18ZI70MHxYR8DjpMBhXmxB4sBymcnF+vySC9fRJRnG BQ2RrTelpb/CtLwd1mpTKSFY68VeMqPc+39Bb6p6TR0zpkVtorrKWyjbqxYY+xe8hy8p RaDJW5GPHIkyTuwkKiat0ckNeFj4K/wcwXUD0DeqOdTN2/UpqkAID2eRkG/hrYLb4rEA oup46s6ZklMS8u6fwFqfch6CUrWUigCm2IC7kVul3HaOezp/kx4K23UFOOD8KwqySuaF Bj8TLRr+TiyikJAfZ454m7ytMt2Z+yTjP57CVlzzHUnMRQGoMwyn3zPxyCLsvaGDMwop sn7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781089621; x=1781694421; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=CD+jAvn+F6KZcBr47jRj5pM/yHOUpsx3lmiZzRlGXro=; b=rnHOIGcLuvhiuKmVv+qYwpxK680VNIWHL6x1LQGaluI3yiwLFFgM818KUoevWabUpF UnnlAkonWhmUsmKcq2G/fUqpuSZ72EayykZpkHO6+/ZzcDBSZyBnQsYnLAI3HD8+QXsR tzq4UUFgHvV0tXaTbITdeb/S9pISa+rItCLElB+Ih+KY1Qi1cToxztKlKse53k1iReKo Svw4Ex2aKoxJ4G9M35TlKwdcazcwEfLcT3JmK42P1Mo/rkvJxFrpaA5jAUpKOBiZ5BI8 v5+bq+eB0jhvoXTH01ucKkiGKjSBfNgjWJ/qt9BV8ckahzavihMYCFG37WRjD4W54jCN 8WJg== X-Forwarded-Encrypted: i=1; AFNElJ9AQ0ivIzoLvGxy0UTOKCV1uX1EyDYFa4G5ZoV7sdtHMCyHFNiiwfdoaC3i8jLe7mUExCUHwC3Hkv4g6iE=@vger.kernel.org X-Gm-Message-State: AOJu0Yy0WCqdiWkswnWwMxOdbR1QwyfSlNZgEKMwF9Yu/DGr9xp9TO1z 4iHqSEQ0NmHTMtbzA2uFrdZPpg4lL2f2ErZjdR7R3emx7D7n2AamEZw73OaZP2Ap X-Gm-Gg: Acq92OHQBzMiyX8sFgALPJjdYwRBerlb3CJopIGhbCDLlbamKNYX078H5SsZfAHqgY+ 7YGtcXyRQ03tmB7vxN/2GGfwVXLxHQXlaeOnenYbgiyj6auZoVo4wrkYW/KK+RLYMW7pKuj+ECT IxdHEWHrurbTm9gWktn9lsUrlbTtSZW9CiTzh8xaRPW24FzGBllu5qeKqiOxl1eMvhlojbF8lR5 pyWJwiZFyDVCyRfTxlt6EOw+v0atTlCTJKkeYoOh1CpqzIFK15UktYa9C4Mc8/8oG/kO2DFARuH gAxG4v4JlXLZlSZrh3iGprAFSrd7/O3GfOqbeEoqE0yL3Fd1AwcCQ+m32+iTSdjVduJcsi9ibHY bYIiuQOaaSEvFvlZHig83ATaiykeCtYIRQ0dVgQcHKFlpCqQq2HoH80LBU+k8flXLZevbalru30 CH0PhHJguEGueRg1E6GKePHibKOYbEafP6bONK0CslJmCmBx6p8T9B53FOTkLSTzodSiICh7k= X-Received: by 2002:a5d:554f:0:b0:45f:f142:d56d with SMTP id ffacd0b85a97d-4603050e58dmr28190240f8f.13.1781089621362; Wed, 10 Jun 2026 04:07:01 -0700 (PDT) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f2e4b18sm55870321f8f.10.2026.06.10.04.07.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 04:07:01 -0700 (PDT) Date: Wed, 10 Jun 2026 12:06:59 +0100 From: David Laight To: "Masami Hiramatsu (Google)" Cc: "Markus Schneider-Pargmann (The Capable Hub)" , Steven Rostedt , Mathieu Desnoyers , Heiko Carstens , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH] tracing: fprobe: Remove __packed from generic __fprobe_header Message-ID: <20260610120659.7c61cfa6@pumpkin> In-Reply-To: <20260610171740.c30c43c5faee0beac3ad7546@kernel.org> References: <20260428-topic-fprobe-packed-v7-1-v1-1-9abc9b866b4c@baylibre.com> <20260610171740.c30c43c5faee0beac3ad7546@kernel.org> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) 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-Transfer-Encoding: 7bit On Wed, 10 Jun 2026 17:17:40 +0900 Masami Hiramatsu (Google) wrote: > Hi Markus, > > Thanks for ping me. > > On Tue, 28 Apr 2026 10:30:29 +0200 > "Markus Schneider-Pargmann (The Capable Hub)" wrote: > > > fp pointer and unsigned long have the same size on all relevant > > architectures that build Linux. Furthermore this struct is only used in > > architectures that do not set ARCH_DEFINE_ENCODE_FPROBE_HEADER which is > > set only for 64bit architectures (apart from LoongArch). > > > > Both fields are aligned on these architectures so the struct with > > __packed and without it are the same. > > > > Remove the __packed as it is unnecessary. > > > > Fixes: 4346ba160409 ("fprobe: Rewrite fprobe on function-graph tracer") > > NOTE: This is not a Fix, but just cleanup or minor update. Or, you have > any problem with this __packed attribute? > > Unless there is no problem (or any concern), I would like to keep this > as it is. There is likely to be a difference on architectures that fault misaligned accesses. On those gcc will use multiple byte-sized accesses (and a log of shifts etc) for code that accesses those members because it will assume that the structure itself can be misaligned. So you only want __packed on structures that might be misaligned and those that contain misaligned members. If the structure is only guaranteed to be 32bit aligned then use __packed __aligned(4) so that two 32bit accesses get used instead of 8 8bit ones. -- David > > Thank you, > > > Signed-off-by: Markus Schneider-Pargmann (The Capable Hub) > > --- > > kernel/trace/fprobe.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c > > index cc49ebd2a773..21751dcdb7b9 100644 > > --- a/kernel/trace/fprobe.c > > +++ b/kernel/trace/fprobe.c > > @@ -181,7 +181,7 @@ static inline void read_fprobe_header(unsigned long *stack, > > struct __fprobe_header { > > struct fprobe *fp; > > unsigned long size_words; > > -} __packed; > > +}; > > > > #define FPROBE_HEADER_SIZE_IN_LONG SIZE_IN_LONG(sizeof(struct __fprobe_header)) > > > > > > --- > > base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731 > > change-id: 20260427-topic-fprobe-packed-v7-1-f44f9bbdedf6 > > > > Best regards, > > -- > > Markus Schneider-Pargmann (The Capable Hub) > > > >