All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it, linuxtestproject.agent@gmail.com
Subject: Re: [LTP] [PATCH 1/1] lapi/keyctl.h: Fix compilation on old kernel
Date: Mon, 21 Sep 2026 15:36:13 +0200	[thread overview]
Message-ID: <20260921133613.GA2143203@pevik> (raw)
In-Reply-To: <arEagQKsecxyn8dy@yuki.lan>

> Hi!
> > diff --git a/include/lapi/keyctl.h b/include/lapi/keyctl.h
> > index fdb68d1725..e1e46b7865 100644
> > --- a/include/lapi/keyctl.h
> > +++ b/include/lapi/keyctl.h
> > @@ -69,6 +69,12 @@ struct keyctl_dh_params {
> >  };
> >  #endif

> > +/* Fix for kernel < v4.20 */
> > +#if defined(HAVE_STRUCT_KEYCTL_DH_PARAMS) && \
> > +	!defined(HAVE_STRUCT_KEYCTL_DH_PARAMS_PRIV)
> > +# define priv private
> > +#endif

> I do not like this one, we may end up redefining wrong priv and break
> everything.

> Given that the private stil exists in the structure for C code:

> (/usr/include/linux/keyctl.h)
> /* keyctl structures */
> struct keyctl_dh_params {
>         union {
> #ifndef __cplusplus
>                 __s32 private;
> #endif
>                 __s32 priv;
>         };
>         __s32 prime;
>         __s32 base;
> };

> We may as well use private in the tests consistently and update our
> fallback with the union as well.

When I looked in the struct in UAPI I considered define better, but indeed
mirroring UAPI the same way is really better.

I'll retest it and send v2.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-09-21 13:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 11:14 [LTP] [PATCH 1/1] lapi/keyctl.h: Fix compilation on old kernel Petr Vorel
2026-09-21 11:52 ` Cyril Hrubis
2026-09-21 13:36   ` Petr Vorel [this message]
2026-09-21 13:41     ` Petr Vorel
2026-09-22  8:55       ` Petr Vorel
2026-09-21 13:46 ` [LTP] " linuxtestproject.agent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260921133613.GA2143203@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=linuxtestproject.agent@gmail.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.