From owner-svn-src-stable@freebsd.org Sun Mar 27 06:10:52 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4162ADF406; Sun, 27 Mar 2016 06:10:52 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE51D1C22; Sun, 27 Mar 2016 06:10:52 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2R6ApVU005198; Sun, 27 Mar 2016 06:10:51 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2R6Apim004319; Sun, 27 Mar 2016 06:10:51 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201603270610.u2R6Apim004319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 27 Mar 2016 06:10: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: r297300 - in stable/10/sys: amd64/linux32 compat/linux i386/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 06:10:53 -0000 Author: dchagin Date: Sun Mar 27 06:10:51 2016 New Revision: 297300 URL: https://svnweb.freebsd.org/changeset/base/297300 Log: MFC r297061; Implement fstatfs64 system call. PR: 181012 Submitted by: John Wehle Modified: stable/10/sys/amd64/linux32/linux32_dummy.c stable/10/sys/amd64/linux32/syscalls.master stable/10/sys/compat/linux/linux_stats.c stable/10/sys/i386/linux/linux_dummy.c stable/10/sys/i386/linux/syscalls.master Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/10/sys/amd64/linux32/linux32_dummy.c Sun Mar 27 00:37:54 2016 (r297299) +++ stable/10/sys/amd64/linux32/linux32_dummy.c Sun Mar 27 06:10:51 2016 (r297300) @@ -70,7 +70,6 @@ DUMMY(mincore); DUMMY(ptrace); DUMMY(lookup_dcookie); DUMMY(remap_file_pages); -DUMMY(fstatfs64); DUMMY(mbind); DUMMY(get_mempolicy); DUMMY(set_mempolicy); Modified: stable/10/sys/amd64/linux32/syscalls.master ============================================================================== --- stable/10/sys/amd64/linux32/syscalls.master Sun Mar 27 00:37:54 2016 (r297299) +++ stable/10/sys/amd64/linux32/syscalls.master Sun Mar 27 06:10:51 2016 (r297300) @@ -450,7 +450,7 @@ 267 AUE_NULL STD { int linux_clock_nanosleep(clockid_t which, int flags, \ struct l_timespec *rqtp, struct l_timespec *rmtp); } 268 AUE_STATFS STD { int linux_statfs64(char *path, size_t bufsize, struct l_statfs64_buf *buf); } -269 AUE_FSTATFS STD { int linux_fstatfs64(void); } +269 AUE_FSTATFS STD { int linux_fstatfs64(l_uint fd, size_t bufsize, struct l_statfs64_buf *buf); } 270 AUE_NULL STD { int linux_tgkill(int tgid, int pid, int sig); } 271 AUE_UTIMES STD { int linux_utimes(char *fname, \ struct l_timeval *tptr); } Modified: stable/10/sys/compat/linux/linux_stats.c ============================================================================== --- stable/10/sys/compat/linux/linux_stats.c Sun Mar 27 00:37:54 2016 (r297299) +++ stable/10/sys/compat/linux/linux_stats.c Sun Mar 27 06:10:51 2016 (r297300) @@ -459,6 +459,27 @@ linux_statfs64(struct thread *td, struct bsd_to_linux_statfs64(&bsd_statfs, &linux_statfs); return copyout(&linux_statfs, args->buf, sizeof(linux_statfs)); } + +int +linux_fstatfs64(struct thread *td, struct linux_fstatfs64_args *args) +{ + struct l_statfs64 linux_statfs; + struct statfs bsd_statfs; + int error; + +#ifdef DEBUG + if (ldebug(fstatfs64)) + printf(ARGS(fstatfs64, "%d, *"), args->fd); +#endif + if (args->bufsize != sizeof(struct l_statfs64)) + return (EINVAL); + + error = kern_fstatfs(td, args->fd, &bsd_statfs); + if (error) + return error; + bsd_to_linux_statfs64(&bsd_statfs, &linux_statfs); + return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); +} #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ int Modified: stable/10/sys/i386/linux/linux_dummy.c ============================================================================== --- stable/10/sys/i386/linux/linux_dummy.c Sun Mar 27 00:37:54 2016 (r297299) +++ stable/10/sys/i386/linux/linux_dummy.c Sun Mar 27 06:10:51 2016 (r297300) @@ -72,7 +72,6 @@ DUMMY(pivot_root); DUMMY(mincore); DUMMY(lookup_dcookie); DUMMY(remap_file_pages); -DUMMY(fstatfs64); DUMMY(mbind); DUMMY(get_mempolicy); DUMMY(set_mempolicy); Modified: stable/10/sys/i386/linux/syscalls.master ============================================================================== --- stable/10/sys/i386/linux/syscalls.master Sun Mar 27 00:37:54 2016 (r297299) +++ stable/10/sys/i386/linux/syscalls.master Sun Mar 27 06:10:51 2016 (r297300) @@ -452,7 +452,7 @@ 267 AUE_NULL STD { int linux_clock_nanosleep(clockid_t which, int flags, \ struct l_timespec *rqtp, struct l_timespec *rmtp); } 268 AUE_STATFS STD { int linux_statfs64(char *path, size_t bufsize, struct l_statfs64_buf *buf); } -269 AUE_FSTATFS STD { int linux_fstatfs64(void); } +269 AUE_FSTATFS STD { int linux_fstatfs64(l_uint fd, size_t bufsize, struct l_statfs64_buf *buf); } 270 AUE_NULL STD { int linux_tgkill(int tgid, int pid, int sig); } 271 AUE_UTIMES STD { int linux_utimes(char *fname, \ struct l_timeval *tptr); } From owner-svn-src-stable@freebsd.org Sun Mar 27 06:17:22 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04039ADF5AB; Sun, 27 Mar 2016 06:17:22 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA6CA1EF8; Sun, 27 Mar 2016 06:17:21 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2R6HKrw005947; Sun, 27 Mar 2016 06:17:20 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2R6HJrx005937; Sun, 27 Mar 2016 06:17:19 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201603270617.u2R6HJrx005937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 27 Mar 2016 06:17:19 +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: r297301 - in stable/10/sys: amd64/linux32 i386/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 06:17:22 -0000 Author: dchagin Date: Sun Mar 27 06:17:19 2016 New Revision: 297301 URL: https://svnweb.freebsd.org/changeset/base/297301 Log: MFC r297062: Regen for r297061 (fstatfs64 Linux syscall). Modified: stable/10/sys/amd64/linux32/linux32_proto.h stable/10/sys/amd64/linux32/linux32_syscall.h stable/10/sys/amd64/linux32/linux32_syscalls.c stable/10/sys/amd64/linux32/linux32_sysent.c stable/10/sys/amd64/linux32/linux32_systrace_args.c stable/10/sys/i386/linux/linux_proto.h stable/10/sys/i386/linux/linux_syscall.h stable/10/sys/i386/linux/linux_syscalls.c stable/10/sys/i386/linux/linux_sysent.c stable/10/sys/i386/linux/linux_systrace_args.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/linux32/linux32_proto.h ============================================================================== --- stable/10/sys/amd64/linux32/linux32_proto.h Sun Mar 27 06:10:51 2016 (r297300) +++ stable/10/sys/amd64/linux32/linux32_proto.h Sun Mar 27 06:17:19 2016 (r297301) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 294368 2016-01-20 01:09:53Z jhb + * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 297300 2016-03-27 06:10:51Z dchagin */ #ifndef _LINUX32_SYSPROTO_H_ @@ -844,7 +844,9 @@ struct linux_statfs64_args { char buf_l_[PADL_(struct l_statfs64_buf *)]; struct l_statfs64_buf * buf; char buf_r_[PADR_(struct l_statfs64_buf *)]; }; struct linux_fstatfs64_args { - register_t dummy; + char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)]; + char bufsize_l_[PADL_(size_t)]; size_t bufsize; char bufsize_r_[PADR_(size_t)]; + char buf_l_[PADL_(struct l_statfs64_buf *)]; struct l_statfs64_buf * buf; char buf_r_[PADR_(struct l_statfs64_buf *)]; }; struct linux_tgkill_args { char tgid_l_[PADL_(int)]; int tgid; char tgid_r_[PADR_(int)]; Modified: stable/10/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- stable/10/sys/amd64/linux32/linux32_syscall.h Sun Mar 27 06:10:51 2016 (r297300) +++ stable/10/sys/amd64/linux32/linux32_syscall.h Sun Mar 27 06:17:19 2016 (r297301) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 294368 2016-01-20 01:09:53Z jhb + * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 297300 2016-03-27 06:10:51Z dchagin */ #define LINUX32_SYS_linux_exit 1 Modified: stable/10/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- stable/10/sys/amd64/linux32/linux32_syscalls.c Sun Mar 27 06:10:51 2016 (r297300) +++ stable/10/sys/amd64/linux32/linux32_syscalls.c Sun Mar 27 06:17:19 2016 (r297301) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 294368 2016-01-20 01:09:53Z jhb + * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 297300 2016-03-27 06:10:51Z dchagin */ const char *linux32_syscallnames[] = { Modified: stable/10/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- stable/10/sys/amd64/linux32/linux32_sysent.c Sun Mar 27 06:10:51 2016 (r297300) +++ stable/10/sys/amd64/linux32/linux32_sysent.c Sun Mar 27 06:17:19 2016 (r297301) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 294368 2016-01-20 01:09:53Z jhb + * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 297300 2016-03-27 06:10:51Z dchagin */ #include "opt_compat.h" @@ -288,7 +288,7 @@ struct sysent linux32_sysent[] = { { AS(linux_clock_getres_args), (sy_call_t *)linux_clock_getres, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 266 = linux_clock_getres */ { AS(linux_clock_nanosleep_args), (sy_call_t *)linux_clock_nanosleep, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 267 = linux_clock_nanosleep */ { AS(linux_statfs64_args), (sy_call_t *)linux_statfs64, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 268 = linux_statfs64 */ - { 0, (sy_call_t *)linux_fstatfs64, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 269 = linux_fstatfs64 */ + { AS(linux_fstatfs64_args), (sy_call_t *)linux_fstatfs64, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 269 = linux_fstatfs64 */ { AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 270 = linux_tgkill */ { AS(linux_utimes_args), (sy_call_t *)linux_utimes, AUE_UTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 271 = linux_utimes */ { AS(linux_fadvise64_64_args), (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_fadvise64_64 */ Modified: stable/10/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- stable/10/sys/amd64/linux32/linux32_systrace_args.c Sun Mar 27 06:10:51 2016 (r297300) +++ stable/10/sys/amd64/linux32/linux32_systrace_args.c Sun Mar 27 06:17:19 2016 (r297301) @@ -1820,7 +1820,11 @@ systrace_args(int sysnum, void *params, } /* linux_fstatfs64 */ case 269: { - *n_args = 0; + struct linux_fstatfs64_args *p = params; + iarg[0] = p->fd; /* l_uint */ + uarg[1] = p->bufsize; /* size_t */ + uarg[2] = (intptr_t) p->buf; /* struct l_statfs64_buf * */ + *n_args = 3; break; } /* linux_tgkill */ @@ -5118,6 +5122,19 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_fstatfs64 */ case 269: + switch(ndx) { + case 0: + p = "l_uint"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "struct l_statfs64_buf *"; + break; + default: + break; + }; break; /* linux_tgkill */ case 270: @@ -6878,6 +6895,9 @@ systrace_return_setargdesc(int sysnum, i break; /* linux_fstatfs64 */ case 269: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_tgkill */ case 270: if (ndx == 0 || ndx == 1) Modified: stable/10/sys/i386/linux/linux_proto.h ============================================================================== --- stable/10/sys/i386/linux/linux_proto.h Sun Mar 27 06:10:51 2016 (r297300) +++ stable/10/sys/i386/linux/linux_proto.h Sun Mar 27 06:17:19 2016 (r297301) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/i386/linux/syscalls.master 293592 2016-01-09 17:54:37Z dchagin + * created from FreeBSD: stable/10/sys/i386/linux/syscalls.master 297300 2016-03-27 06:10:51Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ @@ -848,7 +848,9 @@ struct linux_statfs64_args { char buf_l_[PADL_(struct l_statfs64_buf *)]; struct l_statfs64_buf * buf; char buf_r_[PADR_(struct l_statfs64_buf *)]; }; struct linux_fstatfs64_args { - register_t dummy; + char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)]; + char bufsize_l_[PADL_(size_t)]; size_t bufsize; char bufsize_r_[PADR_(size_t)]; + char buf_l_[PADL_(struct l_statfs64_buf *)]; struct l_statfs64_buf * buf; char buf_r_[PADR_(struct l_statfs64_buf *)]; }; struct linux_tgkill_args { char tgid_l_[PADL_(int)]; int tgid; char tgid_r_[PADR_(int)]; Modified: stable/10/sys/i386/linux/linux_syscall.h ============================================================================== --- stable/10/sys/i386/linux/linux_syscall.h Sun Mar 27 06:10:51 2016 (r297300) +++ stable/10/sys/i386/linux/linux_syscall.h Sun Mar 27 06:17:19 2016 (r297301) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/i386/linux/syscalls.master 293592 2016-01-09 17:54:37Z dchagin + * created from FreeBSD: stable/10/sys/i386/linux/syscalls.master 297300 2016-03-27 06:10:51Z dchagin */ #define LINUX_SYS_linux_exit 1 Modified: stable/10/sys/i386/linux/linux_syscalls.c ============================================================================== --- stable/10/sys/i386/linux/linux_syscalls.c Sun Mar 27 06:10:51 2016 (r297300) +++ stable/10/sys/i386/linux/linux_syscalls.c Sun Mar 27 06:17:19 2016 (r297301) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/i386/linux/syscalls.master 293592 2016-01-09 17:54:37Z dchagin + * created from FreeBSD: stable/10/sys/i386/linux/syscalls.master 297300 2016-03-27 06:10:51Z dchagin */ const char *linux_syscallnames[] = { Modified: stable/10/sys/i386/linux/linux_sysent.c ============================================================================== --- stable/10/sys/i386/linux/linux_sysent.c Sun Mar 27 06:10:51 2016 (r297300) +++ stable/10/sys/i386/linux/linux_sysent.c Sun Mar 27 06:17:19 2016 (r297301) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/i386/linux/syscalls.master 293592 2016-01-09 17:54:37Z dchagin + * created from FreeBSD: stable/10/sys/i386/linux/syscalls.master 297300 2016-03-27 06:10:51Z dchagin */ #include @@ -287,7 +287,7 @@ struct sysent linux_sysent[] = { { AS(linux_clock_getres_args), (sy_call_t *)linux_clock_getres, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 266 = linux_clock_getres */ { AS(linux_clock_nanosleep_args), (sy_call_t *)linux_clock_nanosleep, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 267 = linux_clock_nanosleep */ { AS(linux_statfs64_args), (sy_call_t *)linux_statfs64, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 268 = linux_statfs64 */ - { 0, (sy_call_t *)linux_fstatfs64, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 269 = linux_fstatfs64 */ + { AS(linux_fstatfs64_args), (sy_call_t *)linux_fstatfs64, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 269 = linux_fstatfs64 */ { AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 270 = linux_tgkill */ { AS(linux_utimes_args), (sy_call_t *)linux_utimes, AUE_UTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 271 = linux_utimes */ { AS(linux_fadvise64_64_args), (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_fadvise64_64 */ Modified: stable/10/sys/i386/linux/linux_systrace_args.c ============================================================================== --- stable/10/sys/i386/linux/linux_systrace_args.c Sun Mar 27 06:10:51 2016 (r297300) +++ stable/10/sys/i386/linux/linux_systrace_args.c Sun Mar 27 06:17:19 2016 (r297301) @@ -1870,7 +1870,11 @@ systrace_args(int sysnum, void *params, } /* linux_fstatfs64 */ case 269: { - *n_args = 0; + struct linux_fstatfs64_args *p = params; + iarg[0] = p->fd; /* l_uint */ + uarg[1] = p->bufsize; /* size_t */ + uarg[2] = (intptr_t) p->buf; /* struct l_statfs64_buf * */ + *n_args = 3; break; } /* linux_tgkill */ @@ -5265,6 +5269,19 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_fstatfs64 */ case 269: + switch(ndx) { + case 0: + p = "l_uint"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "struct l_statfs64_buf *"; + break; + default: + break; + }; break; /* linux_tgkill */ case 270: @@ -7138,6 +7155,9 @@ systrace_return_setargdesc(int sysnum, i break; /* linux_fstatfs64 */ case 269: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_tgkill */ case 270: if (ndx == 0 || ndx == 1) From owner-svn-src-stable@freebsd.org Sun Mar 27 06:21:06 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33CE2ADF730; Sun, 27 Mar 2016 06:21:06 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DEE41114; Sun, 27 Mar 2016 06:21:05 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2R6L5UX008717; Sun, 27 Mar 2016 06:21:05 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2R6L5gF008716; Sun, 27 Mar 2016 06:21:05 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201603270621.u2R6L5gF008716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 27 Mar 2016 06:21:05 +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: r297302 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 06:21:06 -0000 Author: dchagin Date: Sun Mar 27 06:21:05 2016 New Revision: 297302 URL: https://svnweb.freebsd.org/changeset/base/297302 Log: MFC r297063: Whitespaces, style(9) fixes. No functional changes. MFC r297070: Return EOVERFLOW in case when actual statfs values are large enough and not fit into 32 bit fileds of a Linux struct statfs. MFC r297072: Check bsd_to_linux_statfs() return value. Modified: stable/10/sys/compat/linux/linux_stats.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_stats.c ============================================================================== --- stable/10/sys/compat/linux/linux_stats.c Sun Mar 27 06:17:19 2016 (r297301) +++ stable/10/sys/compat/linux/linux_stats.c Sun Mar 27 06:21:05 2016 (r297302) @@ -256,7 +256,7 @@ static int stat_copyout(struct stat *buf, void *ubuf) { struct l_stat lbuf; - + bzero(&lbuf, sizeof(lbuf)); lbuf.st_dev = buf->st_dev; lbuf.st_ino = buf->st_ino; @@ -302,7 +302,7 @@ linux_stat(struct thread *td, struct lin return (error); } LFREEPATH(path); - return(stat_copyout(&buf, args->up)); + return (stat_copyout(&buf, args->up)); } int @@ -324,7 +324,7 @@ linux_lstat(struct thread *td, struct li return (error); } LFREEPATH(path); - return(stat_copyout(&buf, args->up)); + return (stat_copyout(&buf, args->up)); } #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ @@ -380,10 +380,22 @@ bsd_to_linux_ftype(const char *fstypenam return (0L); } -static void +static int bsd_to_linux_statfs(struct statfs *bsd_statfs, struct l_statfs *linux_statfs) { +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) + uint64_t tmp; +#define LINUX_HIBITS 0xffffffff00000000ULL + + tmp = bsd_statfs->f_blocks | bsd_statfs->f_bfree | bsd_statfs->f_files | + bsd_statfs->f_bsize; + if ((bsd_statfs->f_bavail != -1 && (bsd_statfs->f_bavail & LINUX_HIBITS)) || + (bsd_statfs->f_ffree != -1 && (bsd_statfs->f_ffree & LINUX_HIBITS)) || + (tmp & LINUX_HIBITS)) + return (EOVERFLOW); +#undef LINUX_HIBITS +#endif linux_statfs->f_type = bsd_to_linux_ftype(bsd_statfs->f_fstypename); linux_statfs->f_bsize = bsd_statfs->f_bsize; linux_statfs->f_blocks = bsd_statfs->f_blocks; @@ -394,6 +406,8 @@ bsd_to_linux_statfs(struct statfs *bsd_s linux_statfs->f_fsid.val[0] = bsd_statfs->f_fsid.val[0]; linux_statfs->f_fsid.val[1] = bsd_statfs->f_fsid.val[1]; linux_statfs->f_namelen = MAXNAMLEN; + + return (0); } int @@ -414,8 +428,10 @@ linux_statfs(struct thread *td, struct l LFREEPATH(path); if (error) return (error); - bsd_to_linux_statfs(&bsd_statfs, &linux_statfs); - return copyout(&linux_statfs, args->buf, sizeof(linux_statfs)); + error = bsd_to_linux_statfs(&bsd_statfs, &linux_statfs); + if (error) + return (error); + return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); } #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) @@ -457,7 +473,7 @@ linux_statfs64(struct thread *td, struct if (error) return (error); bsd_to_linux_statfs64(&bsd_statfs, &linux_statfs); - return copyout(&linux_statfs, args->buf, sizeof(linux_statfs)); + return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); } int @@ -495,9 +511,11 @@ linux_fstatfs(struct thread *td, struct #endif error = kern_fstatfs(td, args->fd, &bsd_statfs); if (error) - return error; - bsd_to_linux_statfs(&bsd_statfs, &linux_statfs); - return copyout(&linux_statfs, args->buf, sizeof(linux_statfs)); + return (error); + error = bsd_to_linux_statfs(&bsd_statfs, &linux_statfs); + if (error) + return (error); + return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); } struct l_ustat From owner-svn-src-stable@freebsd.org Sun Mar 27 06:43:06 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE2E0ADFC15; Sun, 27 Mar 2016 06:43:06 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEF081C71; Sun, 27 Mar 2016 06:43:06 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2R6h5OS014779; Sun, 27 Mar 2016 06:43:05 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2R6h5cv014778; Sun, 27 Mar 2016 06:43:05 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201603270643.u2R6h5cv014778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 27 Mar 2016 06:43:05 +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: r297303 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 06:43:07 -0000 Author: dchagin Date: Sun Mar 27 06:43:05 2016 New Revision: 297303 URL: https://svnweb.freebsd.org/changeset/base/297303 Log: MFC r296503, r296504: Linux accept() system call return EOPNOTSUPP errno instead of EINVAL for UDP sockets. Modified: stable/10/sys/compat/linux/linux_socket.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_socket.c ============================================================================== --- stable/10/sys/compat/linux/linux_socket.c Sun Mar 27 06:21:05 2016 (r297302) +++ stable/10/sys/compat/linux/linux_socket.c Sun Mar 27 06:43:05 2016 (r297303) @@ -838,7 +838,10 @@ linux_accept_common(struct thread *td, i socklen_t * __restrict anamelen; int flags; } */ bsd_args; - int error; + cap_rights_t rights; + struct socket *so; + struct file *fp; + int error, error1; bsd_args.s = s; /* XXX: */ @@ -853,6 +856,17 @@ linux_accept_common(struct thread *td, i if (error) { if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) return (EINVAL); + if (error == EINVAL) { + error1 = getsock_cap(td, s, &rights, &fp, NULL); + if (error1 != 0) + return (error1); + so = fp->f_data; + if (so->so_type == SOCK_DGRAM) { + fdrop(fp, td); + return (EOPNOTSUPP); + } + fdrop(fp, td); + } return (error); } if (addr) From owner-svn-src-stable@freebsd.org Sun Mar 27 06:52:41 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69139ADFD8F; Sun, 27 Mar 2016 06:52:41 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12D04102B; Sun, 27 Mar 2016 06:52:41 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2R6qe4N017950; Sun, 27 Mar 2016 06:52:40 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2R6qegd017949; Sun, 27 Mar 2016 06:52:40 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201603270652.u2R6qegd017949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 27 Mar 2016 06:52:40 +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: r297304 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 06:52:41 -0000 Author: dchagin Date: Sun Mar 27 06:52:40 2016 New Revision: 297304 URL: https://svnweb.freebsd.org/changeset/base/297304 Log: MFC r296502, r296543, r296546, r297060: 1. Limit secs to INT32_MAX / 2 to avoid errors from kern_setitimer(). Assert that kern_setitimer() returns 0. Remove bogus cast of secs. Fix style(9) issues. 2. Increment the return value if the remaining tv_usec value more than 500000 as a Linux does. Modified: stable/10/sys/compat/linux/linux_misc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_misc.c ============================================================================== --- stable/10/sys/compat/linux/linux_misc.c Sun Mar 27 06:43:05 2016 (r297303) +++ stable/10/sys/compat/linux/linux_misc.c Sun Mar 27 06:52:40 2016 (r297304) @@ -198,24 +198,27 @@ linux_alarm(struct thread *td, struct li if (ldebug(alarm)) printf(ARGS(alarm, "%u"), args->secs); #endif - secs = args->secs; + /* + * Linux alarm() is always successfull. Limit secs to INT32_MAX / 2 + * to match kern_setitimer()'s limit to avoid error from it. + * + * XXX. Linux limit secs to INT_MAX on 32 and does not limit on 64-bit + * platforms. + */ + if (secs > INT32_MAX / 2) + secs = INT32_MAX / 2; - if (secs > INT_MAX) - secs = INT_MAX; - - it.it_value.tv_sec = (long) secs; + it.it_value.tv_sec = secs; it.it_value.tv_usec = 0; - it.it_interval.tv_sec = 0; - it.it_interval.tv_usec = 0; + timevalclear(&it.it_interval); error = kern_setitimer(td, ITIMER_REAL, &it, &old_it); - if (error) - return (error); - if (timevalisset(&old_it.it_value)) { - if (old_it.it_value.tv_usec != 0) - old_it.it_value.tv_sec++; - td->td_retval[0] = old_it.it_value.tv_sec; - } + KASSERT(error == 0, ("kern_setitimer returns %d", error)); + + if ((old_it.it_value.tv_sec == 0 && old_it.it_value.tv_usec > 0) || + old_it.it_value.tv_usec >= 500000) + old_it.it_value.tv_sec++; + td->td_retval[0] = old_it.it_value.tv_sec; return (0); } From owner-svn-src-stable@freebsd.org Sun Mar 27 06:55:50 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2F3EADFE12; Sun, 27 Mar 2016 06:55:50 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A10501203; Sun, 27 Mar 2016 06:55:50 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2R6tnE1018143; Sun, 27 Mar 2016 06:55:49 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2R6tnTm018142; Sun, 27 Mar 2016 06:55:49 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201603270655.u2R6tnTm018142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 27 Mar 2016 06:55:49 +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: r297305 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 06:55:50 -0000 Author: dchagin Date: Sun Mar 27 06:55:49 2016 New Revision: 297305 URL: https://svnweb.freebsd.org/changeset/base/297305 Log: MFC r296501: Link the newly created process to the corresponding parent as if CLONE_PARENT is set, then the parent of the new process will be the same as that of the calling process. Modified: stable/10/sys/compat/linux/linux_fork.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_fork.c ============================================================================== --- stable/10/sys/compat/linux/linux_fork.c Sun Mar 27 06:52:40 2016 (r297304) +++ stable/10/sys/compat/linux/linux_fork.c Sun Mar 27 06:55:49 2016 (r297305) @@ -213,6 +213,18 @@ linux_clone_proc(struct thread *td, stru if (args->flags & LINUX_CLONE_SETTLS) linux_set_cloned_tls(td2, args->tls); + /* + * If CLONE_PARENT is set, then the parent of the new process will be + * the same as that of the calling process. + */ + if (args->flags & LINUX_CLONE_PARENT) { + sx_xlock(&proctree_lock); + PROC_LOCK(p2); + proc_reparent(p2, td->td_proc->p_pptr); + PROC_UNLOCK(p2); + sx_xunlock(&proctree_lock); + } + #ifdef DEBUG if (ldebug(clone)) printf(LMSG("clone: successful rfork to %d, " From owner-svn-src-stable@freebsd.org Sun Mar 27 07:34:43 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7874EADF5F8; Sun, 27 Mar 2016 07:34:43 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B0211489; Sun, 27 Mar 2016 07:34:43 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2R7Yg8V030487; Sun, 27 Mar 2016 07:34:42 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2R7Yg8l030486; Sun, 27 Mar 2016 07:34:42 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201603270734.u2R7Yg8l030486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 27 Mar 2016 07:34:42 +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: r297306 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 07:34:43 -0000 Author: dchagin Date: Sun Mar 27 07:34:42 2016 New Revision: 297306 URL: https://svnweb.freebsd.org/changeset/base/297306 Log: Revert r297303. Modified: stable/10/sys/compat/linux/linux_socket.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_socket.c ============================================================================== --- stable/10/sys/compat/linux/linux_socket.c Sun Mar 27 06:55:49 2016 (r297305) +++ stable/10/sys/compat/linux/linux_socket.c Sun Mar 27 07:34:42 2016 (r297306) @@ -838,10 +838,7 @@ linux_accept_common(struct thread *td, i socklen_t * __restrict anamelen; int flags; } */ bsd_args; - cap_rights_t rights; - struct socket *so; - struct file *fp; - int error, error1; + int error; bsd_args.s = s; /* XXX: */ @@ -856,17 +853,6 @@ linux_accept_common(struct thread *td, i if (error) { if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) return (EINVAL); - if (error == EINVAL) { - error1 = getsock_cap(td, s, &rights, &fp, NULL); - if (error1 != 0) - return (error1); - so = fp->f_data; - if (so->so_type == SOCK_DGRAM) { - fdrop(fp, td); - return (EOPNOTSUPP); - } - fdrop(fp, td); - } return (error); } if (addr) From owner-svn-src-stable@freebsd.org Sun Mar 27 08:00:52 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 685EFADFCA3; Sun, 27 Mar 2016 08:00:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AA541138; Sun, 27 Mar 2016 08:00:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2R80pmM037276; Sun, 27 Mar 2016 08:00:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2R80puL037275; Sun, 27 Mar 2016 08:00:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201603270800.u2R80puL037275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 27 Mar 2016 08:00: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: r297307 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 08:00:52 -0000 Author: kib Date: Sun Mar 27 08:00:51 2016 New Revision: 297307 URL: https://svnweb.freebsd.org/changeset/base/297307 Log: MFC r297206: Fix locking mistake in softdep_waitidle(). Modified: stable/10/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Sun Mar 27 07:34:42 2016 (r297306) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Sun Mar 27 08:00:51 2016 (r297307) @@ -1937,9 +1937,9 @@ softdep_waitidle(struct mount *mp, int f vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(devvp, MNT_WAIT, td); VOP_UNLOCK(devvp, 0); + ACQUIRE_LOCK(ump); if (error != 0) break; - ACQUIRE_LOCK(ump); } ump->softdep_req = 0; if (i == SU_WAITIDLE_RETRIES && error == 0 && ump->softdep_deps != 0) { From owner-svn-src-stable@freebsd.org Sun Mar 27 19:42:44 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 325FDADFBF2; Sun, 27 Mar 2016 19:42:44 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE4781634; Sun, 27 Mar 2016 19:42:43 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2RJgh4m054089; Sun, 27 Mar 2016 19:42:43 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2RJghDG054088; Sun, 27 Mar 2016 19:42:43 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201603271942.u2RJghDG054088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 27 Mar 2016 19:42:43 +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: r297319 - stable/10/lib/libc/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 19:42:44 -0000 Author: pfg Date: Sun Mar 27 19:42:42 2016 New Revision: 297319 URL: https://svnweb.freebsd.org/changeset/base/297319 Log: MFC r296095: rpc: fix failure to clear string by passing the wrong size to memset. Noted by NetBSD's PR/21014 Obtained from: NetBSD (CVS Rev. 1.24, 1.25) Modified: stable/10/lib/libc/rpc/svc_simple.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/rpc/svc_simple.c ============================================================================== --- stable/10/lib/libc/rpc/svc_simple.c Sun Mar 27 18:26:59 2016 (r297318) +++ stable/10/lib/libc/rpc/svc_simple.c Sun Mar 27 19:42:42 2016 (r297319) @@ -272,7 +272,7 @@ universal(rqstp, transp) /* decode arguments into a CLEAN buffer */ xdrbuf = pl->p_xdrbuf; /* Zero the arguments: reqd ! */ - (void) memset(xdrbuf, 0, sizeof (pl->p_recvsz)); + (void) memset(xdrbuf, 0, (size_t)pl->p_recvsz); /* * Assuming that sizeof (xdrbuf) would be enough * for the arguments; if not then the program From owner-svn-src-stable@freebsd.org Sun Mar 27 19:43:27 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B00CAADFC65; Sun, 27 Mar 2016 19:43:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81F7D17C8; Sun, 27 Mar 2016 19:43:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2RJhQnp054159; Sun, 27 Mar 2016 19:43:26 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2RJhQYj054158; Sun, 27 Mar 2016 19:43:26 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201603271943.u2RJhQYj054158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 27 Mar 2016 19:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r297320 - stable/9/lib/libc/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 19:43:27 -0000 Author: pfg Date: Sun Mar 27 19:43:26 2016 New Revision: 297320 URL: https://svnweb.freebsd.org/changeset/base/297320 Log: MFC r296095: rpc: fix failure to clear string by passing the wrong size to memset. Noted by NetBSD's PR/21014 Obtained from: NetBSD (CVS Rev. 1.24, 1.25) Modified: stable/9/lib/libc/rpc/svc_simple.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/svc_simple.c ============================================================================== --- stable/9/lib/libc/rpc/svc_simple.c Sun Mar 27 19:42:42 2016 (r297319) +++ stable/9/lib/libc/rpc/svc_simple.c Sun Mar 27 19:43:26 2016 (r297320) @@ -272,7 +272,7 @@ universal(rqstp, transp) /* decode arguments into a CLEAN buffer */ xdrbuf = pl->p_xdrbuf; /* Zero the arguments: reqd ! */ - (void) memset(xdrbuf, 0, sizeof (pl->p_recvsz)); + (void) memset(xdrbuf, 0, (size_t)pl->p_recvsz); /* * Assuming that sizeof (xdrbuf) would be enough * for the arguments; if not then the program From owner-svn-src-stable@freebsd.org Mon Mar 28 09:18:20 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B61FADF381; Mon, 28 Mar 2016 09:18:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D954A195D; Mon, 28 Mar 2016 09:18:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2S9IJPC099036; Mon, 28 Mar 2016 09:18:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2S9IJ8V099035; Mon, 28 Mar 2016 09:18:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603280918.u2S9IJ8V099035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 28 Mar 2016 09:18:19 +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: r297338 - stable/10/sbin/mdmfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 09:18:20 -0000 Author: mav Date: Mon Mar 28 09:18:18 2016 New Revision: 297338 URL: https://svnweb.freebsd.org/changeset/base/297338 Log: MFC r296449: Update meaning of -n argument. Modified: stable/10/sbin/mdmfs/mdmfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mdmfs/mdmfs.8 ============================================================================== --- stable/10/sbin/mdmfs/mdmfs.8 Mon Mar 28 08:12:29 2016 (r297337) +++ stable/10/sbin/mdmfs/mdmfs.8 Mon Mar 28 09:18:18 2016 (r297338) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 4, 2011 +.Dd March 7, 2016 .Dt MDMFS 8 .Os .Sh NAME @@ -36,7 +36,7 @@ driver .Sh SYNOPSIS .Nm -.Op Fl DLlMNPStUX +.Op Fl DLlMNnPStUX .Op Fl a Ar maxcontig .Op Fl b Ar block-size .Op Fl c Ar blocks-per-cylinder-group @@ -47,7 +47,6 @@ driver .Op Fl f Ar frag-size .Op Fl i Ar bytes .Op Fl m Ar percent-free -.Op Fl n Ar rotational-positions .Op Fl O Ar optimization .Op Fl o Ar mount-options .Op Fl p Ar permissions @@ -167,8 +166,10 @@ The percentage of space reserved for the Do not actually run the helper programs. This is most useful in conjunction with .Fl X . -.It Fl n Ar rotational-positions -The default number of rotational positions to distinguish. +.It Fl n +Do not create a +.Pa .snap +directory on the new file system. .It Fl O Ar optimization Select the optimization preference; valid choices are From owner-svn-src-stable@freebsd.org Mon Mar 28 09:24:49 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CE71ADF55A; Mon, 28 Mar 2016 09:24:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E23B71D65; Mon, 28 Mar 2016 09:24:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2S9Ompq002046; Mon, 28 Mar 2016 09:24:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2S9Omgf002045; Mon, 28 Mar 2016 09:24:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603280924.u2S9Omgf002045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 28 Mar 2016 09:24:48 +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: r297339 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 09:24:49 -0000 Author: mav Date: Mon Mar 28 09:24:47 2016 New Revision: 297339 URL: https://svnweb.freebsd.org/changeset/base/297339 Log: MFC r275137 (by adrian): Add PCI ID for Intel Lynx Point LP controller. PR: kern/195398 Modified: stable/10/sys/dev/usb/controller/ehci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci_pci.c Mon Mar 28 09:18:18 2016 (r297338) +++ stable/10/sys/dev/usb/controller/ehci_pci.c Mon Mar 28 09:24:47 2016 (r297339) @@ -168,6 +168,8 @@ ehci_pci_match(device_t self) return ("Intel Wildcat Point USB 2.0 controller USB-A"); case 0x8cad8086: return ("Intel Wildcat Point USB 2.0 controller USB-B"); + case 0x9c268086: + return ("Intel Lynx Point LP USB 2.0 controller USB"); case 0x00e01033: return ("NEC uPD 720100 USB 2.0 controller"); From owner-svn-src-stable@freebsd.org Mon Mar 28 09:26:02 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12EC3ADF607; Mon, 28 Mar 2016 09:26:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D86051F08; Mon, 28 Mar 2016 09:26:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2S9Q1Tv002172; Mon, 28 Mar 2016 09:26:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2S9Q1CP002171; Mon, 28 Mar 2016 09:26:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603280926.u2S9Q1CP002171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 28 Mar 2016 09:26:01 +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: r297340 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 09:26:02 -0000 Author: mav Date: Mon Mar 28 09:26:00 2016 New Revision: 297340 URL: https://svnweb.freebsd.org/changeset/base/297340 Log: MFC r295463 (by hselasky): Correct PCI device description. Modified: stable/10/sys/dev/usb/controller/ehci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci_pci.c Mon Mar 28 09:24:47 2016 (r297339) +++ stable/10/sys/dev/usb/controller/ehci_pci.c Mon Mar 28 09:26:00 2016 (r297340) @@ -172,7 +172,7 @@ ehci_pci_match(device_t self) return ("Intel Lynx Point LP USB 2.0 controller USB"); case 0x00e01033: - return ("NEC uPD 720100 USB 2.0 controller"); + return ("NEC uPD 72010x USB 2.0 controller"); case 0x006810de: return "NVIDIA nForce2 USB 2.0 controller"; From owner-svn-src-stable@freebsd.org Mon Mar 28 09:26:45 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9E8FADF6D4; Mon, 28 Mar 2016 09:26:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB9F61148; Mon, 28 Mar 2016 09:26:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2S9Qi1r002249; Mon, 28 Mar 2016 09:26:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2S9QioF002247; Mon, 28 Mar 2016 09:26:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603280926.u2S9QioF002247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 28 Mar 2016 09:26:44 +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: r297341 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 09:26:46 -0000 Author: mav Date: Mon Mar 28 09:26:44 2016 New Revision: 297341 URL: https://svnweb.freebsd.org/changeset/base/297341 Log: MFC r297049: Add IDs for Intel Wellsburg USB controllers. Modified: stable/10/sys/dev/usb/controller/ehci_pci.c stable/10/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci_pci.c Mon Mar 28 09:26:00 2016 (r297340) +++ stable/10/sys/dev/usb/controller/ehci_pci.c Mon Mar 28 09:26:44 2016 (r297341) @@ -168,6 +168,10 @@ ehci_pci_match(device_t self) return ("Intel Wildcat Point USB 2.0 controller USB-A"); case 0x8cad8086: return ("Intel Wildcat Point USB 2.0 controller USB-B"); + case 0x8d268086: + return ("Intel Wellsburg USB 2.0 controller"); + case 0x8d2d8086: + return ("Intel Wellsburg USB 2.0 controller"); case 0x9c268086: return ("Intel Lynx Point LP USB 2.0 controller USB"); Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Mon Mar 28 09:26:00 2016 (r297340) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Mon Mar 28 09:26:44 2016 (r297341) @@ -115,6 +115,8 @@ xhci_pci_match(device_t self) return ("Intel Lynx Point USB 3.0 controller"); case 0x8cb18086: return ("Intel Wildcat Point USB 3.0 controller"); + case 0x8d318086: + return ("Intel Wellsburg USB 3.0 controller"); case 0x9cb18086: return ("Broadwell Integrated PCH-LP chipset USB 3.0 controller"); From owner-svn-src-stable@freebsd.org Mon Mar 28 09:28:02 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E814ADF77B; Mon, 28 Mar 2016 09:28:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B8EF12AB; Mon, 28 Mar 2016 09:28:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2S9S1bq002350; Mon, 28 Mar 2016 09:28:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2S9S1Tp002349; Mon, 28 Mar 2016 09:28:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603280928.u2S9S1Tp002349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 28 Mar 2016 09:28:01 +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: r297342 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 09:28:02 -0000 Author: mav Date: Mon Mar 28 09:28:01 2016 New Revision: 297342 URL: https://svnweb.freebsd.org/changeset/base/297342 Log: MFC r297051: Fix incorrect (fortunately bigger) malloc size. Modified: stable/10/sys/rpc/svc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Mon Mar 28 09:26:44 2016 (r297341) +++ stable/10/sys/rpc/svc.c Mon Mar 28 09:28:01 2016 (r297342) @@ -560,7 +560,7 @@ svc_loss_reg(SVCXPRT *xprt, void (*dispa mtx_unlock(&pool->sp_lock); return (TRUE); } - s = malloc(sizeof (struct svc_callout), M_RPC, M_NOWAIT); + s = malloc(sizeof(struct svc_loss_callout), M_RPC, M_NOWAIT); if (s == NULL) { mtx_unlock(&pool->sp_lock); return (FALSE); From owner-svn-src-stable@freebsd.org Mon Mar 28 09:29:15 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B8EBADF804; Mon, 28 Mar 2016 09:29:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D6961446; Mon, 28 Mar 2016 09:29:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2S9TEBH002451; Mon, 28 Mar 2016 09:29:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2S9TEQ2002450; Mon, 28 Mar 2016 09:29:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603280929.u2S9TEQ2002450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 28 Mar 2016 09:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r297343 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 09:29:15 -0000 Author: mav Date: Mon Mar 28 09:29:14 2016 New Revision: 297343 URL: https://svnweb.freebsd.org/changeset/base/297343 Log: MFC r297051: Fix incorrect (fortunately bigger) malloc size. Modified: stable/9/sys/rpc/svc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc.c ============================================================================== --- stable/9/sys/rpc/svc.c Mon Mar 28 09:28:01 2016 (r297342) +++ stable/9/sys/rpc/svc.c Mon Mar 28 09:29:14 2016 (r297343) @@ -559,7 +559,7 @@ svc_loss_reg(SVCXPRT *xprt, void (*dispa mtx_unlock(&pool->sp_lock); return (TRUE); } - s = malloc(sizeof (struct svc_callout), M_RPC, M_NOWAIT); + s = malloc(sizeof(struct svc_loss_callout), M_RPC, M_NOWAIT); if (s == NULL) { mtx_unlock(&pool->sp_lock); return (FALSE); From owner-svn-src-stable@freebsd.org Mon Mar 28 09:34:16 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DDBDADFB2A; Mon, 28 Mar 2016 09:34:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0F9E18D3; Mon, 28 Mar 2016 09:34:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2S9YF5k005308; Mon, 28 Mar 2016 09:34:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2S9YFkQ005307; Mon, 28 Mar 2016 09:34:15 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603280934.u2S9YFkQ005307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 28 Mar 2016 09:34:15 +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: r297344 - stable/10/usr.sbin/pc-sysinstall/backend-query X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 09:34:16 -0000 Author: mav Date: Mon Mar 28 09:34:14 2016 New Revision: 297344 URL: https://svnweb.freebsd.org/changeset/base/297344 Log: MFC r296654: Use `geom disk list` instead `camcontrol identify`. The new way works for almost any disk, while the old only for ATA. Modified: stable/10/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pc-sysinstall/backend-query/disk-list.sh ============================================================================== --- stable/10/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Mon Mar 28 09:29:14 2016 (r297343) +++ stable/10/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Mon Mar 28 09:34:14 2016 (r297344) @@ -82,8 +82,8 @@ do esac fi - # Try and find some identification information with camcontrol - NEWLINE=$(camcontrol identify $DEV 2>/dev/null | sed -ne 's/^device model *//p') + # Try and get some identification information from GEOM + NEWLINE=$(geom disk list $DEV 2>/dev/null | sed -ne 's/^ descr: *//p') if [ -z "$NEWLINE" ]; then NEWLINE=" " fi From owner-svn-src-stable@freebsd.org Mon Mar 28 09:35:30 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E7B5ADFC17; Mon, 28 Mar 2016 09:35:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 357511BAC; Mon, 28 Mar 2016 09:35:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2S9ZTSj005408; Mon, 28 Mar 2016 09:35:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2S9ZTll005407; Mon, 28 Mar 2016 09:35:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603280935.u2S9ZTll005407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 28 Mar 2016 09:35:29 +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: r297345 - stable/10/usr.sbin/pc-sysinstall/backend X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 09:35:30 -0000 Author: mav Date: Mon Mar 28 09:35:29 2016 New Revision: 297345 URL: https://svnweb.freebsd.org/changeset/base/297345 Log: MFC r296655, r296673, r296776: Unify and improve metadata wiping. Modified: stable/10/usr.sbin/pc-sysinstall/backend/functions-disk.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- stable/10/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Mar 28 09:34:14 2016 (r297344) +++ stable/10/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Mar 28 09:35:29 2016 (r297345) @@ -257,12 +257,7 @@ delete_all_gpart() # Destroy the disk geom rc_nohalt "gpart destroy ${DISK}" - # Make sure we clear any hidden gpt tables - clear_backup_gpt_table "${DISK}" - - # Wipe out front of disk - rc_nohalt "dd if=/dev/zero of=${DISK} count=3000" - + wipe_metadata "${DISK}" }; # Function to export all zpools before starting an install @@ -292,7 +287,7 @@ stop_all_gmirror() then echo_log "Stopping mirror $gprov $DISK" rc_nohalt "gmirror remove $gprov $DISK" - rc_nohalt "dd if=/dev/zero of=/dev/${DISK} count=4096" + wipe_metadata "${DISK}" fi done }; @@ -611,12 +606,17 @@ stop_gjournal() } ; -# Function to wipe the potential backup gpt table from a disk -clear_backup_gpt_table() +# Function to wipe the potential metadata from a disk +wipe_metadata() { - echo_log "Clearing gpt backup table location on disk" - rc_nohalt "dd if=/dev/zero of=${1} bs=1m count=1" - rc_nohalt "dd if=/dev/zero of=${1} bs=1m oseek=`diskinfo ${1} | awk '{print int($3 / (1024*1024)) - 4;}'`" + echo_log "Wiping possible metadata on ${1}" + local SIZE="`diskinfo ${1} | awk '{print int($3/(1024*1024)) }'`" + if [ "$SIZE" -gt "5" ] ; then + rc_halt "dd if=/dev/zero of=${1} bs=1m count=1" + rc_nohalt "dd if=/dev/zero of=${1} bs=1m oseek=$((SIZE-4))" + else + rc_nohalt "dd if=/dev/zero of=${1} bs=128k" + fi } ; # Function which runs gpart and creates a single large APM partition scheme @@ -696,8 +696,7 @@ init_mbr_full_disk() rc_halt "gpart add -a 4k -t freebsd -i 1 ${_intDISK}" sleep 2 - echo_log "Cleaning up ${_intDISK}s1" - rc_halt "dd if=/dev/zero of=${_intDISK}s1 count=1024" + wipe_metadata "${_intDISK}s1" # Make the partition active rc_halt "gpart set -a active -i 1 ${_intDISK}" @@ -770,9 +769,7 @@ run_gpart_gpt_part() rc_halt "gpart modify -t freebsd -i ${slicenum} ${DISK}" sleep 2 - # Clean up old partition - echo_log "Cleaning up $slice" - rc_halt "dd if=/dev/zero of=${DISK}p${slicenum} count=1024" + wipe_metadata "${slice}" sleep 4 @@ -830,9 +827,7 @@ run_gpart_slice() rc_halt "gpart modify -t freebsd -i ${slicenum} ${DISK}" sleep 2 - # Clean up old partition - echo_log "Cleaning up $slice" - rc_halt "dd if=/dev/zero of=${DISK}s${slicenum} count=1024" + wipe_metadata "${slice}" sleep 1 @@ -883,9 +878,8 @@ run_gpart_free() echo_log "Running gpart on ${DISK}" rc_halt "gpart add -a 4k -t freebsd -i ${slicenum} ${DISK}" sleep 2 - - echo_log "Cleaning up $slice" - rc_halt "dd if=/dev/zero of=${slice} count=1024" + + wipe_metadata "${slice}" sleep 1 From owner-svn-src-stable@freebsd.org Mon Mar 28 09:36:53 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44118ADFCDB; Mon, 28 Mar 2016 09:36:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 162411D37; Mon, 28 Mar 2016 09:36:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2S9aqVG005505; Mon, 28 Mar 2016 09:36:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2S9aqXU005504; Mon, 28 Mar 2016 09:36:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603280936.u2S9aqXU005504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 28 Mar 2016 09:36:52 +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: r297346 - stable/10/usr.sbin/pc-sysinstall/backend X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 09:36:53 -0000 Author: mav Date: Mon Mar 28 09:36:52 2016 New Revision: 297346 URL: https://svnweb.freebsd.org/changeset/base/297346 Log: MFC r296656: Don't bother to invoke gmirror or zpool if the module is not loaded. Modified: stable/10/usr.sbin/pc-sysinstall/backend/functions-disk.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- stable/10/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Mar 28 09:35:29 2016 (r297345) +++ stable/10/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Mar 28 09:36:52 2016 (r297346) @@ -263,6 +263,9 @@ delete_all_gpart() # Function to export all zpools before starting an install stop_all_zfs() { + if [ ! -c /dev/zfs ]; then + return; + fi local DISK="`echo ${1} | sed 's|/dev/||g'`" # Export any zpools using this device so we can overwrite @@ -278,6 +281,9 @@ stop_all_zfs() # Function which stops all gmirrors before doing any disk manipulation stop_all_gmirror() { + if [ ! -d /dev/mirror ]; then + return; + fi local DISK="`echo ${1} | sed 's|/dev/||g'`" GPROV="`gmirror list | grep ". Name: mirror/" | cut -d '/' -f 2`" for gprov in $GPROV From owner-svn-src-stable@freebsd.org Mon Mar 28 16:21:47 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FE94AE0B43; Mon, 28 Mar 2016 16:21:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B63EA19B5; Mon, 28 Mar 2016 16:21:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2SGLj0K028360; Mon, 28 Mar 2016 16:21:45 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2SGLjgh028359; Mon, 28 Mar 2016 16:21:45 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201603281621.u2SGLjgh028359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 28 Mar 2016 16:21:45 +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: r297352 - stable/10/usr.bin/script X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 16:21:47 -0000 Author: bdrewery Date: Mon Mar 28 16:21:45 2016 New Revision: 297352 URL: https://svnweb.freebsd.org/changeset/base/297352 Log: MFC r296526: Record command exit status in the typescript file when running simple commands. Relnotes: yes Modified: stable/10/usr.bin/script/script.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/script/script.c ============================================================================== --- stable/10/usr.bin/script/script.c Mon Mar 28 15:05:00 2016 (r297351) +++ stable/10/usr.bin/script/script.c Mon Mar 28 16:21:45 2016 (r297352) @@ -74,7 +74,7 @@ static int child; static const char *fname; static char *fmfname; static int fflg, qflg, ttyflg; -static int usesleep, rawout; +static int usesleep, rawout, showexit; static struct termios tt; @@ -107,6 +107,7 @@ main(int argc, char *argv[]) flushtime = 30; fm_fd = -1; /* Shut up stupid "may be used uninitialized" GCC warning. (not needed w/clang) */ + showexit = 0; while ((ch = getopt(argc, argv, "adfkpqrt:")) != -1) switch(ch) { @@ -195,7 +196,8 @@ main(int argc, char *argv[]) (void)fprintf(fscript, "Script started on %s", ctime(&tvec)); if (argv[0]) { - fprintf(fscript, "command: "); + showexit = 1; + fprintf(fscript, "Command: "); for (k = 0 ; argv[k] ; ++k) fprintf(fscript, "%s%s", k ? " " : "", argv[k]); @@ -355,9 +357,13 @@ done(int eno) if (rawout) record(fscript, NULL, 0, 'e'); if (!qflg) { - if (!rawout) + if (!rawout) { + if (showexit) + (void)fprintf(fscript, "\nCommand exit status:" + " %d", eno); (void)fprintf(fscript,"\nScript done on %s", ctime(&tvec)); + } (void)printf("\nScript done, output file is %s\n", fname); if (fflg) { (void)printf("Filemon done, output file is %s\n", From owner-svn-src-stable@freebsd.org Mon Mar 28 16:24:11 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3F89AE0E0C; Mon, 28 Mar 2016 16:24:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ABA11F04; Mon, 28 Mar 2016 16:24:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2SGOAdO030830; Mon, 28 Mar 2016 16:24:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2SGOAvW030829; Mon, 28 Mar 2016 16:24:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201603281624.u2SGOAvW030829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 28 Mar 2016 16:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r297353 - stable/9/usr.bin/script X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 16:24:11 -0000 Author: bdrewery Date: Mon Mar 28 16:24:10 2016 New Revision: 297353 URL: https://svnweb.freebsd.org/changeset/base/297353 Log: MFC r296526: Record command exit status in the typescript file when running simple commands. Relnotes: yes Modified: stable/9/usr.bin/script/script.c Directory Properties: stable/9/usr.bin/script/ (props changed) Modified: stable/9/usr.bin/script/script.c ============================================================================== --- stable/9/usr.bin/script/script.c Mon Mar 28 16:21:45 2016 (r297352) +++ stable/9/usr.bin/script/script.c Mon Mar 28 16:24:10 2016 (r297353) @@ -74,7 +74,7 @@ static int child; static const char *fname; static char *fmfname; static int fflg, qflg, ttyflg; -static int usesleep, rawout; +static int usesleep, rawout, showexit; static struct termios tt; @@ -108,6 +108,7 @@ main(int argc, char *argv[]) flushtime = 30; fm_fd = -1; /* Shut up stupid "may be used uninitialized" GCC warning. (not needed w/clang) */ + showexit = 0; while ((ch = getopt(argc, argv, "adfkpqrt:")) != -1) switch(ch) { @@ -196,7 +197,8 @@ main(int argc, char *argv[]) (void)fprintf(fscript, "Script started on %s", ctime(&tvec)); if (argv[0]) { - fprintf(fscript, "command: "); + showexit = 1; + fprintf(fscript, "Command: "); for (k = 0 ; argv[k] ; ++k) fprintf(fscript, "%s%s", k ? " " : "", argv[k]); @@ -357,9 +359,13 @@ done(int eno) if (rawout) record(fscript, NULL, 0, 'e'); if (!qflg) { - if (!rawout) + if (!rawout) { + if (showexit) + (void)fprintf(fscript, "\nCommand exit status:" + " %d", eno); (void)fprintf(fscript,"\nScript done on %s", ctime(&tvec)); + } (void)printf("\nScript done, output file is %s\n", fname); if (fflg) { (void)printf("Filemon done, output file is %s\n", From owner-svn-src-stable@freebsd.org Mon Mar 28 16:25:08 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAF88AE0EF9; Mon, 28 Mar 2016 16:25:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABB211159; Mon, 28 Mar 2016 16:25:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2SGP7JH031039; Mon, 28 Mar 2016 16:25:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2SGP7Jv031037; Mon, 28 Mar 2016 16:25:07 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201603281625.u2SGP7Jv031037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 28 Mar 2016 16:25:07 +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: r297354 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2016 16:25:09 -0000 Author: bdrewery Date: Mon Mar 28 16:25:07 2016 New Revision: 297354 URL: https://svnweb.freebsd.org/changeset/base/297354 Log: MFC r296585: These group names may be used as a cookie, so replace any non-fs-safe characters. Modified: stable/10/share/mk/bsd.files.mk stable/10/share/mk/bsd.incs.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.files.mk ============================================================================== --- stable/10/share/mk/bsd.files.mk Mon Mar 28 16:24:10 2016 (r297353) +++ stable/10/share/mk/bsd.files.mk Mon Mar 28 16:25:07 2016 (r297354) @@ -9,13 +9,15 @@ ____: FILESGROUPS?= FILES -.for group in ${FILESGROUPS} +_FILESGROUPS= ${FILESGROUPS:C,[/*],_,g} + +.for group in ${_FILESGROUPS} buildfiles: ${${group}} .endfor all: buildfiles -.for group in ${FILESGROUPS} +.for group in ${_FILESGROUPS} .if defined(${group}) && !empty(${group}) installfiles: installfiles-${group} Modified: stable/10/share/mk/bsd.incs.mk ============================================================================== --- stable/10/share/mk/bsd.incs.mk Mon Mar 28 16:24:10 2016 (r297353) +++ stable/10/share/mk/bsd.incs.mk Mon Mar 28 16:25:07 2016 (r297354) @@ -8,8 +8,10 @@ INCSGROUPS?= INCS +_INCSGROUPS= ${INCSGROUPS:C,[/*],_,g} + .if !target(buildincludes) -.for group in ${INCSGROUPS} +.for group in ${_INCSGROUPS} buildincludes: ${${group}} .endfor .endif @@ -17,7 +19,7 @@ buildincludes: ${${group}} all: buildincludes .if !target(installincludes) -.for group in ${INCSGROUPS} +.for group in ${_INCSGROUPS} .if defined(${group}) && !empty(${group}) ${group}OWN?= ${BINOWN} From owner-svn-src-stable@freebsd.org Tue Mar 29 09:14:29 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92199AE02F0; Tue, 29 Mar 2016 09:14:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6225715FE; Tue, 29 Mar 2016 09:14:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2T9ESev039962; Tue, 29 Mar 2016 09:14:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2T9ESt7039961; Tue, 29 Mar 2016 09:14:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201603290914.u2T9ESt7039961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 29 Mar 2016 09:14:28 +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: r297375 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2016 09:14:29 -0000 Author: mav Date: Tue Mar 29 09:14:28 2016 New Revision: 297375 URL: https://svnweb.freebsd.org/changeset/base/297375 Log: r297229 (by hselasky): Add more UHCI PCI IDs. Modified: stable/10/sys/dev/usb/controller/uhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/uhci_pci.c Tue Mar 29 08:44:56 2016 (r297374) +++ stable/10/sys/dev/usb/controller/uhci_pci.c Tue Mar 29 09:14:28 2016 (r297375) @@ -161,6 +161,12 @@ uhci_pci_match(device_t self) case 0x24de8086: return ("Intel 82801EB (ICH5) USB controller USB-D"); + case 0x25a98086: + return ("Intel 6300ESB USB controller USB-A"); + + case 0x25aa8086: + return ("Intel 6300ESB USB controller USB-B"); + case 0x26588086: return ("Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-A"); From owner-svn-src-stable@freebsd.org Wed Mar 30 18:45:19 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C298AE3B85; Wed, 30 Mar 2016 18:45:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C0D31238; Wed, 30 Mar 2016 18:45:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2UIjIRh057746; Wed, 30 Mar 2016 18:45:18 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2UIjI6K057745; Wed, 30 Mar 2016 18:45:18 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201603301845.u2UIjI6K057745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 30 Mar 2016 18:45:18 +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: r297429 - stable/10/sys/netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2016 18:45:19 -0000 Author: kp Date: Wed Mar 30 18:45:18 2016 New Revision: 297429 URL: https://svnweb.freebsd.org/changeset/base/297429 Log: MFC 296932: pf: Improve forwarding detection When we guess the nature of the outbound packet (output vs. forwarding) we need to take bridges into account. When bridging the input interface does not match the output interface, but we're not forwarding. Similarly, it's possible for the interface to actually be the bridge interface itself (and not a member interface). Modified: stable/10/sys/netpfil/pf/pf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Wed Mar 30 18:40:09 2016 (r297428) +++ stable/10/sys/netpfil/pf/pf.c Wed Mar 30 18:45:18 2016 (r297429) @@ -6145,11 +6145,13 @@ pf_test6(int dir, struct ifnet *ifp, str * We do need to be careful about bridges. If the * net.link.bridge.pfil_bridge sysctl is set we can be filtering on a * bridge, so if the input interface is a bridge member and the output - * interface is its bridge we're not actually forwarding but bridging. + * interface is its bridge or a member of the same bridge we're not + * actually forwarding but bridging. */ - if (dir == PF_OUT && m->m_pkthdr.rcvif && ifp != m->m_pkthdr.rcvif - && (m->m_pkthdr.rcvif->if_bridge == NULL - || m->m_pkthdr.rcvif->if_bridge != ifp->if_softc)) + if (dir == PF_OUT && m->m_pkthdr.rcvif && ifp != m->m_pkthdr.rcvif && + (m->m_pkthdr.rcvif->if_bridge == NULL || + (m->m_pkthdr.rcvif->if_bridge != ifp->if_softc && + m->m_pkthdr.rcvif->if_bridge != ifp->if_bridge))) fwdir = PF_FWD; if (!V_pf_status.running) From owner-svn-src-stable@freebsd.org Wed Mar 30 22:12:09 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26594AE38CE; Wed, 30 Mar 2016 22:12:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9C45131C; Wed, 30 Mar 2016 22:12:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2UMC8bY021825; Wed, 30 Mar 2016 22:12:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2UMC8Vx021824; Wed, 30 Mar 2016 22:12:08 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201603302212.u2UMC8Vx021824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 30 Mar 2016 22:12:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r297432 - in stable: 10/include 9/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2016 22:12:09 -0000 Author: dim Date: Wed Mar 30 22:12:07 2016 New Revision: 297432 URL: https://svnweb.freebsd.org/changeset/base/297432 Log: MFC r297212: For C++, expose long long types and functions (lldiv_t, llabs, lldiv, etc) in stdlib.h. These will be needed for newer versions of libc++, which uses them for defining overloaded versions of abs() and div(). Modified: stable/9/include/stdlib.h Directory Properties: stable/9/ (props changed) stable/9/include/ (props changed) Changes in other areas also in this revision: Modified: stable/10/include/stdlib.h Directory Properties: stable/10/ (props changed) Modified: stable/9/include/stdlib.h ============================================================================== --- stable/9/include/stdlib.h Wed Mar 30 21:31:34 2016 (r297431) +++ stable/9/include/stdlib.h Wed Mar 30 22:12:07 2016 (r297432) @@ -124,7 +124,7 @@ size_t wcstombs(char * __restrict, cons * * (The only other extension made by C99 in thie header is _Exit().) */ -#if __ISO_C_VISIBLE >= 1999 +#if __ISO_C_VISIBLE >= 1999 || defined(__cplusplus) #ifdef __LONG_LONG_SUPPORTED /* LONGLONG */ typedef struct { From owner-svn-src-stable@freebsd.org Wed Mar 30 22:12:09 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EAE8AE38D4; Wed, 30 Mar 2016 22:12:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 309C0131D; Wed, 30 Mar 2016 22:12:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2UMC8Cq021831; Wed, 30 Mar 2016 22:12:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2UMC8uN021830; Wed, 30 Mar 2016 22:12:08 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201603302212.u2UMC8uN021830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 30 Mar 2016 22:12:08 +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: r297432 - in stable: 10/include 9/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2016 22:12:09 -0000 Author: dim Date: Wed Mar 30 22:12:07 2016 New Revision: 297432 URL: https://svnweb.freebsd.org/changeset/base/297432 Log: MFC r297212: For C++, expose long long types and functions (lldiv_t, llabs, lldiv, etc) in stdlib.h. These will be needed for newer versions of libc++, which uses them for defining overloaded versions of abs() and div(). Modified: stable/10/include/stdlib.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/include/stdlib.h Directory Properties: stable/9/ (props changed) stable/9/include/ (props changed) Modified: stable/10/include/stdlib.h ============================================================================== --- stable/10/include/stdlib.h Wed Mar 30 21:31:34 2016 (r297431) +++ stable/10/include/stdlib.h Wed Mar 30 22:12:07 2016 (r297432) @@ -124,7 +124,7 @@ size_t wcstombs(char * __restrict, cons * * (The only other extension made by C99 in thie header is _Exit().) */ -#if __ISO_C_VISIBLE >= 1999 +#if __ISO_C_VISIBLE >= 1999 || defined(__cplusplus) #ifdef __LONG_LONG_SUPPORTED /* LONGLONG */ typedef struct { From owner-svn-src-stable@freebsd.org Thu Mar 31 01:36:52 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38863AE1D8B; Thu, 31 Mar 2016 01:36:52 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF6C61285; Thu, 31 Mar 2016 01:36:51 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2V1apw2081628; Thu, 31 Mar 2016 01:36:51 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2V1apg6081627; Thu, 31 Mar 2016 01:36:51 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201603310136.u2V1apg6081627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 31 Mar 2016 01:36: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: r297440 - stable/10/lib/libc/locale X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2016 01:36:52 -0000 Author: pfg Date: Thu Mar 31 01:36:50 2016 New Revision: 297440 URL: https://svnweb.freebsd.org/changeset/base/297440 Log: MFC r296278: mbtowc(3): set errno to EILSEQ if an incomplete character is passed. According to POSIX, The mbtowc() function shall fail if: [EILSEQ] An invalid character sequence is detected. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D5496 Obtained from: OpenBSD (Ingo Schwarze) Modified: stable/10/lib/libc/locale/mbtowc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/locale/mbtowc.c ============================================================================== --- stable/10/lib/libc/locale/mbtowc.c Thu Mar 31 00:53:23 2016 (r297439) +++ stable/10/lib/libc/locale/mbtowc.c Thu Mar 31 01:36:50 2016 (r297440) @@ -32,6 +32,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include "mblocal.h" @@ -49,9 +50,15 @@ mbtowc_l(wchar_t * __restrict pwc, const return (0); } rval = XLOCALE_CTYPE(locale)->__mbrtowc(pwc, s, n, &locale->mbtowc); - if (rval == (size_t)-1 || rval == (size_t)-2) + switch (rval) { + case (size_t)-2: + errno = EILSEQ; + /* FALLTHROUGH */ + case (size_t)-1: return (-1); - return ((int)rval); + default: + return ((int)rval); + } } int mbtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n) From owner-svn-src-stable@freebsd.org Thu Mar 31 09:55:22 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5398AE380D; Thu, 31 Mar 2016 09:55:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8986119B9; Thu, 31 Mar 2016 09:55:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2V9tLSd031723; Thu, 31 Mar 2016 09:55:21 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2V9tL4Y031722; Thu, 31 Mar 2016 09:55:21 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201603310955.u2V9tL4Y031722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 31 Mar 2016 09:55:21 +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: r297445 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2016 09:55:22 -0000 Author: ae Date: Thu Mar 31 09:55:21 2016 New Revision: 297445 URL: https://svnweb.freebsd.org/changeset/base/297445 Log: MFC r296984: Change in6_selectsrc() to allow usage of non-local IPv6 addresses in IPV6_PKTINFO ancillary data when IPV6_BINDANY socket option is set. Modified: stable/10/sys/netinet6/in6_src.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6_src.c ============================================================================== --- stable/10/sys/netinet6/in6_src.c Thu Mar 31 06:19:15 2016 (r297444) +++ stable/10/sys/netinet6/in6_src.c Thu Mar 31 09:55:21 2016 (r297445) @@ -249,19 +249,27 @@ in6_selectsrc(struct sockaddr_in6 *dstso (inp->inp_flags & IN6P_IPV6_V6ONLY) != 0))) != 0) return (error); - ia6 = (struct in6_ifaddr *)ifa_ifwithaddr( - (struct sockaddr *)&srcsock); - if (ia6 == NULL || - (ia6->ia6_flags & (IN6_IFF_ANYCAST | IN6_IFF_NOTREADY))) { - if (ia6 != NULL) - ifa_free(&ia6->ia_ifa); - return (EADDRNOTAVAIL); - } + /* + * If IPV6_BINDANY socket option is set, we allow to specify + * non local addresses as source address in IPV6_PKTINFO + * ancillary data. + */ + if ((inp->inp_flags & INP_BINDANY) == 0) { + ia6 = (struct in6_ifaddr *)ifa_ifwithaddr( + (struct sockaddr *)&srcsock); + if (ia6 == NULL || (ia6->ia6_flags & (IN6_IFF_ANYCAST | + IN6_IFF_NOTREADY))) { + if (ia6 != NULL) + ifa_free(&ia6->ia_ifa); + return (EADDRNOTAVAIL); + } + bcopy(&ia6->ia_addr.sin6_addr, srcp, sizeof(*srcp)); + ifa_free(&ia6->ia_ifa); + } else + bcopy(&srcsock.sin6_addr, srcp, sizeof(*srcp)); pi->ipi6_addr = srcsock.sin6_addr; /* XXX: this overrides pi */ if (ifpp) *ifpp = ifp; - bcopy(&ia6->ia_addr.sin6_addr, srcp, sizeof(*srcp)); - ifa_free(&ia6->ia_ifa); return (0); } From owner-svn-src-stable@freebsd.org Fri Apr 1 01:39:45 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7F2BAE4C29; Fri, 1 Apr 2016 01:39:45 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C7731D3C; Fri, 1 Apr 2016 01:39:45 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u311diS9027717; Fri, 1 Apr 2016 01:39:44 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u311diMK027714; Fri, 1 Apr 2016 01:39:44 GMT (envelope-from np@FreeBSD.org) Message-Id: <201604010139.u311diMK027714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 1 Apr 2016 01:39:44 +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: r297478 - in stable/10/sys: dev/netmap kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2016 01:39:46 -0000 Author: np Date: Fri Apr 1 01:39:44 2016 New Revision: 297478 URL: https://svnweb.freebsd.org/changeset/base/297478 Log: MFC r297298: Plug leak in m_unshare. m_unshare passes on the source mbuf's flags as-is to m_getcl and this results in a leak if the flags include M_NOFREE. The fix is to clear the bits not listed in M_COPYALL before calling m_getcl. M_RDONLY should probably be filtered out too but that's outside the scope of this fix. Add assertions in the zone_mbuf and zone_pack ctors to catch similar bugs. Update netmap_get_mbuf to not pass M_NOFREE to m_getcl. It's not clear what the original code was trying to do but it's likely incorrect. Updated code is no different functionally but it avoids the newly added assertions. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/netmap/netmap_generic.c stable/10/sys/kern/kern_mbuf.c stable/10/sys/kern/uipc_mbuf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/netmap/netmap_generic.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_generic.c Fri Apr 1 01:35:52 2016 (r297477) +++ stable/10/sys/dev/netmap/netmap_generic.c Fri Apr 1 01:39:44 2016 (r297478) @@ -129,8 +129,9 @@ static inline struct mbuf * netmap_get_mbuf(int len) { struct mbuf *m; - m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR | M_NOFREE); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m) { + m->m_flags |= M_NOFREE; /* XXXNP: Almost certainly incorrect. */ m->m_ext.ext_arg1 = m->m_ext.ext_buf; // XXX save m->m_ext.ext_free = (void *)netmap_default_mbuf_destructor; m->m_ext.ext_type = EXT_EXTREF; Modified: stable/10/sys/kern/kern_mbuf.c ============================================================================== --- stable/10/sys/kern/kern_mbuf.c Fri Apr 1 01:35:52 2016 (r297477) +++ stable/10/sys/kern/kern_mbuf.c Fri Apr 1 01:39:44 2016 (r297478) @@ -429,6 +429,7 @@ mb_ctor_mbuf(void *mem, int size, void * m = (struct mbuf *)mem; flags = args->flags; + MPASS((flags & M_NOFREE) == 0); error = m_init(m, NULL, size, how, type, flags); @@ -626,6 +627,7 @@ mb_ctor_pack(void *mem, int size, void * args = (struct mb_args *)arg; flags = args->flags; type = args->type; + MPASS((flags & M_NOFREE) == 0); #ifdef INVARIANTS trash_ctor(m->m_ext.ext_buf, MCLBYTES, arg, how); Modified: stable/10/sys/kern/uipc_mbuf.c ============================================================================== --- stable/10/sys/kern/uipc_mbuf.c Fri Apr 1 01:35:52 2016 (r297477) +++ stable/10/sys/kern/uipc_mbuf.c Fri Apr 1 01:39:44 2016 (r297478) @@ -1989,7 +1989,7 @@ m_unshare(struct mbuf *m0, int how) * don't know how to break up the non-contiguous memory when * doing DMA. */ - n = m_getcl(how, m->m_type, m->m_flags); + n = m_getcl(how, m->m_type, m->m_flags & M_COPYFLAGS); if (n == NULL) { m_freem(m0); return (NULL); @@ -2014,7 +2014,7 @@ m_unshare(struct mbuf *m0, int how) break; off += cc; - n = m_getcl(how, m->m_type, m->m_flags); + n = m_getcl(how, m->m_type, m->m_flags & M_COPYFLAGS); if (n == NULL) { m_freem(mfirst); m_freem(m0); From owner-svn-src-stable@freebsd.org Fri Apr 1 03:46:17 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D973BAE5112; Fri, 1 Apr 2016 03:46:17 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 943F61A61; Fri, 1 Apr 2016 03:46:17 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u313kG83067920; Fri, 1 Apr 2016 03:46:16 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u313kGgZ067918; Fri, 1 Apr 2016 03:46:16 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201604010346.u313kGgZ067918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 1 Apr 2016 03:46:16 +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: r297480 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2016 03:46:18 -0000 Author: kevlo Date: Fri Apr 1 03:46:16 2016 New Revision: 297480 URL: https://svnweb.freebsd.org/changeset/base/297480 Log: MFC r297335: Update superblock and inode structs for ext4. Reviewed by: pfg Modified: stable/10/sys/fs/ext2fs/ext2_dinode.h stable/10/sys/fs/ext2fs/ext2fs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_dinode.h Fri Apr 1 03:21:01 2016 (r297479) +++ stable/10/sys/fs/ext2fs/ext2_dinode.h Fri Apr 1 03:46:16 2016 (r297480) @@ -131,6 +131,7 @@ struct ext2fs_dinode { uint32_t e2di_crtime; /* 144: Creation (birth)time */ uint32_t e2di_crtime_extra; /* 148: Extra creation (birth)time */ uint32_t e2di_version_hi; /* 152: High bits of inode version */ + uint32_t e2di_projid; /* 156: Project ID */ }; #endif /* !_FS_EXT2FS_EXT2_DINODE_H_ */ Modified: stable/10/sys/fs/ext2fs/ext2fs.h ============================================================================== --- stable/10/sys/fs/ext2fs/ext2fs.h Fri Apr 1 03:21:01 2016 (r297479) +++ stable/10/sys/fs/ext2fs/ext2fs.h Fri Apr 1 03:46:16 2016 (r297480) @@ -72,7 +72,7 @@ struct ext2fs { uint32_t e2fs_first_ino; /* first non-reserved inode */ uint16_t e2fs_inode_size; /* size of inode structure */ uint16_t e2fs_block_group_nr; /* block grp number of this sblk*/ - uint32_t e2fs_features_compat; /* compatible feature set */ + uint32_t e2fs_features_compat; /* compatible feature set */ uint32_t e2fs_features_incompat; /* incompatible feature set */ uint32_t e2fs_features_rocompat; /* RO-compatible feature set */ uint8_t e2fs_uuid[16]; /* 128-bit uuid for volume */ @@ -88,25 +88,54 @@ struct ext2fs { uint32_t e3fs_last_orphan; /* start of list of inodes to delete */ uint32_t e3fs_hash_seed[4]; /* HTREE hash seed */ char e3fs_def_hash_version; /* Default hash version to use */ - char e3fs_reserved_char_pad; + char e3fs_jnl_backup_type; + uint16_t e3fs_desc_size; /* size of group descriptor */ uint32_t e3fs_default_mount_opts; uint32_t e3fs_first_meta_bg; /* First metablock block group */ - uint32_t e3fs_mkfs_time; /* when the fs was created */ - uint32_t e3fs_jnl_blks[17]; /* backup of the journal inode */ - uint32_t e4fs_bcount_hi; /* block count */ - uint32_t e4fs_rbcount_hi; /* reserved blocks count */ - uint32_t e4fs_fbcount_hi; /* free blocks count */ - uint16_t e4fs_min_extra_isize;/* all inodes have at least some bytes */ + uint32_t e3fs_mkfs_time; /* when the fs was created */ + uint32_t e3fs_jnl_blks[17]; /* backup of the journal inode */ + uint32_t e4fs_bcount_hi; /* high bits of blocks count */ + uint32_t e4fs_rbcount_hi; /* high bits of reserved blocks count */ + uint32_t e4fs_fbcount_hi; /* high bits of free blocks count */ + uint16_t e4fs_min_extra_isize; /* all inodes have at least some bytes */ uint16_t e4fs_want_extra_isize; /* inodes must reserve some bytes */ - uint32_t e4fs_flags; /* miscellaneous flags */ - uint16_t e4fs_raid_stride; /* RAID stride */ - uint16_t e4fs_mmpintv; /* number of seconds to wait in MMP checking */ - uint64_t e4fs_mmpblk; /* block for multi-mount protection */ - uint32_t e4fs_raid_stripe_wid;/* blocks on all data disks (N * stride) */ - uint8_t e4fs_log_gpf; /* FLEX_BG group size */ - uint8_t e4fs_char_pad2; - uint16_t e4fs_pad; - uint32_t reserved2[162]; /* Padding to the end of the block */ + uint32_t e4fs_flags; /* miscellaneous flags */ + uint16_t e4fs_raid_stride; /* RAID stride */ + uint16_t e4fs_mmpintv; /* number of seconds to wait in MMP checking */ + uint64_t e4fs_mmpblk; /* block for multi-mount protection */ + uint32_t e4fs_raid_stripe_wid; /* blocks on all data disks (N * stride) */ + uint8_t e4fs_log_gpf; /* FLEX_BG group size */ + uint8_t e4fs_chksum_type; /* metadata checksum algorithm used */ + uint8_t e4fs_encrypt; /* versioning level for encryption */ + uint8_t e4fs_reserved_pad; + uint64_t e4fs_kbytes_written; /* number of lifetime kilobytes */ + uint32_t e4fs_snapinum; /* inode number of active snapshot */ + uint32_t e4fs_snapid; /* sequential ID of active snapshot */ + uint64_t e4fs_snaprbcount; /* reserved blocks for active snapshot */ + uint32_t e4fs_snaplist; /* inode number for on-disk snapshot */ + uint32_t e4fs_errcount; /* number of file system errors */ + uint32_t e4fs_first_errtime; /* first time an error happened */ + uint32_t e4fs_first_errino; /* inode involved in first error */ + uint64_t e4fs_first_errblk; /* block involved of first error */ + uint8_t e4fs_first_errfunc[32]; /* function where error happened */ + uint32_t e4fs_first_errline; /* line number where error happened */ + uint32_t e4fs_last_errtime; /* most recent time of an error */ + uint32_t e4fs_last_errino; /* inode involved in last error */ + uint32_t e4fs_last_errline; /* line number where error happened */ + uint64_t e4fs_last_errblk; /* block involved of last error */ + uint8_t e4fs_last_errfunc[32]; /* function where error happened */ + uint8_t e4fs_mount_opts[64]; + uint32_t e4fs_usrquota_inum; /* inode for tracking user quota */ + uint32_t e4fs_grpquota_inum; /* inode for tracking group quota */ + uint32_t e4fs_overhead_clusters; /* overhead blocks/clusters */ + uint32_t e4fs_backup_bgs[2]; /* groups with sparse_super2 SBs */ + uint8_t e4fs_encrypt_algos[4]; /* encryption algorithms in use */ + uint8_t e4fs_encrypt_pw_salt[16]; /* salt used for string2key */ + uint32_t e4fs_lpf_ino; /* location of the lost+found inode */ + uint32_t e4fs_proj_quota_inum; /* inode for tracking project quota */ + uint32_t e4fs_chksum_seed; /* checksum seed */ + uint32_t e4fs_reserved[98]; /* padding to the end of the block */ + uint32_t e4fs_sbchksum; /* superblock checksum */ }; /* From owner-svn-src-stable@freebsd.org Sat Apr 2 06:15:15 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67AA2AEBEE5; Sat, 2 Apr 2016 06:15:15 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 382071075; Sat, 2 Apr 2016 06:15:15 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u326FE9f065478; Sat, 2 Apr 2016 06:15:14 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u326FEGt065477; Sat, 2 Apr 2016 06:15:14 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201604020615.u326FEGt065477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 2 Apr 2016 06:15:14 +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: r297502 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2016 06:15:15 -0000 Author: dchagin Date: Sat Apr 2 06:15:14 2016 New Revision: 297502 URL: https://svnweb.freebsd.org/changeset/base/297502 Log: MFC r297296: Implement O_NONBLOCK flag via fcntl(F_SETFL) for eventfd object. Modified: stable/10/sys/compat/linux/linux_event.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_event.c ============================================================================== --- stable/10/sys/compat/linux/linux_event.c Sat Apr 2 01:59:53 2016 (r297501) +++ stable/10/sys/compat/linux/linux_event.c Sat Apr 2 06:15:14 2016 (r297502) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -868,8 +869,24 @@ static int eventfd_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred, struct thread *td) { + struct eventfd *efd; - return (ENXIO); + efd = fp->f_data; + if (fp->f_type != DTYPE_LINUXEFD || efd == NULL) + return (EINVAL); + + switch (cmd) + { + case FIONBIO: + if (*(int *)data) + efd->efd_flags |= LINUX_O_NONBLOCK; + else + efd->efd_flags &= ~LINUX_O_NONBLOCK; + case FIOASYNC: + return (0); + default: + return (ENXIO); + } } /*ARGSUSED*/ From owner-svn-src-stable@freebsd.org Sat Apr 2 06:18:20 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EB3FB00047; Sat, 2 Apr 2016 06:18:20 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29E5B128F; Sat, 2 Apr 2016 06:18:20 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u326IJRc065624; Sat, 2 Apr 2016 06:18:19 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u326IJwm065623; Sat, 2 Apr 2016 06:18:19 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201604020618.u326IJwm065623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 2 Apr 2016 06:18:19 +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: r297503 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2016 06:18:20 -0000 Author: dchagin Date: Sat Apr 2 06:18:19 2016 New Revision: 297503 URL: https://svnweb.freebsd.org/changeset/base/297503 Log: MFC r297297: When write(2) on eventfd object fails with the error EAGAIN do not return the number of bytes written. Modified: stable/10/sys/compat/linux/linux_event.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_event.c ============================================================================== --- stable/10/sys/compat/linux/linux_event.c Sat Apr 2 06:15:14 2016 (r297502) +++ stable/10/sys/compat/linux/linux_event.c Sat Apr 2 06:18:19 2016 (r297503) @@ -748,6 +748,8 @@ retry: if (UINT64_MAX - efd->efd_count <= count) { if ((efd->efd_flags & LINUX_O_NONBLOCK) != 0) { mtx_unlock(&efd->efd_lock); + /* Do not not return the number of bytes written */ + uio->uio_resid += sizeof(eventfd_t); return (EAGAIN); } error = mtx_sleep(&efd->efd_count, &efd->efd_lock,