lp:klibc

Created by Thorsten Glaser and last modified
Get this branch:
bzr branch lp:klibc

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Thorsten Glaser
Project:
klibc
Review team:
maximilian attems
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at git://git.kernel.org/pub/scm/libs/klibc/klibc.git.

The next import is scheduled to run .

Last successful import was .

Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 5 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-5 and finished taking 15 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 15 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-4 and finished taking 10 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 10 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 15 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 15 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-4 and finished taking 10 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 20 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-2 and finished taking 15 seconds — see the log

Recent revisions

2240. By Ben Hutchings

[klibc] syscalls: Support for inotify_init1()

Linux 2.6.27 added the inotify_init1() system call, a variant of
inotify_init() with a flags parameter added. Generate a wrapper for
this system call.

Newer architectures support only inotify_init1(), so also add a
inotify_init() implementation for them.

Signed-off-by: Ben Hutchings <email address hidden>

2239. By Ben Hutchings

[klibc] syscalls: Remove support for socketcall()

All architectures that implement socketcall() now also have separate
system calls:

- arm: added in 2.6.12
- i386: added in 4.3
- m68k: added in 4.3
- mips, mips64: added in 2.1.44
- parisc: always had both
- ppc, ppc64: added in 2.6.37
- s390, s390x: added in 4.3
- sh: added in 2.6.37
- sparc, sparc64: added in 4.4 and 4.20

We can therefore unconditionally use the separate system calls, except
for accept() which may need to be a wrapper for accept4().

Remove support for socketcall(), and move the socket system call
definitions into SYSCALLS.def.

Signed-off-by: Ben Hutchings <email address hidden>

2238. By Ben Hutchings

[klibc] syscalls: Remove _KLIBC_SYS_SOCKETCALL config macro

From Linux 1.3.44 to 2.6.25, the sparc port implemented separate
system calls for socket(), connect(), etc. in its SunOS personality.
The system call numbers were defined in <asm/unistd.h> header even
though they were not implemented for native Linux programs.

As a workaround for this, commit 8594ecec842d ("[klibc] sparc, sparc64
use sys_socketcall unconditionally") added a macro to override
automatic detection of these system calls and defined that on these
architectures.

No other architecture ever needed this, and since Linux 4.20 all of
those system calls are now implemented. We can therefore remove the
use of this macro.

Signed-off-by: Ben Hutchings <email address hidden>

2237. By Ben Hutchings

[klibc] syscalls: Make more system calls non-optional

Currently many system calls are marked as optional in SYSCALLS.def,
but should be defined on all architectures. Make them non-optional.

Signed-off-by: Ben Hutchings <email address hidden>

2236. By Ben Hutchings

[klibc] syscalls: Clean up the fork() and clone() definitions

Currently we're defining __clone() on all architectures, but it's only
needed where fork() is missing and it's broken on s390 and s390x where
the parameter order is incompatible.

We're also building a list of new architectures which don't implement
fork(), when we could automatically detect that.

To fix these problems:

- If __NR_fork is defined, generate a fork() system call wrapper, with
  only sparc and sparc64 as special cases.

- Otherwise, generate __clone() as a clone() system call wrapper.
  Comment why this works despite the architecture differences.

Signed-off-by: Ben Hutchings <email address hidden>

2235. By Ben Hutchings

[klibc] syscalls: Define mlock() etc. on all architectures

Due to an error in editing preprocessor conditionals long ago, the
m{,un}lock{,all}() system call wrappers are only generated on
architectures where we use mmap() and not mmap2(). Move the #endif to
the right place.

Signed-off-by: Ben Hutchings <email address hidden>

2234. By Ben Hutchings

[klibc] Remove unused no-MMU support

There is some conditional logic to handle no-MMU architectures, but no
such architectures are defined. We are now having to override the
automatic detection for each new architecture because it only
checks for fork() and not clone().

Since this is currently unused and therefore untested, it's probably
broken. Remove it.

Signed-off-by: Ben Hutchings <email address hidden>

2233. By Ben Hutchings

[klibc] parisc: Fix build with Linux 6.10+

The parisc version of <asm/signal.h> did not define _NSIG or struct
sigset until recently, so we did it in <klibc/archsignal.h>.

In Linux 6.10 and on some stable branches these definitions have been
added, conflicting with our definitions. So make ours conditional on
!defined(_NSIG).

Signed-off-by: Ben Hutchings <email address hidden>

2232. By Ben Hutchings

[klibc] Delete the ia64 port

The Linux ia64 port was finally deleted in v6.7, so there's no point
in maintaining support in klibc.

Signed-off-by: Ben Hutchings <email address hidden>

2231. By Ben Hutchings

[klibc] inet: Stricter IPv6 field parsing in inet_pton()

We currently don't range-check the fields of an IPv6 address, so the
following strings are wrongly accepted:

"10000::"
"::10000"

Since we currently only support hexadecimal fields, implement the
range check by limiting the number of digits to 4.

Signed-off-by: Ben Hutchings <email address hidden>

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers