public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Problem with close_range (util-linux)
@ 2021-07-15  8:21 Lukasz Majewski
  2021-07-15  8:36 ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Lukasz Majewski @ 2021-07-15  8:21 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: libc-alpha

[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]

Hi Adhmerval,

I'm now trying to integrate the -master glibc to Yocto/OE, to build the
Y2038 distribution (previously I had the DUT glibc installed in /opt).

I've found some problem with close_range syscall on util-linux.

It detects if the close_range is available (with autotools) and then
tries to use it in lib/fileutils.c

The problem is that it has different signature:
-       close_range(STDERR_FILENO + 1, ~0U);
+       close_range(STDERR_FILENO + 1, ~0U, 0);

than the one from glibc.

I've also noted that close_range has the GLIBC symbol version from 2.34
release, so this is not yet a big issue, but:

1. Shall we handle this case in glibc at all?

or

2. Wait for 2.34 release and then util-linux shall also adjust to the
new, proper signature of close_range?

Those are just my lose thoughts, as the fix for now is pretty
straightforward. However, I would like to fix as much things as
possible until we release the 2.34.

Thanks in advance for any input :-)

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with close_range (util-linux)
  2021-07-15  8:21 Problem with close_range (util-linux) Lukasz Majewski
@ 2021-07-15  8:36 ` Florian Weimer
  2021-07-15  9:04   ` Lukasz Majewski
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2021-07-15  8:36 UTC (permalink / raw)
  To: Lukasz Majewski; +Cc: Adhemerval Zanella, libc-alpha

* Lukasz Majewski:

> Hi Adhmerval,
>
> I'm now trying to integrate the -master glibc to Yocto/OE, to build the
> Y2038 distribution (previously I had the DUT glibc installed in /opt).
>
> I've found some problem with close_range syscall on util-linux.
>
> It detects if the close_range is available (with autotools) and then
> tries to use it in lib/fileutils.c
>
> The problem is that it has different signature:
> -       close_range(STDERR_FILENO + 1, ~0U);
> +       close_range(STDERR_FILENO + 1, ~0U, 0);
>
> than the one from glibc.
>
> I've also noted that close_range has the GLIBC symbol version from 2.34
> release, so this is not yet a big issue, but:
>
> 1. Shall we handle this case in glibc at all?
>
> or
>
> 2. Wait for 2.34 release and then util-linux shall also adjust to the
> new, proper signature of close_range?

This is typical for the addition of new system call wrappers.

util-linux upstream has already been fixed.  Given that the code was
rather buggy before, it's a good idea to encourage wide backporting of
the fix.

I don't think glibc needs to do anything here.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with close_range (util-linux)
  2021-07-15  8:36 ` Florian Weimer
@ 2021-07-15  9:04   ` Lukasz Majewski
  0 siblings, 0 replies; 3+ messages in thread
From: Lukasz Majewski @ 2021-07-15  9:04 UTC (permalink / raw)
  To: Florian Weimer; +Cc: Adhemerval Zanella, libc-alpha

[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]

Hi Florian,

> * Lukasz Majewski:
> 
> > Hi Adhmerval,
> >
> > I'm now trying to integrate the -master glibc to Yocto/OE, to build
> > the Y2038 distribution (previously I had the DUT glibc installed in
> > /opt).
> >
> > I've found some problem with close_range syscall on util-linux.
> >
> > It detects if the close_range is available (with autotools) and then
> > tries to use it in lib/fileutils.c
> >
> > The problem is that it has different signature:
> > -       close_range(STDERR_FILENO + 1, ~0U);
> > +       close_range(STDERR_FILENO + 1, ~0U, 0);
> >
> > than the one from glibc.
> >
> > I've also noted that close_range has the GLIBC symbol version from
> > 2.34 release, so this is not yet a big issue, but:
> >
> > 1. Shall we handle this case in glibc at all?
> >
> > or
> >
> > 2. Wait for 2.34 release and then util-linux shall also adjust to
> > the new, proper signature of close_range?  
> 
> This is typical for the addition of new system call wrappers.
> 
> util-linux upstream has already been fixed.  Given that the code was
> rather buggy before, it's a good idea to encourage wide backporting of
> the fix.
> 
> I don't think glibc needs to do anything here.

Thanks for the clarification :-)

> 
> Thanks,
> Florian
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-15  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15  8:21 Problem with close_range (util-linux) Lukasz Majewski
2021-07-15  8:36 ` Florian Weimer
2021-07-15  9:04   ` Lukasz Majewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).