Hi,
What do you think about following patch?
We had some discussion about this recently on the buildroot
mailinglist. Any other use cases other than rpcbind/nfs-utils you
can think of?
best regards
Waldemar
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