Date: Tue, 09 Sep 2008 17:09:27 +0200 From: Marcin Cieslak <saper@system.pl> To: freebsd-emulation@freebsd.org Cc: rdivacky@FreeBSD.org, rink@FreeBSD.org, Robert Watson <rwatson@FreeBSD.org> Subject: Re: kern/102956: [linux] [patch] Add partial support for SO_PEERCRED in Linux emulation Message-ID: <48C691A7.5060302@system.pl>
index | next in thread | raw e-mail
[-- Attachment #1 --] Hello, > (1) The value of LINUX_SO_PEERCRED is incorrect for Alpha, it should be 18 on > that platform. Well, in the meantime Alpha support is gone... > (2) I'm a bit worried about pid not being set, but this may (may) be OK. On > Linux, generally speaking you are guaranteed that either you get (0, -1, > -1) or (pid, uid, gid), but not a blend of both. As we support the pid > for SCM_CREDS, we might also consider adding a LOCAL_PEERPID for use by > the linux emulator to query the remote pid (we'd need to add that where > the peercred is currently cached though). Will remote PID always be available? > > (3) LOG_WARNING should perhaps be LOG_DEBUG or something more consistent with > the res of the linuxulator. I agree. This should be LOG_DEBUG. > FYI, I'm not sure I like that we just pass all other socket options through to > getsockopt() without transformation or an error, it seems failure-prone. We > may end up returning invalid data, etc, but that's not caused by this patch, > but a generally poor failure mode in the linuxulator. I agree. Probably we should explicitly list all supported socket option. I think most of the translation layer is coded for "fixing known differences" vs. "explicit support for X, Y, Z returning EA, EB or EC". --Marcin [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- iQCVAwUBSMaRqz2W2v2wY27ZAQMSjQQAk1cWPPpb+a/lzUqVTDK5UPF62rjUVABD 5najGil8hJTcwvErzY12FLISIE+pql6rGcKKfVuP3RKR19fBmGMxeRviu8pWdF+2 wrBvcOelWavZH2qEgqd8F25F+3x2SK+QnB4SHme+OYdlOUZyGUtIZaUUWH0sbhki 7UvSZLisI+8= =9JK1 -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48C691A7.5060302>
