From nobody Wed Nov 17 20:22:46 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 07955185569B; Wed, 17 Nov 2021 20:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ9h6xN5z4rC5; Wed, 17 Nov 2021 20:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC17D27377; Wed, 17 Nov 2021 20:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AHKMkvQ060165; Wed, 17 Nov 2021 20:22:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMkWG060164; Wed, 17 Nov 2021 20:22:46 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:46 GMT Message-Id: <202111172022.1AHKMkWG060164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 158dcd7395ad - main - freebsd32: have sigqueue take a void * List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 158dcd7395ad894ca5c62e5a66cc5c1b067a0fe6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=158dcd7395ad894ca5c62e5a66cc5c1b067a0fe6 commit 158dcd7395ad894ca5c62e5a66cc5c1b067a0fe6 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:26 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:26 +0000 freebsd32: have sigqueue take a void * This matches the default ABI and we work around issues with union sigval by extracting the bottom 32-bits in a manual handler. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 2 +- sys/compat/freebsd32/freebsd32_proto.h | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 4 ++-- sys/compat/freebsd32/syscalls.master | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 5bff0cea845e..eab217283197 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -3082,7 +3082,7 @@ freebsd32_sigqueue(struct thread *td, struct freebsd32_sigqueue_args *uap) * more common. */ bzero(&sv, sizeof(sv)); - sv.sival_int = uap->value; + sv.sival_int = (uint32_t)(uint64_t)uap->value; return (kern_sigqueue(td, uap->pid, uap->signum, &sv)); } diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 50733c35d51b..9025871780aa 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -384,7 +384,7 @@ struct freebsd32_thr_new_args { struct freebsd32_sigqueue_args { char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)]; char signum_l_[PADL_(int)]; int signum; char signum_r_[PADR_(int)]; - char value_l_[PADL_(int)]; int value; char value_r_[PADR_(int)]; + char value_l_[PADL_(void *)]; void * value; char value_r_[PADR_(void *)]; }; struct freebsd32_kmq_open_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 6727bd8e5c76..971a7a4ca416 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -2238,7 +2238,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct freebsd32_sigqueue_args *p = params; iarg[0] = p->pid; /* pid_t */ iarg[1] = p->signum; /* int */ - iarg[2] = p->value; /* int */ + uarg[2] = (intptr_t)p->value; /* void * */ *n_args = 3; break; } @@ -7071,7 +7071,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 2: - p = "int"; + p = "userland void *"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 3734219fba30..8a4f9b56b7d5 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -858,7 +858,7 @@ struct thr_param32 *param, \ int param_size); } 456 AUE_NULL STD { int freebsd32_sigqueue(pid_t pid, \ - int signum, int value); } + int signum, void *value); } 457 AUE_MQ_OPEN NOSTD { int freebsd32_kmq_open( \ const char *path, int flags, mode_t mode, \ const struct mq_attr32 *attr); }