[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#834706: libc6-dev: needs versioned dependency on linux-libc-dev for SYS_getrandom



On Thu, Aug 18, 2016 at 03:52:48PM +0200, Aurelien Jarno wrote:
> On 2016-08-18 09:53, Lionel Elie Mamane wrote:

>> /usr/include/x86_64-linux-gnu/bits/syscall.h
>> contains
>> #define SYS_getrandom __NR_getrandom
>> but that is not defined in stable's linux-libc-dev (version
>> 3.16.7-ckt25-2 and security update 3.16.7-ckt25-2+deb8u3).

>> For this #define to work, libc6-dev needs a versioned depends on a
>> newer version of linux-libc-dev. The version now in sid and testing
>> (4.6.4-1) works but probably the requirement is more lax than that.

> I am not sure about that. This kind of new features are usually
> detected by the configure scripts of the software, given anyway that
> the presence of the syscall definition doesn't imply that the
> running kernel has support for it.

I encountered this issue when compiling mutt. It contains this code:

#if defined(SYS_getrandom) && defined(__linux__)
  long ret;
  do {
    ret = syscall(SYS_getrandom, out, len, 0, 0, 0, 0);
  } while ((ret == -1) && (errno == EINTR));
  if (ret == len) return;
  // more stuff, removed here because not useful to the point
#endif

That code fails to compile with a new libc6-dev and old
linux-libc-dev, with an error message along the lines of
  symbol __NR_getrandom not defined

If you mean to say this mutt code is buggy, then fine, I defer to your
expertise. You can reassign this bug to mutt with an explanation of
what it _should_ do.

> Also I am not sure Policy 3.5 applies there, most of the packages
> work correctly there, so the dependency is not "required" for
> packages to "work correctly".

I understand "work correctly" as "works completely correctly", not
"most of the package works correctly", and always have. I won't fight
you if you disagree and downgrade the severity.

-- 
Lionel


Reply to: