From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] fix type for ifc_ifcu.ifcu_buf field of struct ifconf
Date: Fri, 16 Sep 2016 10:57:01 -0400 [thread overview]
Message-ID: <20160916145701.GL15995@brightrain.aerifal.cx> (raw)
In-Reply-To: <alpine.LNX.2.20.13.1609161046470.30232@monopod.intra.ispras.ru>
On Fri, Sep 16, 2016 at 11:12:14AM +0300, Alexander Monakov wrote:
> On Thu, 15 Sep 2016, Daniel Sabogal wrote:
> > On Thu, Sep 15, 2016 at 4:25 PM, Alexander Monakov <amonakov@ispras.ru> wrote:
> > > Declaration of 'ifru_data' in that header has the same issue.
> >
> > I originally considered changing this one but had left it out since
> > linux disagree on the type (void *).
>
> Ah. From looking at pre-git Linux history, it appears that it had
> 'char *', but then it was changed to 'void *' in June 2004 by commit
> '[PATCH] sparse: ->ifr_data annotation' by Al Viro, causing a divergence
> with the Glibc interface.
>
> FreeBSD also has 'char *' (caddr_t) there, and netdevice(7) manpage documents
> that the Linux interface has 'char *' as well. Thus, the kernel uapi header is
> the odd one out.
>
> Please wait for further feedback from Rich.
I'd lean towards char* because if applications perform arithmetic on
it expecting it to be char*, void* yields UB. The kernel folks love
their void* arithmetic...
Rich
next prev parent reply other threads:[~2016-09-16 14:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-15 15:27 [PATCH] fix if_indextoname error case Daniel Sabogal
2016-09-15 15:27 ` [PATCH] fix type for ifc_ifcu.ifcu_buf field of struct ifconf Daniel Sabogal
2016-09-15 20:25 ` Alexander Monakov
2016-09-15 21:42 ` Daniel Sabogal
2016-09-16 8:12 ` Alexander Monakov
2016-09-16 14:57 ` Rich Felker [this message]
2016-09-16 22:03 ` [PATCH] fix if_indextoname error case Rich Felker
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=20160916145701.GL15995@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).