Date: Thu, 06 Mar 2014 13:53:49 +0900 From: Takashi Komatsu <komatsu.taka@jp.panasonic.com> To: freebsd-arm <freebsd-arm@freebsd.org> Subject: The arguments of sys_sigreturn Message-ID: <20140306135349.5C75.2910CF64@jp.panasonic.com>
next in thread | raw e-mail | index | archive | help
--------_5317F256000000005C71_MULTIPART_MIXED_ Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi, I have a question about the function of sys_sigreturn. [sys/arm/arm/machdep.c] In arm codes, the sys_sigreturn function use sigreturn_args. I think it has to be used for "struct __ucontext". But it use "struct sigframe". In fact, it's called with the argument "sigframe" by other function. (sys/arm/arm/locore.S: L558) On the one hand, it's called by the thread library with "ucontext_t". (lib/libthr/thread/thr_sig.c: L256) There is collision types. I attached my patch. Please review. Best regards, Takashi Komatsu --------_5317F256000000005C71_MULTIPART_MIXED_ Content-Type: application/octet-stream; name="sys_sigreturn.patch" Content-Disposition: attachment; filename="sys_sigreturn.patch" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3N5cy9hcm0vYXJtL2dlbmFzc3ltLmMgYi9zeXMvYXJtL2FybS9nZW5hc3N5 bS5jCmluZGV4IDAyOTUyOWEuLmUzODczM2IgMTAwNjQ0Ci0tLSBhL3N5cy9hcm0vYXJtL2dlbmFz c3ltLmMKKysrIGIvc3lzL2FybS9hcm0vZ2VuYXNzeW0uYwpAQCAtMTA5LDYgKzEwOSw4IEBAIEFT U1lNKFRGX1BDLCBvZmZzZXRvZihzdHJ1Y3QgdHJhcGZyYW1lLCB0Zl9wYykpOwogQVNTWU0oUF9Q SUQsIG9mZnNldG9mKHN0cnVjdCBwcm9jLCBwX3BpZCkpOwogQVNTWU0oUF9GTEFHLCBvZmZzZXRv ZihzdHJ1Y3QgcHJvYywgcF9mbGFnKSk7CiAKK0FTU1lNKFNJR0ZfVUMsIG9mZnNldG9mKHN0cnVj dCBzaWdmcmFtZSwgc2ZfdWMpKTsKKwogI2lmZGVmIEFSTV9UUF9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mKHVjKSkpCiAJCXJl dHVybiAoRUZBVUxUKTsKIAkvKgogCSAqIE1ha2Ugc3VyZSB0aGUgcHJvY2Vzc29yIG1vZGUgaGFz IG5vdCBiZWVuIHRhbXBlcmVkIHdpdGggYW5kCiAJICogaW50ZXJydXB0cyBoYXZlIG5vdCBiZWVu IGRpc2FibGVkLgogCSAqLwotCXNwc3IgPSBzZi5zZl91Yy51Y19tY29udGV4dC5fX2dyZWdzW19S RUdfQ1BTUl07CisJc3BzciA9IHVjLnVjX21jb250ZXh0Ll9fZ3JlZ3NbX1JFR19DUFNSXTsKIAlp ZiAoKHNwc3IgJiBQU1JfTU9ERSkgIT0gUFNSX1VTUjMyX01PREUgfHwKIAkgICAgKHNwc3IgJiAo STMyX2JpdCB8IEYzMl9iaXQpKSAhPSAwKQogCQlyZXR1cm4gKEVJTlZBTCk7CiAJCS8qIFJlc3Rv cmUgcmVnaXN0ZXIgY29udGV4dC4gKi8KLQl0ZiA9IHRkLT50ZF9mcmFtZTsKLQlzZXRfbWNvbnRl eHQodGQsICZzZi5zZl91Yy51Y19tY29udGV4dCk7CisJc2V0X21jb250ZXh0KHRkLCAmdWMudWNf bWNvbnRleHQpOwogCiAJLyogUmVzdG9yZSBzaWduYWwgbWFzay4gKi8KLQlrZXJuX3NpZ3Byb2Nt YXNrKHRkLCBTSUdfU0VUTUFTSywgJnNmLnNmX3VjLnVjX3NpZ21hc2ssIE5VTEwsIDApOworCWtl cm5fc2lncHJvY21hc2sodGQsIFNJR19TRVRNQVNLLCAmdWMudWNfc2lnbWFzaywgTlVMTCwgMCk7 CiAKIAlyZXR1cm4gKEVKVVNUUkVUVVJOKTsKIH0K --------_5317F256000000005C71_MULTIPART_MIXED_--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140306135349.5C75.2910CF64>