Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jan 1999 12:16:44 +0100
From:      Marcel Moolenaar <marcel@scc.nl>
To:        Brian Feldman <green@unixhelp.org>
Cc:        Mike Smith <mike@smith.net.au>, freebsd-emulation@FreeBSD.ORG
Subject:   Re: sendmsg() not working?!
Message-ID:  <369F239C.D17CD06D@scc.nl>
References:  <Pine.BSF.4.05.9901141639390.26759-100000@janus.syracuse.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Brian Feldman wrote:
> 
> > > You know of course that system call arguments are faulted in from the user
> > > stack on int 0x80, so it doesn't change the system call time that much
> > > (read: substantially at all) to have a couple more.
> >
> > Ok; but the copyout changes data in a structure controlled by the program.
> > That change is visible by the program. Technically speaking, the Linux
> > emulator can change runtime behavior. I know; it is not likely, but possible.
> > That's what bothers me about the copyout.
> 
> I suppose you're right, I saw the const struct msghdr * in sednmsg, but I don't
> think that necessarily applies to the cmsg, which is just a pointer in msghdr.
> We do not make any changes to the const struct msghdr *, so we violate no
> rules.

Correct :-)

> Why would a program ever check if the sendmsg affected cmsghdr?

It is not for the kernel/emulator developer to ask such questions, for it
will only result in unfounded assumptions. (hmmm, did I just say that? :-)

> All it would do from then on is have the corrct value of cmsg_level.

Correct for FreeBSD, but not correct for Linux. We are running Linux apps of
course.

> If it really bothers anyone any serious amount, there's an easy fix.

[fix deleted]

I know. It is not such a big deal to spend any more time on this discussion.
Let's instead make sure the necessary changed get committed.

marcel

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?369F239C.D17CD06D>