On Wed, 10 Jun 2026 12:06:59 +0100
David Laight <[email protected]> wrote:

> 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) 
> > > <[email protected]>
> > > ---
> > >  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;
> > > +};
> > >  

Does "__packed" really do anything between a pointer and a long?

-- Steve

Reply via email to