Linux Test Project
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Wake Liu <wakel@google.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] keyctl: Fix struct keyctl_dh_params build on Bionic
Date: Tue, 13 Oct 2026 18:04:15 +0200	[thread overview]
Message-ID: <20261013160415.GA79598@pevik> (raw)
In-Reply-To: <20261007095938.GA3295049@pevik>

Hi all,

> Hi Wake Liu, Cyril,

> > Bionic generates its copy of the UAPI headers with the C++ keyword

> Ah, we forget on the most used C++ libc when we prepared 71353a6c009b.

> > 'private' renamed to '__linux_private', so its struct keyctl_dh_params
> > only provides the 'priv' alias added in kernel 4.20. Since keyctl25-28
> > were switched to 'private', they fail to build on Android:

> >     error: no member named 'private' in 'struct keyctl_dh_params'

> > Detect the 'private' member in configure and access the member via a
> > new KEYCTL_DH_PRIVATE() macro, which falls back to 'priv' when
> > 'private' is not available, similar to FSID_VAL_MEMBER() in
> > lapi/fanotify.h.

> > Checking for 'private' rather than 'priv' leaves every build whose UAPI
> > headers provide 'private' unchanged, including headers older than 4.20
> > which lack 'priv'. It also makes 'priv' the default when configure is
> > not run, as in the Android build, which uses a hand-maintained
> > config.h. The LTP fallback definition provides both members.

> > Fixes: 71353a6c009b ("keyctl: Use struct keyctl_dh_params 'private' instead of 'priv'")
> > Signed-off-by: Wake Liu <wakel@google.com>

> Looks like we cannot avoid struct keyctl_dh_params.private. Make sense.
> Cc Cyril just in case he has some different idea.

Thank you.  Indeed this autotools fix is the safest way. I verified the it did
not break the original fix in 71353a6c009b (SLE12-SP5) and merged as
6262a5fc31 ("keyctl: Fix struct keyctl_dh_params build on Bionic")

I'm also going to send a follow up to simplify struct keyctl_dh_params again.
(Probably union is not needed any more.)

Kind regards,
Petr

> Reviewed-by: Petr Vorel <pvorel@suse.cz>

> Kind regards,
> Petr

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

  reply	other threads:[~2026-10-13 16:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02 13:05 [LTP] [PATCH] keyctl: Fix struct keyctl_dh_params build on Bionic Wake Liu via ltp
2026-10-02 13:44 ` [LTP] " linuxtestproject.agent
2026-10-07  9:59 ` [LTP] [PATCH] " Petr Vorel
2026-10-13 16:04   ` Petr Vorel [this message]
2026-10-12 11:49 ` Andrea Cervesato via ltp

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=20261013160415.GA79598@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=wakel@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox