From owner-svn-src-stable-10@FreeBSD.ORG Fri Aug 8 22:08:52 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 752AC67F for ; Fri, 8 Aug 2014 22:08:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1032500 for ; Fri, 8 Aug 2014 22:08:52 +0000 (UTC) Received: from rpaulo (uid 1145) (envelope-from rpaulo@FreeBSD.org) id 2c40 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Fri, 08 Aug 2014 22:08:51 +0000 From: Rui Paulo Date: Fri, 8 Aug 2014 22:08:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r269742 - in stable/10: sys/kern usr.bin/kdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e54a74.2c40.72548fb3@svn.freebsd.org> X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2014 22:08:52 -0000 Author: rpaulo Date: Fri Aug 8 22:08:51 2014 New Revision: 269742 URL: http://svnweb.freebsd.org/changeset/base/269742 Log: MFC r269408, r269409: shm_open()/shm_unlink() ktrace support. Modified: stable/10/sys/kern/uipc_shm.c stable/10/usr.bin/kdump/kdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_shm.c ============================================================================== --- stable/10/sys/kern/uipc_shm.c Fri Aug 8 21:47:47 2014 (r269741) +++ stable/10/sys/kern/uipc_shm.c Fri Aug 8 22:08:51 2014 (r269742) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include "opt_capsicum.h" +#include "opt_ktrace.h" #include #include @@ -53,6 +54,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include #include @@ -727,7 +731,10 @@ sys_shm_open(struct thread *td, struct s } else { path = malloc(MAXPATHLEN, M_SHMFD, M_WAITOK); error = copyinstr(uap->path, path, MAXPATHLEN, NULL); - +#ifdef KTRACE + if (error == 0 && KTRPOINT(curthread, KTR_NAMEI)) + ktrnamei(path); +#endif /* Require paths to start with a '/' character. */ if (error == 0 && path[0] != '/') error = EINVAL; @@ -825,7 +832,10 @@ sys_shm_unlink(struct thread *td, struct free(path, M_TEMP); return (error); } - +#ifdef KTRACE + if (KTRPOINT(curthread, KTR_NAMEI)) + ktrnamei(path); +#endif fnv = fnv_32_str(path, FNV1_32_INIT); sx_xlock(&shm_dict_lock); error = shm_remove(path, fnv, td->td_ucred); Modified: stable/10/usr.bin/kdump/kdump.c ============================================================================== --- stable/10/usr.bin/kdump/kdump.c Fri Aug 8 21:47:47 2014 (r269741) +++ stable/10/usr.bin/kdump/kdump.c Fri Aug 8 22:08:51 2014 (r269742) @@ -1011,6 +1011,14 @@ ktrsyscall(struct ktr_syscall *ktr, u_in ip++; narg--; break; + case SYS_shm_open: + print_number(ip, narg, c); + putchar(','); + flagsname(ip[0]); + printf(",0%o", ip[1]); + ip += 3; + narg -= 3; + break; case SYS_minherit: print_number(ip, narg, c); print_number(ip, narg, c);