Hi,
With uClibc-ng configured with "lib64" multilib prefix, ld.so does not
search /lib64:/usr/lib64 for the dynamic libraries because both
_dl_library_path and the ld.so install path point to /lib (yes,
uClibc-ng installs its linker to /lib64 - but gcc insists on using
/lib/ld-uClibc-x86-64.so.0, not /lib64).
Not included in this patch are changes for ldd - I guess it needs
similar changes.
Also, it looks like dl-elf.c could benefit from some cleanup - for
example, DT_RUNPATH is searched twice, once before LD_LIBRARY_PATH and
once after.
Regards,
Alexey.
This follows the recommendations outlined in Network Operations Division
Cryptographic Requirements published on wikileaks on March 2017.
We discard more bytes of the first keystream to reduce possibility of
non-random bytes.
This is similar to a change in FreeBSD:
https://svnweb.freebsd.org/base?view=revision&revision=315225
Signed-off-by: Loganaden Velvindron <logan(a)hackers.mu>
---
libc/stdlib/arc4random.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libc/stdlib/arc4random.c b/libc/stdlib/arc4random.c
index 0013612..8b62931 100644
--- a/libc/stdlib/arc4random.c
+++ b/libc/stdlib/arc4random.c
@@ -153,9 +153,10 @@ arc4_stir(struct arc4_stream *as)
/*
* Discard early keystream, as per recommendations in:
- * http://www.wisdom.weizmann.ac.il/~itsik/RC4/Papers/Rc4_ksa.ps
+ * Network Operations Division Cryptographic requirements
+ * published on wikileaks on march 2017
*/
- for (n = 0; n < 256; n++)
+ for (n = 0; n < 3072; n++)
(void)arc4_getbyte(as);
arc4_count = 1600000;
}
--
2.9.3
Hi,
Rob Landley wrote,
> On 01/09/2017 08:26 AM, ANDY KENNEDY wrote:
> > Because uClibc is dead.
>
> As the guy who staged the coup to appoint the current maintainer a
> decade ago and then watched him _not_ get the NPTL mess sorted or the
> project back on a regular release schedule, I agree: uClibc is dead. Has
> been for a while, replaced by musl-libc (chromeos) and bionic (android).
>
> I wrote a long eulogy for the project last year on the buildroot list
> explaining how it died and why I consider the uClibc-ng project to be
> beating a dead horse:
Yeah, but your opinion is just _one_ opinion.
Keeping a working code base up and running for a lot of
architectures not supported by musl isn't about beating a dead
horse.(ARC, Xtensa, NDS32, Sparc, Blackfin, C6X, H8/300, ..)
uClibc-ng is alive and kicking. So stop telling people bullshit.
> http://lists.busybox.net/pipermail/buildroot/2016-December/180102.html
>
> Of course that particular exercise in necromancy is no sillier than a
> half-dozen other such projects I could name.
Surely reimplementing a well known project like busybox just because
to use another open source license is something totally useful and
genius stuff.
I added aarchh64 support recently to uClibc-ng, so you might give it
a try and make your own opinion.
best regards
Waldemar
Hi all:
uclibc seem will set argument *memptr to NULL when posix_memalign[1]
fail, I know it's not specify in most document[1-3],
but other libc (newlib, glibc, musl) implementations are not set it to
NULL if fail and gcc testsuite have 1 test case for that[7], so how
about make uclib consistent to other libc?
the patch attached.
newlib[4]:
int
__posix_memalign (void **memptr, size_t alignment, size_t size)
{
void *mem;
/* Test whether the ALIGNMENT argument is valid. It must be a power
of two multiple of sizeof (void *). */
if (alignment % sizeof (void *) != 0 || (alignment & (alignment - 1)) !=
0)
return EINVAL;
mem = __libc_memalign (alignment, size);
if (mem != NULL) // only set when success
{
*memptr = mem;
return 0;
}
return ENOMEM;
}
glibc [5]:
int
__posix_memalign (void **memptr, size_t alignment, size_t size)
{
void *mem;
/* Test whether the SIZE argument is valid. It must be a power of
two multiple of sizeof (void *). */
if (alignment % sizeof (void *) != 0
|| !powerof2 (alignment / sizeof (void *)) != 0
|| alignment == 0)
return EINVAL;
/* Call the hook here, so that caller is posix_memalign's caller
and not posix_memalign itself. */
void *(*hook) (size_t, size_t, const void *) =
force_reg (__memalign_hook);
if (__builtin_expect (hook != NULL, 0))
mem = (*hook)(alignment, size, RETURN_ADDRESS (0));
else
mem = __libc_memalign (alignment, size);
if (mem != NULL) { // only set when success
*memptr = mem;
return 0;
}
return ENOMEM;
}
musl [6]:
int posix_memalign(void **res, size_t align, size_t len)
{
if (align < sizeof(void *)) return EINVAL;
void *mem = __memalign(align, len);
if (!mem) return errno;
*res = mem; // only set when success
return 0;
}
[1] http://man7.org/linux/man-pages/man3/posix_memalign.3.html
[2] http://pubs.opengroup.org/onlinepubs/009695399/
functions/posix_memalign.html
[3] https://linux.die.net/man/3/posix_memalign
[4] https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.
git;a=blob;f=newlib/libc/sys/linux/malloc.c;h=25007e8896a1292d6ae821aa35d7b8
973ea99bad;hb=HEAD#l4938
[5] https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/malloc.c;h=
488579390578e09a1a232ac5161daee086dbbd6b;hb=HEAD#l5086
[6] http://git.musl-libc.org/cgit/musl/tree/src/malloc/posix_memalign.c
[7] https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/
gcc.dg/torture/pr60092.c
This commit enables getpt() support in ARC defconfigs as some packages
need it. E.g. we need this to be able to build xterm package as it uses
getpt().
As an example I can refer to buildroot autobuilds where xterm build is
failing when using prebuilt ARC toolchain (which in its turn uses uClibc
without getpt() support):
http://autobuild.buildroot.net/results/28a/28a92049a6ceef005787c5779f77ecf3…
Signed-off-by: Vlad Zakharov <vzakhar(a)synopsys.com>
---
extra/Configs/defconfigs/arc/arcv2_defconfig | 1 +
extra/Configs/defconfigs/arc/defconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/extra/Configs/defconfigs/arc/arcv2_defconfig b/extra/Configs/defconfigs/arc/arcv2_defconfig
index 383861f..a9d9891 100644
--- a/extra/Configs/defconfigs/arc/arcv2_defconfig
+++ b/extra/Configs/defconfigs/arc/arcv2_defconfig
@@ -16,6 +16,7 @@ UCLIBC_SUSV2_LEGACY=y
UCLIBC_SUSV3_LEGACY=y
UCLIBC_SUSV4_LEGACY=y
UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
+UCLIBC_HAS_GETPT=y
UCLIBC_HAS_LIBUTIL=y
UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
UCLIBC_SV4_DEPRECATED=y
diff --git a/extra/Configs/defconfigs/arc/defconfig b/extra/Configs/defconfigs/arc/defconfig
index d3773aa..9a76e7d 100644
--- a/extra/Configs/defconfigs/arc/defconfig
+++ b/extra/Configs/defconfigs/arc/defconfig
@@ -15,6 +15,7 @@ UCLIBC_SUSV2_LEGACY=y
UCLIBC_SUSV3_LEGACY=y
UCLIBC_SUSV4_LEGACY=y
UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
+UCLIBC_HAS_GETPT=y
UCLIBC_HAS_LIBUTIL=y
UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
UCLIBC_SV4_DEPRECATED=y
--
2.7.4
This commit enables XSI math extensions to the ISO C standard (bessel).
We need this to be able to build mpv package as it uses functions from
this extensions.
As an example I can refer to buildroot autobuilds where mpv build is
failing when using prebuilt ARC toolchain (which in its turn uses uClibc
without XSI math extensions):
http://autobuild.buildroot.net/results/fb6/fb677a917545adee321bdcd2c2519c81…
Signed-off-by: Vlad Zakharov <vzakhar(a)synopsys.com>
---
extra/Configs/defconfigs/arc/arcv2_defconfig | 1 +
extra/Configs/defconfigs/arc/defconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/extra/Configs/defconfigs/arc/arcv2_defconfig b/extra/Configs/defconfigs/arc/arcv2_defconfig
index 2d12358..383861f 100644
--- a/extra/Configs/defconfigs/arc/arcv2_defconfig
+++ b/extra/Configs/defconfigs/arc/arcv2_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARC_CPU_HS=y
ARCH_WANTS_LITTLE_ENDIAN=y
# UCLIBC_HAS_FPU is not set
DO_C99_MATH=y
+DO_XSI_MATH=y
KERNEL_HEADERS="%KERNEL_HEADERS%"
# DOPIC is not set
# LDSO_CACHE_SUPPORT is not set
diff --git a/extra/Configs/defconfigs/arc/defconfig b/extra/Configs/defconfigs/arc/defconfig
index f582eb5..d3773aa 100644
--- a/extra/Configs/defconfigs/arc/defconfig
+++ b/extra/Configs/defconfigs/arc/defconfig
@@ -1,6 +1,7 @@
ARCH_WANTS_LITTLE_ENDIAN=y
# UCLIBC_HAS_FPU is not set
DO_C99_MATH=y
+DO_XSI_MATH=y
KERNEL_HEADERS="%KERNEL_HEADERS%"
# DOPIC is not set
# LDSO_CACHE_SUPPORT is not set
--
2.7.4