This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 02/12] Make __stack_chk_fail() not use other glibc facilities.
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Nix <nix at esperi dot org dot uk>
- Cc: <libc-alpha at sourceware dot org>, <carlos at redhat dot com>
- Date: Sat, 20 Feb 2016 17:36:08 +0000
- Subject: Re: [PATCH 02/12] Make __stack_chk_fail() not use other glibc facilities.
- Authentication-results: sourceware.org; auth=none
- References: <1455963826-21885-1-git-send-email-nix at esperi dot org dot uk> <1455963826-21885-3-git-send-email-nix at esperi dot org dot uk>
You can't use defined(__NR_socket) && defined(__NR_connect) as a condition
for whether to use socketcall, because of architectures that added the
separate syscalls more recently than socketcall support. Instead you need
to use the kernel-features.h macros: if __ASSUME_SOCKETCALL is not
defined, or the macros such as __ASSUME_SOCKET_SYSCALL and
__ASSUME_CONNECT_SYSCALL for the individual syscalls are defined, then use
individual syscalls, otherwise use socketcall.
(Apart from this, we may want to look at bug 12189 again and figure out
how much of this code is desirable anyway.)
--
Joseph S. Myers
joseph@codesourcery.com