public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Andreas Larsson <andreas@gaisler.com>,
	GNU C Library <libc-alpha@sourceware.org>
Cc: Carlos O'Donell <carlos@redhat.com>,
	David Miller <davem@davemloft.net>,
	Torvald Riegel <triegel@redhat.com>,
	software@gaisler.com
Subject: Re: [RFC][PATCH 1/2] sparc32: Mark sendmsg and recvmsg system calls as unsupported
Date: Wed, 02 Nov 2016 12:49:00 -0000	[thread overview]
Message-ID: <824769ca-9024-23d9-046a-59a70feb177c@linaro.org> (raw)
In-Reply-To: <5819CF95.7070306@gaisler.com>



On 02/11/2016 09:35, Andreas Larsson wrote:
> On 2016-11-01 18:28, Adhemerval Zanella wrote:
>>
>>
>> On 01/11/2016 13:07, Andreas Larsson wrote:
>>> This fixes a bug introduced by abf29edd4a3918 that missed fixing up
>>> sparc32 in the change.
>>>
>>>     * sysdeps/unix/sysv/linux/sparc/kernel-features.h: Undefine
>>>     __ASSUME_SENDMSG_SYSCALL and __ASSUME_RECVMSG_SYSCALL for 32-bit
>>>     sparcv8
>>> ---
>>>   sysdeps/unix/sysv/linux/sparc/kernel-features.h |    4 +++-
>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
>>> index 69c9c7c..db3f5cd 100644
>>> --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h
>>> +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
>>> @@ -32,8 +32,10 @@
>>>   #include_next <kernel-features.h>
>>>
>>>   /* 32-bit SPARC kernels do not support
>>> -   futex_atomic_cmpxchg_inatomic.  */
>>> +   futex_atomic_cmpxchg_inatomic or sendmsg/recvmsg.  */
>>>   #if !defined __arch64__ && !defined __sparc_v9__
>>>   # undef __ASSUME_REQUEUE_PI
>>>   # undef __ASSUME_SET_ROBUST_LIST
>>> +# undef __ASSUME_SENDMSG_SYSCALL
>>> +# undef __ASSUME_RECVMSG_SYSCALL
>>>   #endif
>>>
>>
>> At least the kernel headers for Linux 3.2 on sparc defined both __NR_recvmsg
>> and __NR_sendmsg.  Also, checking 'arch/sparc/kernel/sys32.S' on 3.2 does
>> seems that sparc32 have both recvmsg and sendmsg wire-up.  Am I missing
>> something here?
> 
> [resent to correct topic - I should apparently stay away from my mail client today]
> 
> Linux kernel commit 8b30ca73b7cc7f2177cfc4e8274d2ebdba328cd5 added
> sys_sendmsg and sys_recvmsg to the sys_call_table in
> arch/sparc/kernel/systbls_32.S. So sparc32 kernels prior to Linux 4.4 do
> not support them as straight up system calls.
> 
> Best regards,
> Andreas Larsson

Right, so it is advertise to userland through __SYS/__NR macros even though
it is not really supported?

Even though, I think a better solution would be:

/* All direct socketcalls are available only with kernel 4.4.  */
#if __LINUX_KERNEL_VERSION < 0x040400
# undef __ASSUME_SENDMSG_SYSCALL
# undef __ASSUME_RECVMSG_SYSCALL
#endif

  reply	other threads:[~2016-11-02 12:49 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-01 15:08 [RFC][PATCH 0/2] Make sparcv8 work again on cas enabled hardware Andreas Larsson
2016-11-01 15:08 ` [RFC][PATCH 2/2] sparc32: Use cas for atomic_* operations and use general pthread_barrier_wait Andreas Larsson
2016-11-04 18:37   ` David Miller
2016-11-04 18:44     ` David Miller
2016-11-01 15:08 ` [RFC][PATCH 1/2] sparc32: Mark sendmsg and recvmsg system calls as unsupported Andreas Larsson
2016-11-01 17:28   ` Adhemerval Zanella
2016-11-02 11:38     ` Andreas Larsson
2016-11-02 12:49       ` Adhemerval Zanella [this message]
2016-11-04 18:36   ` David Miller
2016-11-01 16:00 ` [RFC][PATCH 0/2] Make sparcv8 work again on cas enabled hardware Torvald Riegel
2016-11-01 16:09   ` David Miller
2016-11-01 16:46     ` Torvald Riegel
2016-11-01 16:51       ` David Miller
2016-11-02 10:05         ` Torvald Riegel
2016-11-02 11:29           ` Andreas Larsson
2016-11-02 15:32           ` David Miller
2016-11-02 22:33             ` Torvald Riegel
2016-11-03  2:52               ` David Miller
2016-11-03 15:39                 ` Torvald Riegel
2016-11-03 17:22                   ` David Miller
2016-11-03 18:41                     ` Adhemerval Zanella
2016-11-03 20:33                       ` David Miller
2016-11-03 21:29                         ` Adhemerval Zanella
2016-11-03 22:25                         ` Torvald Riegel
2016-11-04 10:28                     ` Andreas Larsson
2016-11-04 15:23                       ` David Miller
2016-11-04 13:55                     ` Richard Henderson
2016-11-04 15:31                       ` David Miller
2016-11-04 16:10                         ` Richard Henderson
2016-11-04 14:04                     ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=824769ca-9024-23d9-046a-59a70feb177c@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=andreas@gaisler.com \
    --cc=carlos@redhat.com \
    --cc=davem@davemloft.net \
    --cc=libc-alpha@sourceware.org \
    --cc=software@gaisler.com \
    --cc=triegel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).