From owner-svn-src-vendor@freebsd.org Wed Aug 31 00:08:52 2016 Return-Path: Delivered-To: svn-src-vendor@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 1960BBC989D; Wed, 31 Aug 2016 00:08:52 +0000 (UTC) (envelope-from cy@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 ABA772D5B; Wed, 31 Aug 2016 00:08:51 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7V08o5H028382; Wed, 31 Aug 2016 00:08:50 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7V08oTb028377; Wed, 31 Aug 2016 00:08:50 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201608310008.u7V08oTb028377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 31 Aug 2016 00:08:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305100 - in vendor/amd/dist: . amd amq conf/autofs conf/checkmount conf/fh_dref conf/hn_dref conf/mount conf/mtab conf/nfs_prot conf/sa_dref conf/transp conf/trap conf/umount doc fixmo... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2016 00:08:52 -0000 Author: cy Date: Wed Aug 31 00:08:49 2016 New Revision: 305100 URL: https://svnweb.freebsd.org/changeset/base/305100 Log: Import am-utils 6.2, Suggested by: pfg@ Obtained from: ftp://ftp.am-utils.org/pub/am-utils/ Added: vendor/amd/dist/LSM.am-utils vendor/amd/dist/Makefile.am (contents, props changed) vendor/amd/dist/Makefile.in (contents, props changed) vendor/amd/dist/README.autofs vendor/amd/dist/README.osx vendor/amd/dist/README.sun2amd vendor/amd/dist/acinclude.m4 vendor/amd/dist/aclocal.m4 vendor/amd/dist/amd/Makefile.am (contents, props changed) vendor/amd/dist/amd/Makefile.in (contents, props changed) vendor/amd/dist/amd/info_sun.c (contents, props changed) vendor/amd/dist/amd/ops_ext.c (contents, props changed) vendor/amd/dist/amd/ops_lustre.c (contents, props changed) vendor/amd/dist/amd/ops_nfs4.c (contents, props changed) vendor/amd/dist/amd/ops_udf.c (contents, props changed) vendor/amd/dist/amd/sun2amd.8 (contents, props changed) vendor/amd/dist/amd/sun2amd.c (contents, props changed) vendor/amd/dist/amd/sun_map.c (contents, props changed) vendor/amd/dist/amd/sun_map.h (contents, props changed) vendor/amd/dist/amd/sun_map_parse.y vendor/amd/dist/amd/sun_map_tok.l vendor/amd/dist/amd/test1.sh (contents, props changed) vendor/amd/dist/amq/Makefile.am (contents, props changed) vendor/amd/dist/amq/Makefile.in (contents, props changed) vendor/amd/dist/buildall (contents, props changed) vendor/amd/dist/compile (contents, props changed) vendor/amd/dist/conf/autofs/ vendor/amd/dist/conf/autofs/autofs_default.c (contents, props changed) vendor/amd/dist/conf/autofs/autofs_default.h (contents, props changed) vendor/amd/dist/conf/autofs/autofs_linux.c (contents, props changed) vendor/amd/dist/conf/autofs/autofs_linux.h (contents, props changed) vendor/amd/dist/conf/autofs/autofs_solaris_v1.c (contents, props changed) vendor/amd/dist/conf/autofs/autofs_solaris_v1.h (contents, props changed) vendor/amd/dist/conf/autofs/autofs_solaris_v2_v3.c (contents, props changed) vendor/amd/dist/conf/autofs/autofs_solaris_v2_v3.h (contents, props changed) vendor/amd/dist/conf/checkmount/checkmount_aix.c (contents, props changed) vendor/amd/dist/conf/checkmount/checkmount_default.c (contents, props changed) vendor/amd/dist/conf/checkmount/checkmount_osf.c (contents, props changed) vendor/amd/dist/conf/checkmount/checkmount_svr4.c (contents, props changed) vendor/amd/dist/conf/checkmount/checkmount_ultrix.c (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_aix3.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_aix42.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_bsd44.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_default.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_hpux.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_irix.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_isc3.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_linux.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_nextstep.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_osf2.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_osf4.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_sunos3.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_sunos4.h (contents, props changed) vendor/amd/dist/conf/fh_dref/fh_dref_svr4.h (contents, props changed) vendor/amd/dist/conf/hn_dref/hn_dref_isc3.h (contents, props changed) vendor/amd/dist/conf/hn_dref/hn_dref_linux.h (contents, props changed) vendor/amd/dist/conf/mount/mount_aix.c (contents, props changed) vendor/amd/dist/conf/mount/mount_aix3.c (contents, props changed) vendor/amd/dist/conf/mount/mount_bsdi3.c (contents, props changed) vendor/amd/dist/conf/mount/mount_hpux.c (contents, props changed) vendor/amd/dist/conf/mount/mount_irix5.c (contents, props changed) vendor/amd/dist/conf/mount/mount_irix6.c (contents, props changed) vendor/amd/dist/conf/mount/mount_isc3.c (contents, props changed) vendor/amd/dist/conf/mount/mount_linux.c (contents, props changed) vendor/amd/dist/conf/mount/mount_mach3.c (contents, props changed) vendor/amd/dist/conf/mount/mount_stellix.c (contents, props changed) vendor/amd/dist/conf/mount/mount_svr4.c (contents, props changed) vendor/amd/dist/conf/mtab/mtab_aix.c (contents, props changed) vendor/amd/dist/conf/mtab/mtab_file.c (contents, props changed) vendor/amd/dist/conf/mtab/mtab_isc3.c (contents, props changed) vendor/amd/dist/conf/mtab/mtab_linux.c (contents, props changed) vendor/amd/dist/conf/mtab/mtab_mach3.c (contents, props changed) vendor/amd/dist/conf/mtab/mtab_osf.c (contents, props changed) vendor/amd/dist/conf/mtab/mtab_svr4.c (contents, props changed) vendor/amd/dist/conf/mtab/mtab_ultrix.c (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_aix3.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_aix4.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_aix4_2.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_aix4_3.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_aix5_2.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_bsdi2.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_bsdi3.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_default.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_hpux.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_hpux11.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_irix5.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_irix6.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_linux.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_ncr2.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_netbsd.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_netbsd1_3.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_netbsd1_4.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_nextstep.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_openbsd.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_osf2.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_osf4.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_sunos3.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_sunos4.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_sunos5_3.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_sunos5_4.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_sunos5_5.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_sunos5_6.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_sunos5_7.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_svr4.h (contents, props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_ultrix.h (contents, props changed) vendor/amd/dist/conf/sa_dref/sa_dref_386bsd.h (contents, props changed) vendor/amd/dist/conf/sa_dref/sa_dref_aix3.h (contents, props changed) vendor/amd/dist/conf/sa_dref/sa_dref_aoi.h (contents, props changed) vendor/amd/dist/conf/sa_dref/sa_dref_default.h (contents, props changed) vendor/amd/dist/conf/sa_dref/sa_dref_isc3.h (contents, props changed) vendor/amd/dist/conf/sa_dref/sa_dref_linux.h (contents, props changed) vendor/amd/dist/conf/sa_dref/sa_dref_svr4.h (contents, props changed) vendor/amd/dist/conf/transp/transp_tli.c (contents, props changed) vendor/amd/dist/conf/trap/trap_aix3.h (contents, props changed) vendor/amd/dist/conf/trap/trap_aux.h (contents, props changed) vendor/amd/dist/conf/trap/trap_dgux.h (contents, props changed) vendor/amd/dist/conf/trap/trap_hcx.h (contents, props changed) vendor/amd/dist/conf/trap/trap_hpux.h (contents, props changed) vendor/amd/dist/conf/trap/trap_irix.h (contents, props changed) vendor/amd/dist/conf/trap/trap_isc3.h (contents, props changed) vendor/amd/dist/conf/trap/trap_linux.h (contents, props changed) vendor/amd/dist/conf/trap/trap_mach3.h (contents, props changed) vendor/amd/dist/conf/trap/trap_netbsd.h (contents, props changed) vendor/amd/dist/conf/trap/trap_news4.h (contents, props changed) vendor/amd/dist/conf/trap/trap_rtu6.h (contents, props changed) vendor/amd/dist/conf/trap/trap_stellix.h (contents, props changed) vendor/amd/dist/conf/trap/trap_svr4.h (contents, props changed) vendor/amd/dist/conf/trap/trap_ultrix.h (contents, props changed) vendor/amd/dist/conf/umount/umount_aix.c (contents, props changed) vendor/amd/dist/conf/umount/umount_default.c (contents, props changed) vendor/amd/dist/conf/umount/umount_linux.c (contents, props changed) vendor/amd/dist/conf/umount/umount_osf.c (contents, props changed) vendor/amd/dist/config.guess (contents, props changed) vendor/amd/dist/config.guess.long (contents, props changed) vendor/amd/dist/config.h.in (contents, props changed) vendor/amd/dist/config.sub (contents, props changed) vendor/amd/dist/configure (contents, props changed) vendor/amd/dist/configure.ac vendor/amd/dist/depcomp (contents, props changed) vendor/amd/dist/doc/Makefile.am (contents, props changed) vendor/amd/dist/doc/Makefile.in (contents, props changed) vendor/amd/dist/doc/am-utils.dvi (contents, props changed) vendor/amd/dist/doc/am-utils.info (contents, props changed) vendor/amd/dist/doc/am-utils.info-1 (contents, props changed) vendor/amd/dist/doc/am-utils.info-2 (contents, props changed) vendor/amd/dist/doc/am-utils.ps (contents, props changed) vendor/amd/dist/doc/hlfsd.ps (contents, props changed) vendor/amd/dist/doc/mdate-sh (contents, props changed) vendor/amd/dist/fixmount/Makefile.am (contents, props changed) vendor/amd/dist/fixmount/Makefile.in (contents, props changed) vendor/amd/dist/fsinfo/Makefile.am (contents, props changed) vendor/amd/dist/fsinfo/Makefile.in (contents, props changed) vendor/amd/dist/fsinfo/null_gram.c (contents, props changed) vendor/amd/dist/fsinfo/null_gram.h (contents, props changed) vendor/amd/dist/fsinfo/null_gram.y vendor/amd/dist/fsinfo/null_lex.c (contents, props changed) vendor/amd/dist/fsinfo/null_lex.l vendor/amd/dist/hlfsd/Makefile.am (contents, props changed) vendor/amd/dist/hlfsd/Makefile.in (contents, props changed) vendor/amd/dist/include/nfs_common.h (contents, props changed) vendor/amd/dist/install-sh (contents, props changed) vendor/amd/dist/libamu/Makefile.am (contents, props changed) vendor/amd/dist/libamu/Makefile.in (contents, props changed) vendor/amd/dist/libamu/memcmp.c (contents, props changed) vendor/amd/dist/libamu/strcasecmp.c (contents, props changed) vendor/amd/dist/libamu/strlcat.c (contents, props changed) vendor/amd/dist/libamu/strlcpy.c (contents, props changed) vendor/amd/dist/libamu/strstr.c (contents, props changed) vendor/amd/dist/libamu/ualarm.c (contents, props changed) vendor/amd/dist/ltmain.sh (contents, props changed) vendor/amd/dist/m4/ vendor/amd/dist/m4/GNUmakefile vendor/amd/dist/m4/amdgrep (contents, props changed) vendor/amd/dist/m4/amindent (contents, props changed) vendor/amd/dist/m4/autopat (contents, props changed) vendor/amd/dist/m4/chop-aclocal.pl (contents, props changed) vendor/amd/dist/m4/copy-if-newbig (contents, props changed) vendor/amd/dist/m4/macros/ vendor/amd/dist/m4/macros/HEADER vendor/amd/dist/m4/macros/TRAILER vendor/amd/dist/m4/macros/c_void_p.m4 vendor/amd/dist/m4/macros/cache_check_dynamic.m4 vendor/amd/dist/m4/macros/check_amu_fs.m4 vendor/amd/dist/m4/macros/check_autofs_style.m4 vendor/amd/dist/m4/macros/check_checkmount_style.m4 vendor/amd/dist/m4/macros/check_extern.m4 vendor/amd/dist/m4/macros/check_extern_ldap.m4 vendor/amd/dist/m4/macros/check_fhandle.m4 vendor/amd/dist/m4/macros/check_field.m4 vendor/amd/dist/m4/macros/check_fs_headers.m4 vendor/amd/dist/m4/macros/check_fs_mntent.m4 vendor/amd/dist/m4/macros/check_gnu_getopt.m4 vendor/amd/dist/m4/macros/check_hide_mount_type.m4 vendor/amd/dist/m4/macros/check_lib2.m4 vendor/amd/dist/m4/macros/check_libwrap_severity.m4 vendor/amd/dist/m4/macros/check_map_funcs.m4 vendor/amd/dist/m4/macros/check_mnt2_cdfs_opt.m4 vendor/amd/dist/m4/macros/check_mnt2_gen_opt.m4 vendor/amd/dist/m4/macros/check_mnt2_nfs_opt.m4 vendor/amd/dist/m4/macros/check_mnt2_pcfs_opt.m4 vendor/amd/dist/m4/macros/check_mnt2_udf_opt.m4 vendor/amd/dist/m4/macros/check_mnttab_file_name.m4 vendor/amd/dist/m4/macros/check_mnttab_location.m4 vendor/amd/dist/m4/macros/check_mnttab_opt.m4 vendor/amd/dist/m4/macros/check_mnttab_style.m4 vendor/amd/dist/m4/macros/check_mnttab_type.m4 vendor/amd/dist/m4/macros/check_mount_style.m4 vendor/amd/dist/m4/macros/check_mount_trap.m4 vendor/amd/dist/m4/macros/check_mount_type.m4 vendor/amd/dist/m4/macros/check_mtype_printf_type.m4 vendor/amd/dist/m4/macros/check_mtype_type.m4 vendor/amd/dist/m4/macros/check_network_transport_type.m4 vendor/amd/dist/m4/macros/check_nfs_fh_dref.m4 vendor/amd/dist/m4/macros/check_nfs_hn_dref.m4 vendor/amd/dist/m4/macros/check_nfs_prot_headers.m4 vendor/amd/dist/m4/macros/check_nfs_sa_dref.m4 vendor/amd/dist/m4/macros/check_nfs_socket_connection.m4 vendor/amd/dist/m4/macros/check_os_libs.m4 vendor/amd/dist/m4/macros/check_restartable_signal_handler.m4 vendor/amd/dist/m4/macros/check_umount_style.m4 vendor/amd/dist/m4/macros/check_unmount_args.m4 vendor/amd/dist/m4/macros/check_unmount_call.m4 vendor/amd/dist/m4/macros/check_varargs_macros.m4 vendor/amd/dist/m4/macros/expand_cpp_hex.m4 vendor/amd/dist/m4/macros/expand_cpp_int.m4 vendor/amd/dist/m4/macros/expand_cpp_string.m4 vendor/amd/dist/m4/macros/expand_run_string.m4 vendor/amd/dist/m4/macros/extern_optarg.m4 vendor/amd/dist/m4/macros/extern_sys_errlist.m4 vendor/amd/dist/m4/macros/field_mntent_t_mnt_time_string.m4 vendor/amd/dist/m4/macros/func_bad_hasmntopt.m4 vendor/amd/dist/m4/macros/func_bad_memcmp.m4 vendor/amd/dist/m4/macros/func_bad_yp_all.m4 vendor/amd/dist/m4/macros/header_templates.m4 vendor/amd/dist/m4/macros/host_macros.m4 vendor/amd/dist/m4/macros/libtool.m4 vendor/amd/dist/m4/macros/linux_headers.m4 vendor/amd/dist/m4/macros/localconfig.m4 vendor/amd/dist/m4/macros/mount_headers.m4 vendor/amd/dist/m4/macros/opt_amu_cflags.m4 vendor/amd/dist/m4/macros/opt_cppflags.m4 vendor/amd/dist/m4/macros/opt_debug.m4 vendor/amd/dist/m4/macros/opt_ldflags.m4 vendor/amd/dist/m4/macros/opt_libs.m4 vendor/amd/dist/m4/macros/os_cflags.m4 vendor/amd/dist/m4/macros/os_cppflags.m4 vendor/amd/dist/m4/macros/os_ldflags.m4 vendor/amd/dist/m4/macros/package_bugreport.m4 vendor/amd/dist/m4/macros/package_name.m4 vendor/amd/dist/m4/macros/package_version.m4 vendor/amd/dist/m4/macros/prog_lex.m4 vendor/amd/dist/m4/macros/prog_yacc.m4 vendor/amd/dist/m4/macros/save_state.m4 vendor/amd/dist/m4/macros/struct_field_nfs_fh.m4 vendor/amd/dist/m4/macros/struct_mntent.m4 vendor/amd/dist/m4/macros/struct_mnttab.m4 vendor/amd/dist/m4/macros/struct_nfs_args.m4 vendor/amd/dist/m4/macros/struct_nfs_fh.m4 vendor/amd/dist/m4/macros/struct_nfs_fh3.m4 vendor/amd/dist/m4/macros/struct_nfs_gfs_mount.m4 vendor/amd/dist/m4/macros/try_compile_anyfs.m4 vendor/amd/dist/m4/macros/try_compile_nfs.m4 vendor/amd/dist/m4/macros/try_compile_rpc.m4 vendor/amd/dist/m4/macros/type_auth_create_gidlist.m4 vendor/amd/dist/m4/macros/type_autofs_args.m4 vendor/amd/dist/m4/macros/type_cachefs_args.m4 vendor/amd/dist/m4/macros/type_cdfs_args.m4 vendor/amd/dist/m4/macros/type_efs_args.m4 vendor/amd/dist/m4/macros/type_lofs_args.m4 vendor/amd/dist/m4/macros/type_mfs_args.m4 vendor/amd/dist/m4/macros/type_pcfs_args.m4 vendor/amd/dist/m4/macros/type_pte_t.m4 vendor/amd/dist/m4/macros/type_recvfrom_fromlen.m4 vendor/amd/dist/m4/macros/type_rfs_args.m4 vendor/amd/dist/m4/macros/type_rpcvers_t.m4 vendor/amd/dist/m4/macros/type_svc_in_arg.m4 vendor/amd/dist/m4/macros/type_time_t.m4 vendor/amd/dist/m4/macros/type_tmpfs_args.m4 vendor/amd/dist/m4/macros/type_udf_args.m4 vendor/amd/dist/m4/macros/type_ufs_args.m4 vendor/amd/dist/m4/macros/type_xdrproc_t.m4 vendor/amd/dist/m4/macros/type_xfs_args.m4 vendor/amd/dist/m4/macros/type_yp_order_outorder.m4 vendor/amd/dist/m4/macros/with_addon.m4 (contents, props changed) vendor/amd/dist/m4/mk-aclocal (contents, props changed) vendor/amd/dist/m4/mkconf (contents, props changed) vendor/amd/dist/m4/rmtspc (contents, props changed) vendor/amd/dist/m4/update_build_version (contents, props changed) vendor/amd/dist/missing (contents, props changed) vendor/amd/dist/mk-amd-map/Makefile.am (contents, props changed) vendor/amd/dist/mk-amd-map/Makefile.in (contents, props changed) vendor/amd/dist/mkinstalldirs (contents, props changed) vendor/amd/dist/stamp-h.in (contents, props changed) vendor/amd/dist/test-driver (contents, props changed) vendor/amd/dist/wire-test/Makefile.am (contents, props changed) vendor/amd/dist/wire-test/Makefile.in (contents, props changed) vendor/amd/dist/ylwrap (contents, props changed) vendor/amd/dist/ylwrap.amd (contents, props changed) Deleted: vendor/amd/dist/TODO vendor/amd/dist/amd/ops_autofs.c vendor/amd/dist/conf/mount/mount_freebsd3.c vendor/amd/dist/conf/trap/trap_freebsd3.h vendor/amd/dist/cvs-server.txt vendor/amd/dist/libamu/alloca.c vendor/amd/dist/scripts/expn.1 vendor/amd/dist/scripts/expn.in vendor/amd/dist/scripts/fixrmtab Modified: vendor/amd/dist/AUTHORS vendor/amd/dist/BUGS vendor/amd/dist/COPYING vendor/amd/dist/ChangeLog vendor/amd/dist/FAQ vendor/amd/dist/INSTALL vendor/amd/dist/MIRRORS.html vendor/amd/dist/MIRRORS.txt vendor/amd/dist/NEWS vendor/amd/dist/README vendor/amd/dist/README.attrcache vendor/amd/dist/README.ldap vendor/amd/dist/README.y2k vendor/amd/dist/amd/am_ops.c vendor/amd/dist/amd/amd.8 vendor/amd/dist/amd/amd.c vendor/amd/dist/amd/amd.h vendor/amd/dist/amd/amfs_auto.c vendor/amd/dist/amd/amfs_direct.c vendor/amd/dist/amd/amfs_error.c vendor/amd/dist/amd/amfs_generic.c vendor/amd/dist/amd/amfs_host.c vendor/amd/dist/amd/amfs_link.c vendor/amd/dist/amd/amfs_linkx.c vendor/amd/dist/amd/amfs_nfsl.c vendor/amd/dist/amd/amfs_nfsx.c vendor/amd/dist/amd/amfs_program.c vendor/amd/dist/amd/amfs_root.c vendor/amd/dist/amd/amfs_toplvl.c vendor/amd/dist/amd/amfs_union.c vendor/amd/dist/amd/amq_subr.c vendor/amd/dist/amd/amq_svc.c vendor/amd/dist/amd/autil.c vendor/amd/dist/amd/clock.c vendor/amd/dist/amd/conf.c vendor/amd/dist/amd/conf_parse.y vendor/amd/dist/amd/conf_tok.l vendor/amd/dist/amd/get_args.c vendor/amd/dist/amd/info_exec.c vendor/amd/dist/amd/info_file.c vendor/amd/dist/amd/info_hesiod.c vendor/amd/dist/amd/info_ldap.c vendor/amd/dist/amd/info_ndbm.c vendor/amd/dist/amd/info_nis.c vendor/amd/dist/amd/info_nisplus.c vendor/amd/dist/amd/info_passwd.c vendor/amd/dist/amd/info_union.c vendor/amd/dist/amd/map.c vendor/amd/dist/amd/mapc.c vendor/amd/dist/amd/mntfs.c vendor/amd/dist/amd/nfs_prot_svc.c vendor/amd/dist/amd/nfs_start.c vendor/amd/dist/amd/nfs_subr.c vendor/amd/dist/amd/ops_TEMPLATE.c vendor/amd/dist/amd/ops_cachefs.c vendor/amd/dist/amd/ops_cdfs.c vendor/amd/dist/amd/ops_efs.c vendor/amd/dist/amd/ops_lofs.c vendor/amd/dist/amd/ops_mfs.c vendor/amd/dist/amd/ops_nfs.c vendor/amd/dist/amd/ops_nfs3.c vendor/amd/dist/amd/ops_nullfs.c vendor/amd/dist/amd/ops_pcfs.c vendor/amd/dist/amd/ops_tfs.c vendor/amd/dist/amd/ops_tmpfs.c vendor/amd/dist/amd/ops_ufs.c vendor/amd/dist/amd/ops_umapfs.c vendor/amd/dist/amd/ops_unionfs.c vendor/amd/dist/amd/ops_xfs.c vendor/amd/dist/amd/opts.c vendor/amd/dist/amd/readdir.c vendor/amd/dist/amd/restart.c vendor/amd/dist/amd/rpc_fwd.c vendor/amd/dist/amd/sched.c vendor/amd/dist/amd/srvr_amfs_auto.c vendor/amd/dist/amd/srvr_nfs.c vendor/amd/dist/amq/amq.8 vendor/amd/dist/amq/amq.c vendor/amd/dist/amq/amq.h vendor/amd/dist/amq/amq_clnt.c vendor/amd/dist/amq/amq_xdr.c vendor/amd/dist/amq/pawd.1 vendor/amd/dist/amq/pawd.c vendor/amd/dist/bootstrap vendor/amd/dist/conf/checkmount/checkmount_bsd44.c vendor/amd/dist/conf/mount/mount_default.c vendor/amd/dist/conf/mtab/mtab_bsd.c vendor/amd/dist/conf/nfs_prot/nfs_prot_aix5_1.h vendor/amd/dist/conf/nfs_prot/nfs_prot_darwin.h vendor/amd/dist/conf/nfs_prot/nfs_prot_freebsd2.h vendor/amd/dist/conf/nfs_prot/nfs_prot_freebsd3.h vendor/amd/dist/conf/nfs_prot/nfs_prot_osf5.h vendor/amd/dist/conf/nfs_prot/nfs_prot_sunos5_8.h vendor/amd/dist/conf/transp/transp_sockets.c vendor/amd/dist/conf/umount/umount_bsd44.c vendor/amd/dist/doc/am-utils.texi vendor/amd/dist/doc/stamp-vti vendor/amd/dist/doc/texinfo.tex vendor/amd/dist/doc/version.texi vendor/amd/dist/fixmount/fixmount.8 vendor/amd/dist/fixmount/fixmount.c vendor/amd/dist/fsinfo/fsi_analyze.c vendor/amd/dist/fsinfo/fsi_data.h vendor/amd/dist/fsinfo/fsi_dict.c vendor/amd/dist/fsinfo/fsi_gram.y vendor/amd/dist/fsinfo/fsi_lex.l vendor/amd/dist/fsinfo/fsi_util.c vendor/amd/dist/fsinfo/fsinfo.8 vendor/amd/dist/fsinfo/fsinfo.c vendor/amd/dist/fsinfo/fsinfo.h vendor/amd/dist/fsinfo/wr_atab.c vendor/amd/dist/fsinfo/wr_bparam.c vendor/amd/dist/fsinfo/wr_dumpset.c vendor/amd/dist/fsinfo/wr_exportfs.c vendor/amd/dist/fsinfo/wr_fstab.c vendor/amd/dist/hlfsd/hlfsd.8 vendor/amd/dist/hlfsd/hlfsd.c vendor/amd/dist/hlfsd/hlfsd.h vendor/amd/dist/hlfsd/homedir.c vendor/amd/dist/hlfsd/nfs_prot_svc.c vendor/amd/dist/hlfsd/stubs.c vendor/amd/dist/include/am_compat.h vendor/amd/dist/include/am_defs.h vendor/amd/dist/include/am_utils.h vendor/amd/dist/include/am_xdr_func.h vendor/amd/dist/include/amq_defs.h vendor/amd/dist/include/mount_headers1.h vendor/amd/dist/include/mount_headers2.h vendor/amd/dist/ldap-id.ms vendor/amd/dist/ldap-id.txt vendor/amd/dist/libamu/amu.h vendor/amd/dist/libamu/clnt_sperrno.c vendor/amd/dist/libamu/hasmntopt.c vendor/amd/dist/libamu/misc_rpc.c vendor/amd/dist/libamu/mount_fs.c vendor/amd/dist/libamu/mtab.c vendor/amd/dist/libamu/nfs_prot_xdr.c vendor/amd/dist/libamu/strerror.c vendor/amd/dist/libamu/strutil.c vendor/amd/dist/libamu/wire.c vendor/amd/dist/libamu/xdr_func.c vendor/amd/dist/libamu/xutil.c vendor/amd/dist/mk-amd-map/mk-amd-map.8 vendor/amd/dist/mk-amd-map/mk-amd-map.c vendor/amd/dist/scripts/Makefile.am vendor/amd/dist/scripts/Makefile.in vendor/amd/dist/scripts/amd.conf-sample vendor/amd/dist/scripts/amd.conf.5 vendor/amd/dist/scripts/automount2amd.8 vendor/amd/dist/scripts/fixrmtab.in vendor/amd/dist/scripts/lostaltmail.in vendor/amd/dist/vers.m4 vendor/amd/dist/wire-test/wire-test.8 vendor/amd/dist/wire-test/wire-test.c Modified: vendor/amd/dist/AUTHORS ============================================================================== --- vendor/amd/dist/AUTHORS Wed Aug 31 00:08:10 2016 (r305099) +++ vendor/amd/dist/AUTHORS Wed Aug 31 00:08:49 2016 (r305100) @@ -6,22 +6,22 @@ This file lists the ones who contributed particular order, and I thank them all. This is of course not to diminish the smaller contributes of the many others. Thank you all. -* Erez Zadok +* Erez Zadok The most significant changes were made by Erez Zadok in terms of bug fixes, ports, and new features added. Erez Zadok is the current maintainer of am-utils, as of January 1997. -* Ion Badulescu +* Ion Badulescu Co-maintainer of am-utils since late 1999: Linux and Solaris autofs support, Linux NFSv3 support, major code reorganization, etc... -* Randall S. Winchester +* Randall S. Winchester May 7, 1997: contributed a special version of upl102 that included NFS V.3 support. Some of the code was contributed by Christos Zoulas -. I (Erez) ported these changes to am-utils. +. I (Erez) ported these changes to am-utils. September 12, 1997: lots of small prototype cleanups and fixes to numerous files. @@ -35,12 +35,12 @@ February 1, 1998: fixes for NetBSD to be September 4, 1999: assorted fixes for NetBSD 1.4+. -* Hannes Reinecke +* Hannes Reinecke Back in 1995, contributed code for linux. A new parser for file system specific options that only exist under linux. -* Leif Johansson +* Leif Johansson June 22, 1997: minor patch to ensure that systems without an RE library work. @@ -52,7 +52,7 @@ functions. Contributed scripts/amd2ldif August 4, 1997: info_ldap.c fixes and adding two new amd.conf ldap variables: ldap_cache_seconds and ldap_cache_maxmem. -* Andreas Stolcke +* Andreas Stolcke June 22, 1997: patches to ensure that proto= and vers= options work properly in mount tables and can be overridden. Later on, more code @@ -68,11 +68,11 @@ message. December 19, 1997: detected an FMR (Free Memory Read) in amd/mntfs.c, uninit_mntfs(). -* Danny Braniss +* Danny Braniss July, 6 1997: contributed patches to hesiod on bsdi3. -* Tom Schmidt +* Tom Schmidt July 10, 1997: Recommdation to include libgdbm if libc has no dbm_open. Patches for netgrp(host) command. Mods to aux/config.guess to recognize @@ -86,7 +86,7 @@ IFF_ROUTE instead of IFF_LOOPBACK. May 30, 2000: correct logging types for addopts/mergeopts messages. -* Daniel S. Riley +* Daniel S. Riley July 11, 1997: fixes to DU-4.0 to support string POSIX.1 signals, and struct sockaddr with sa_len field. @@ -99,15 +99,15 @@ grpid, nosuid, and actimo. August 15, 1998: fix memory leak in processing of /defaults, and avoid accessing uninitialized memory in osf1. -* Roman Hodek +* Roman Hodek July 23, 1997: Got lots of patches from the Debian Linux folks, who fixed several generic bugs, and one serious one for Linux. The latter involved using connected sockets for NFS mounts on kernels 1.3.10 and older. Roman's -work is baed on amd-upl102, and work from Ian Murdock -and Dominik Kubla . +work is baed on amd-upl102, and work from Ian Murdock +and Dominik Kubla . -* Rainer Orth +* Rainer Orth August 6, 1997: assorted fixes to support hesiod-1.3, solaris 2.4 (which I already fixed but did not release yet), and support for $LDFLAGS at @@ -132,34 +132,34 @@ mount tables in Solaris 8. February 9, 2000: new debug options hrtime (hi-res timer) and xdrtrace. bug fixes. -* Jason Thorpe +* Jason Thorpe August 25, 1997: make amd work when talking to NIS+ servers in NIS compatibility mode. Fix originally came from Matthieu Herrb -. +. -* Chris Metcalf +* Chris Metcalf August 29, 1997: patch to make amd use FQHN for NFS/RPC authentication, useful esp. for cross-domain NFS mounts. September 2, 1997: if plock() succeeded, don't display errno string. -* Enami Tsugutomo +* Enami Tsugutomo September 4, 1997: don't ping remote servers with NFS V.3 always, but V.2, regardless of client's NFS version. (conf/transp/transp_sockets.c) -* Dan Riley +* Dan Riley September 19, 1997: make sure that amd works with more secure portmappers that do not allow forwarding of RPC messages to other services. -* Wolfgang Rupprecht +* Wolfgang Rupprecht August 10, 1997: netbsd and other bsd systems have a mask flag for pcfs_args (msdos mount). -* Christos Zoulas +* Christos Zoulas September 25, 1997: fix to initialize uid/gid fields of pcfs_args_t on netbsd. @@ -181,7 +181,7 @@ TLI implementations. Patch to print ver options had been initialized, so we can print domain, host, and hostd. Linux patch to use umount2(2) if umount(2) fails. -* Bill Paul +* Bill Paul November 5, 1997: NFS v.3 support for AIX 4.2.1, which does *not* include headers for this. Bill had to guess at the right structures, field names, @@ -189,26 +189,26 @@ sizes, alignment, etc. January 15, 1999: small ldap bug fixes. -* Stefan Vogel +* Stefan Vogel November 14, 1997: typo in the subscription instructions to amd-dev. -* Guntram Wolski +* Guntram Wolski November 15, 1997: pointed out mismatching documentation for the -o option. -* Michael Hucka +* Michael Hucka January 11, 1997: pointed out reversed definition of NFS mount options vers and proto. -* Albert Chin +* Albert Chin January 12, 1998: minor bug in output of amd -H. June 23, 2005: assortment of small compile bugs on aix4, and solaris 5/6/7. -* Thomas Richter +* Thomas Richter January 13, 1998: use case insensitive comparisons for variables that need it (such as all hostname related ones, and more). @@ -216,11 +216,11 @@ it (such as all hostname related ones, a July 20, 1998: don't leak memory in the private version of yp_all (when vendor yp_all is bad). -* Fred Korz +* Fred Korz January 30, 1998: minor typo fixed to tftp example in am-utils.texi. -* Donald Buczek +* Donald Buczek March 6, 1998: correctly inherit existing NFS V.3 mounts upon restart. @@ -230,36 +230,36 @@ March 20, 1998: do not close stdout in c allow startup script to redirect it. Set a temporary secure umask(0022) before writing log file and restore it afterwards. -* Matthew Crosby +* Matthew Crosby April 20, 1998: allow arbitrary number of interfaces in wire listing. -* David O'Brien +* David O'Brien September 4, 1998: bug fix to avoid overrunning hostname buffer, and minor amd.conf man page typo correction. September 22, 1999: use more secure vsnprintf in real_plog(). -* Danny Rathjens +* Danny Rathjens October 29, 1998: swap arguments to kill(2) in amd.c. -* Mike Mitchell +* Mike Mitchell November 3, 1998: amd/nfs_subr.c (nfsproc_lookup_2_svc): try to avoid a race condition between unmounting and re-mounting an entry, by increasing the ttl of a looked up entry before unmounting it. -* Douglas K. Rand" +* Douglas K. Rand" December 3, 1998: case insensitive host name match for nfsl. -* David Wolfskill +* David Wolfskill January 28, 1999: don't turn on/off noconn option if it was already in that state. -* Jeffrey C Honig +* Jeffrey C Honig March 14, 1999: clean up more autogenerated files upon "make distclean". March 15, 1999: avoid overly verbose NIS warning even on systems that don't @@ -271,30 +271,30 @@ detection for bsdi4. September 17, 1999: fixes to expn. -* Paul Balyoz +* Paul Balyoz March 26, 1999: ensure lostaltmail displays Y2K compliant dates. -* Jon Peatfield +* Jon Peatfield March 30, 1999: turn off incomplete NFS V.3 support in HPUX 10.20. September 22, 1999: safe reloading of maps without first clearing old copies, and using cached copies if map failed to reload. -* Peter Breitenlohner +* Peter Breitenlohner July 24, 1999: patch for linux 2.2.x to work with older libc5 systems, and nis_isup mis-logic fixes. December 13, 2001: report typos in scripts/amd.conf.5. -* Dale Talcott +* Dale Talcott July 26, 1999: added NFS3 support for AIX mounting. -* Christophe Kalt +* Christophe Kalt July 14, 1999: add netgrpd() syntax function which uses FQHN. -* Andrew J. Korty +* Andrew J. Korty September 5, 1999: pawd works for type:=nfsl. -* Nick Williams +* Nick Williams September 1, 1999: bug fix for incorrect symlinks when two locations are requested simultaneously. @@ -306,38 +306,38 @@ doing rapid mounts and umounts in succes June 5, 2000: better handling of potential race-conditions during rapid u/mounts. Correctly update d_drops stats for amq -s. -* Johann Pfefferl +* Johann Pfefferl November 16, 1999: fix to ldap code so repeated calls to string2he don't corrupt the string passed. -* Amitha Perera +* Amitha Perera December 9, 1999: detect all wire() interfaces correctly. -* Steven Danz +* Steven Danz January 25, 2000: allow browsable auto maps. -* Wolfram Klaus . +* Wolfram Klaus . November 21, 2000: recognize proplist mnttab flag. -* Thomas Klausner +* Thomas Klausner November 21, 2000: lots of NetBSD fixes (many of which are generic). April 18, 2003: patch to reference am-utils info pages in man page. November 28, 2004: small fixes to typos in amd.conf(5) man page. -* Olaf Kirch +* Olaf Kirch February 1, 2001: important Linux NFS error number mapping fixed -* Ahmon Dancy +* Ahmon Dancy February 9, 2001: Apple Rhapsody/Darwin/OS X port -* Sebastien Bahloul +* Sebastien Bahloul July 3, 2001: LDAP fixes and updates to support new APIs March 27, 2002: LDAP bug and port to HPUX-11. -* Philippe Troin +* Philippe Troin July 12, 2001: Proper handling of GNU getopt, support for optionally disabling LDAP/Hesiod, fixes for the dev/nodev option on Linux. Texi documentation fix. @@ -348,65 +348,65 @@ generic mount option. July 17, 2003: pref:=null core dump fix. libgdbm portability. tcpd/librap support. And a few other things for the 6.0 branch. -* Trond Myklebust +* Trond Myklebust January 10, 2002: Proper initialization of the timeo parameter on Linux, TCP _must_ have a timeout 2 orders of magnitude larger than UDP -* George Ross +* George Ross April 29, 2002: Rework of old code, support for wildcards in LDAP queries, and an FD leak fix. Amd -A support. October 21, 2002: ldap_unbind fix for SIGPIPE, and support for LDAPv3 -protocol version parameter (with Tim Colles ). +protocol version parameter (with Tim Colles ). -* Matthias Scheler +* Matthias Scheler June 14, 2002: patch to use "xlatecookie" NFS mount option. -* Jun-ichiro itojun Hagino . +* Jun-ichiro itojun Hagino . June 11, 2002: minor fixes to support NetBSD 1.6A. -* Sean Fagan +* Sean Fagan March 14, 2003: detect and use the MNT2_GEN_OPT_AUTOMNTFS mount flag on OS X / Darwin. -* Hendrik Scholz +* Hendrik Scholz June 9, 2003: mk-amd-map should open temp db file using O_EXCL. -* Mark Davies +* Mark Davies July 14, 2003: define "xlatecookie" mnttab option if not defined (for NetBSD). Support null hesiod entries if they start with a ".". -* Eric S. Raymond +* Eric S. Raymond December 9, 2003: fix unbalanced [] typo in fsinfo man page. -* Martin Blapp +* Martin Blapp July 6, 2004: recognize fields in pcfs_args_t in FreeBSD 5. -* Dan Nelson +* Dan Nelson August 2, 2004: pawd to recognize "host" type mounts. -* Hauke Fath +* Hauke Fath August 3, 2004: pawd to recognize "linkx" type mounts. -* Michael van Elst +* Michael van Elst September 1, 2004: bug fix to avoid race condition in calls to mntctl on AIX. -* Jonathan Chen +* Jonathan Chen October 22, 2004: patch/fix to move mlock/mlockall/plock code after the fork(). June 29, 2005: core dump going off end of exported_ap[] array. September 29, 2005: patch/fix for pawd not to go into an infinite loop. October 25, 2005: patch/fix for pawd to repeatedly resolve path. -* David Rage +* David Rage January 17, 2005: prevent Amd from logging 'Read-only filesystem' errors when the mount point has an ancestor (i.e. '/') that is mounted read-only. -* Kevin Layer +* Kevin Layer January 28, 2005: basic instructions how to setup Amd on Mac OS-X. -* Dan Ottavio +* Dan Ottavio March 2, 2005: new global amd.conf option debug_mtab_file, to set the debug mtab file when using debug_options=mtab. Default has changed from "./mtab" to "/tmp/mtab" to avoid security problem. Bug fixed to ensure that Amd @@ -415,16 +415,13 @@ terminates properly even mtab file doesn * Erik Kline January 3, 2005: implementation of executable maps for Amd. -* Jim Zajkowski +* Jim Zajkowski March 14, 2005: small patch to amd2ldif. * Adam Morley January 27, 2005: synchronize what amd2ldif does vs. what the ldap.schema expects. -* Graeme Wilford +* Graeme Wilford July 4, 2005: buffer overflow in pawd. -* Steve Plite -September 22, 2005: repair reversed meaning of D_AMQ, so amq will unregister -on exit. Modified: vendor/amd/dist/BUGS ============================================================================== --- vendor/amd/dist/BUGS Wed Aug 31 00:08:10 2016 (r305099) +++ vendor/amd/dist/BUGS Wed Aug 31 00:08:49 2016 (r305100) @@ -1,7 +1,7 @@ LIST OF KNOWN BUGS IN AM-UTILS OR OPERATING SYSTEMS Note: report am-utils bugs via Bugzilla to https://bugzilla.am-utils.org/ or -by email to the am-utils@am-utils.org mailing list. +by email to the am-utils mailing list (see www.am-utils.org). (1) mips-sgi-irix* @@ -98,11 +98,11 @@ diff -u -r1.1 utsname.h (4) powerpc-ibm-aix4.2.1.0 -[4A] "Randall S. Winchester" reports that for amd to +[4A] "Randall S. Winchester" reports that for amd to start, you need to kill and restart rpc.mountd and possibly also make sure that nfsd is running. Normally these are not required. -[4B] "Stefan Vogel" reports that if your amq +[4B] "Stefan Vogel" reports that if your amq executable dump core unexpectedly, then it may be a bug in gcc 2.7.x. Upgrade to gcc 2.8.x or use IBM's xlC compiler. @@ -123,7 +123,7 @@ but it is not yet in the glibc-2.0.7-19 A bug in libc results in an amq binary that doesn't work; amq -v dumps core in xdr_string. There is no known fix (source code or vendor patch) at this -time. (Please let am-utils@am-utils.org know if you know of a fix.) +time. (Please let us know if you have a fix; see www.am-utils.org.) (7) *-aix4.3.2.0 Modified: vendor/amd/dist/COPYING ============================================================================== --- vendor/amd/dist/COPYING Wed Aug 31 00:08:10 2016 (r305099) +++ vendor/amd/dist/COPYING Wed Aug 31 00:08:49 2016 (r305100) @@ -1,4 +1,4 @@ -Copyright (c) 1997-2006 Erez Zadok +Copyright (c) 1997-2014 Erez Zadok Copyright (c) 1989 Jan-Simon Pendry Copyright (c) 1989 Imperial College of Science, Technology & Medicine Copyright (c) 1989 The Regents of the University of California. @@ -15,12 +15,7 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgment: - This product includes software developed by the University of - California, Berkeley and its contributors, as well as the Trustees of - Columbia University. -4. Neither the name of the University nor the names of its contributors +3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. Modified: vendor/amd/dist/ChangeLog ============================================================================== --- vendor/amd/dist/ChangeLog Wed Aug 31 00:08:10 2016 (r305099) +++ vendor/amd/dist/ChangeLog Wed Aug 31 00:08:49 2016 (r305100) @@ -1,14 +1,564 @@ -2006-05-11 Erez Zadok +2014-10-28 Christos Zoulas ******************************************************************* - *** Released am-utils-6.1.5 *** + *** Released am-utils-6.2 *** ******************************************************************* -2006-05-10 Erez Zadok + * add ylwrap.amd, sick and tired of patching broken ylwrap. + +2014-09-05 Christos Zoulas + + * factor out the size check for both readdir methods + (raven at themaw.net) + +2014-09-03 Christos Zoulas + + * configure test for 64 bit xdr function (raven at themaw.net) + +2014-09-01 Christos Zoulas + + * bug fix from raven at themaw.net to prevent writing v3 handle + to a v2 structure. + +2014-07-21 Christos Zoulas + + * fix permission problems with access + * auto_nfs_version = 3 now works for me. + +2014-07-20 Christos Zoulas + + * refresh some autoconf files + * force autoconf version since earlier versions don't work + * changes from raven at themaw.net to support NFSv3 for automounted + toplevel filesystems presented to the list in May. A few bug fixes + and integration changes by me. The code now works well enough to + mount the filesystem with NFSv3 and automount children but readdir + does not work yet (so no listing of automounted filesystems). + The new code is not enabled by default. To enable use + auto_nfs_version = 3 + in your configuration file. + +2014-03-26 Christos Zoulas + + From Ian Kent + + * use mktemp in scripts/fixrmtab + * fix documentatio nits + * [linux] Add ext2, ext3, ext4 specific mount options + * fix tcpwrappers (hosts.{allow,deny} problems for specific host + entries + +2014-03-20 Christos Zoulas + + + * don't background autofs umount + * avoid fh NULL dereference on umount + * handle ENOENT umount return for autofs mounts + * fix error message in get_nfs_version + * fix debug log deadlock + * [linux] retry umount on EBUSY + * handle failed umount on exit + +2014-03-09 Christos Zoulas + + * Remove BSD advertising clause. + * Remove expn program which is not used by anything + +2013-12-05 Christos Zoulas + + * Change the way we handle multiple lex scanners and yacc parsers + in a single program. Our old patch to ylwrap does not work anymore + because the bison parsers need shared symbols that start with yy + and we can't easily select which ones work. So now we use -P and + -p to let lex and yacc do the work for us. This requires a patch + to ylwrap, but it is smaller. + + +2013-12-05 Christos Zoulas + + * Change the way we handle multiple lex scanners and yacc parsers + in a single program. Our old patch to ylwrap does not work anymore + because the bison parsers need shared symbols that start with yy + and we can't easily select which ones work. So now we use -P and + -p to let lex and yacc do the work for us. This requires a patch + to ylwrap, but it is smaller. + +2013-05-14 Christos Zoulas + + * update to handle new autoconf and regen files + +2012-11-23 Christos Zoulas + + * recognize mountport=, noacl options + * simplify the bootstrap process, by forcing + all the files to be rebuild with autoreconf -f - i + +2012-10-03 Christos Zoulas + + * add missing ops_nfs4.c to the Makefile.am + +2012-09-14 Christos Zoulas + + * add locking option handling for lustre + * fix noatime, nodiratime, mandlock for linux + +2012-07-25 Christos Zoulas + + * bug fixes for lustre rhost parsing + +2012-06-27 Christos Zoulas + + * Disable 1/2-baked sun map support to avoid SIGSEGV + +2012-06-16 Christos Zoulas + + ******************************************************************* + *** Released am-utils-6.2-rc1 *** + ******************************************************************* + + * Fix libtool.m4 to work with later versions of autoconf. + * In buildall, use eval so that quoted strings work + * Centralize nfs version checking function, and introduce + new configuration variable nfs_vers_ping, which is the + max version we ping for. This is not documented yet, because + there might be a better way separate the max version we can + use vs the max version we ping for. + +2012-06-09 Christos Zoulas + + * fix issue with parsing nfsv4 security option strings + +2012-05-01 Christos Zoulas + + * Handle EPERM return from v4 file handles + in old linux kernels + +2012-03-09 Christos Zoulas + + * fix linux autofs detection + * fix wrong types in new amq mount xdr processing + +2012-01-25 Christos Zoulas + + * FreeBSD portability fixes + +2012-01-23 Christos Zoulas + + * Avoid type punned warnings + +2011-12-29 Christos Zoulas + + * fix bug I introduced in get_nfs_version that caused it to return 0 + * add direct support for ext{2,3,4} + +2011-12-15 Christos Zoulas + + * Include on linux, to grab extra mount flags + * Add support for lustre + +2011-11-28 Christos Zoulas + + * For nfsl mounts, match against either the short local + host name or the fqdn name. + +2011-10-06 Christos Zoulas + + * Add NFSv4 support (loosely based on Ramya's code). + Currently if the NFSv4 mount fails with ENOENT we fail + back to NFSv3, unless -DNO_FALLBACK. + * Replace strdup with xstrdup. It is not nice to replace + system functions with ones that behave differently. + * Add various consistency checks (caller function checks + variable for NULL, but callee does not). + * Fix error handling in various paths. + * Don't check before using XFREE(). free(NULL) works. + +2011-09-15 Christos Zoulas + + * amq -i addition (prints info about the map files) + +2011-09-14 Christos Zoulas + + * Solaris OS and compiler fixes from: + Hofmann, Frank + Sayle, Alex + - (void)&var generates warnings, removed + - __inline is invalid, changed with inline + - and other headers have extra dependendcies + ` +2011-08-11 Christos Zoulas + + * fix potential buffer overflow in expand_error() + (Richard Kettlewell). Does not seem to be exploitable. + + * simplify %option parsing to appease ancient flex. + +2011-06-21 Christos Zoulas + + * add support for linux autofs version 5 (untested) + +2011-06-18 Christos Zoulas + + * roll back to an older version of libtool that works + + * newer versions of config.guess and config.sub + + * minor fixes to buildall + +2011-05-19 Christos Zoulas + + * m4/macros/libtool.m4: for AIX AC_LANG_PROGRAM is incorrectly + used and the latest autoconf gives an error. For now just + quote it. + + * configure.in: Fedora Core 15 and RedHat 6 now don't define + af_family_t in , but in . + Include so that we get + indirectly. This caused the detection + test to fail. + +2010-11-24 Erez Zadok + + * m4/macros/os_cflags.m4: for linux, define _GNU_SOURCE (to get + definitions for O_LARGEFILE and more). + +2010-11-20 Christos Zoulas + + * Update news items, add release readme, mark as rc1 + + * Fix addopts code to work with options that are key=value + when the built-in hasmntopt() code is not used. The problem + was that the code passed "key=" to hasmntopt not "key". + +2009-12-10 Christos Zoulas + + * Copy all fields of the am_opts structure + When we introduced am_loc we also added a function to + create a duplicate of an am_opts structure. As it turns + out, that only made a partial copy of the struct and some + fields (e.g. opt_cache) was left blank in the new structure. + Unfortunately any code that was checking the options + through the mntfs structure was mislead by the partial + copy: caching was disabled completely, for example, and + since browsing relies on caching being enabled it wasn't + working either. + From: Krisztian Kovacs + + * Initialize RPC authentication flavor to AUTH_UNIX instead + of zero. RHEL 5 uses version 6 of the mount_arg structure + that includes the desired RPC authorization flavour. + Unfortunately amd initializes that value to zero, meaning + AUTH_NULL, resulting in all NFS servers denying operations. + From: Krisztian Kovacs + + * Make sure to remove nodes in the proper order when going + down. Depending on what order the nodes got created it's + possible that the parent of a node has a bigger am_mapno + (index in exported_ap[]) so that it gets freed before + its child while the child's am_parent pointer is still + pointing to the already freed block of memory. + This change makes sure that umount_exported() cleans up + all children of a node first before freeing the node. + From: Krisztian Kovacs + + * Fix Linux-specific stuff in ops_tmpfs.c + AUTOFS_TMPFS_FS_FLAGS is defined only in the Linux-specific + conf_linux.c file, so it cannot be built on Solaris. + From: Krisztian Kovacs + + * Add missing parenthesis to fix defined(XXX + From: Krisztian Kovacs + + * In the previous commit we've already made a change that + makes this code unnecessary since the node is returned + even if the backing file server is known to be down. + Since the code path is unused it should be removed. + From: Krisztian Kovacs + + * amfs_generic_lookup_child() tries to find an alternate + file server if it detects that the current one is down. + However, in the comparison used to decide if a possible + mount is the same as the current one it compares the am_loc + pointers instead of the actual mntfs pointers. Since + amfs_lookup_one_location() creates a brand new am_loc + structure for the returned mntfs structure the am_loc + pointer will be different even if the mntfs it's pointing + to is the same. + This tricks amfs_generic_lookup_child() think it has + found an alternate file server while it hasn't and thus + starts multiple racing mounts for the very same node and + mntfs. + From: Krisztian Kovacs + + * In the new am_loc scheme mounted mntfs structures still + have their mf_fo structure left intact. So when restart + creates a fake mntfs for an already mounted filesystem it + should not free mf_fo right away. + From: Krisztian Kovacs + + * Setting the error flag of the mntfs for which the share + is already mounted results in the mount point not being + removed when it times out. (Amd considers it an error + mntfs and thus umount becomse a no-op.) + From: Krisztian Kovacs + + * Right now AMD sets all timeout values to their defaults + even if you explicitly set them to zero. This patch + introduces separate flags that store if the respective + values have been set and the code path setting default + values checks these flags instead of testing the values + for zero. [Linux only] + From: Krisztian Kovacs + + * Fix mntfs related lookup/(un)mount race conditions, by + introducing a new structure linking an mntfs to a node. + From: Krisztian Kovacs + + * We have to free the buffers allocated by the XDR routines when + decoding the mount response after copying them to their final place. + From: Krisztian Kovacs + +2009-12-09 Christos Zoulas + + * Free continuation in amfs_retry() if we don't call amfs_bgmount() + Normally it's amfs_bgmount() which frees the continuation. However, if + the mount is already in progress and we're in amfs_retry() for another + node we don't try mounting the filesystem once again. Still, we have + to free the continuation as we won't get called again and thus would + leak the continuation structure and our am_loc references. + From: Krisztian Kovacs + + * Fix use-after-free and double free of mntfs private data + ops_nfs.c(nfs_init) does not clear private data pointer after free(). + This leads to use-after-free and double free in case mount() fails. + (found by valgrind) + From: Krisztian Kovacs + +2009-11-23 Christos Zoulas + + * The temporary filename buffer was leaked in lock_mtab(). + From: Krisztian Kovacs + +2009-10-27 Christos Zoulas + + * Deal with errno.h->sys/errno.h better + +2009-10-26 Christos Zoulas + + * Fix issue with autoconf 2.63 + + * Fix compile warnings for gcc-4.4.x + +2009-04-15 Christos Zoulas + + * Share the LDAP connection between different maps to save resources + on the LDAP server. (Olaf Flebbe ) + +2009-03-20 Christos Zoulas + + * Fix largefile re-definitions + + * Fix compilation error caused in previous patch + +2009-02-19 Christos Zoulas + + * Add a synchronous unmount amq rpc that will wait for the remote + filesystem to be unmounted, or return an error. Enabled by amq -uu + +2009-01-11 Erez Zadok + + * amd/ops_udf.c: don't define functions/variables which may not be + used. + + * amd/ops_tmpfs.c (mount_tmpfs): force gcc not to complain about + unused variables. + + * config.guess.long: properly support Fedora Core. + +2009-01-09 Christos Zoulas + + * Fix nfs mounts on linux 2.6.26 by explicitly initializing context. + + * Treat an empty sublink as an unset sublink; this allows us to + say sublink:=; in a spec to override the default. (This produces + Bad selector error, but it works. XXX: We need to decide how to + unset a selector. I proposed an unset keyword a while ago). + +2009-01-06 Christos Zoulas + + * re-renerate all generated files with newer versions of the + auto-tools. + + * move INSTALL to INSTALL.am-utils to avoid conflicts + + * fix incompatibilities with new m4 and new autoconf. + + * add UDF filesystem support. + + * fix NetBSD nfs file handle detection. + +2009-01-02 Christos Zoulas + + * add nocasetrans, nojoliet, rrcaseins for cd9660 filesystems + +2008-12-03 Christos Zoulas + + * allow ldap queries try a comma-separated list of servers given as: + + ldap_hostports = host1:port1,host2,host3:port3 + + original patch from Florian Geyer + +2008-09-19 Christos Zoulas + + * the auth_create gid on NetBSD is int + + * deal with lossage from flex -P + + * fix missing/incorrect prototypes + +2008-09-17 Christos Zoulas + + * fix manual page section issues (sorting, non-existant) + + * add missing forward declarations + + * avoid null pointer derefs (coverity) + + * more portable endian detection support + + * implement tmpfs support + + * use sizeof var instead of constant + + * fix yyerror declaration and definition + + * fix yy function renaming, and correct some renaming issues. + + * work around automake < 1.9 issue where ylwrap is not being run + for a single yacc or lex file. + + * NetBSD + - handle headers that need other headers to compile + - add exfs and tmpfs specific glue + - add options log, noatime, nocoredump, nodevmtime, softdep, + symperm, union + - NetBSD's new mount system call needs the size of the opaque + filesystem specific structure, but passing 0 for now works. + We would need to change a lot more code to pass the size from + the fs-specific calls, so for now punt. + - recvfrom takes socklen_t * on NetBSD + - handle newer NetBSD using statvfs + - NetBSD calls its ufs ffs + + * Linux + - Most recent kernels have trouble with trying to parse the pid + hostname and do locking. What before was a silent failure, now + there is a warning printed and the mount is rejected. This is + the simplest fix: + (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479884) + +2007-04-13 Erez Zadok + + * amd/sun_map.c (sun_append_str): When translating '&' from Sun + automounter maps, replace it with "${key}" in the Amd map, not + with the value of the key at the time. This way '*' maps work + too. + + * config.guess.long: don't use -q option to grep because some + systems don't support it. Bug fix for solaris. + +2007-03-11 Christos Zoulas + + * amd/opts.c (expand_op): Don't call xstrlcpy() to truncate a + string. It causes spurious xstrlcpy() syslog() errors. Use + memcpy() and explicitly terminate the string. + +2007-01-20 Erez Zadok + + * updated copyright year to 2007 on all files. + +2006-12-27 Erez Zadok + + * minor new port: ia64-hp-hpux11.23 + + * m4/macros/check_libwrap_severity.m4 (LIBS): also test if caller + needs to define rfc931_timeout. + + * amd/sun2amd.c: define rfc931_timeout and allow/deny_severity for + libwrap. + + * amd/amq_svc.c: some versions of libwrap require the caller to + define rfc931_timeout in addition to allow/deny_severity. + + * amd/amfs_toplvl.c (amfs_toplvl_init): properly detect when + forced unmount functionality exists for all systems. + + * libamu/mount_fs.c (compute_nfs_args): reset nfs_args_t->pathconf + only if field exists. + + * conf/nfs_prot/nfs_prot_hpux11.h: prevent HPUX 11.23 from + including or (TLI definitions are already + included from elsewhere). + + * configure.in: detect nfs_args_t->pathconf field. + +2006-11-27 Erez Zadok + + * doc/Makefile.am: properly publish html files using newer + text2html. + +2006-11-27 Erez Zadok + + * doc/Makefile.am: obfuscate emails in ChangeLog before it is *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Wed Aug 31 00:10:42 2016 Return-Path: Delivered-To: svn-src-vendor@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 2A11EBC9986; Wed, 31 Aug 2016 00:10:42 +0000 (UTC) (envelope-from cy@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 D67FD2EEE; Wed, 31 Aug 2016 00:10:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7V0AfOd029224; Wed, 31 Aug 2016 00:10:41 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7V0Afp0029223; Wed, 31 Aug 2016 00:10:41 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201608310010.u7V0Afp0029223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 31 Aug 2016 00:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305101 - vendor/amd/6.2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2016 00:10:42 -0000 Author: cy Date: Wed Aug 31 00:10:40 2016 New Revision: 305101 URL: https://svnweb.freebsd.org/changeset/base/305101 Log: Tag import of am-utils 6.2. Added: vendor/amd/6.2/ - copied from r305100, vendor/amd/dist/ From owner-svn-src-vendor@freebsd.org Wed Aug 31 13:50:26 2016 Return-Path: Delivered-To: svn-src-vendor@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 6488EBC9F65; Wed, 31 Aug 2016 13:50:26 +0000 (UTC) (envelope-from emaste@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 30CAE123; Wed, 31 Aug 2016 13:50:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7VDoPNc041258; Wed, 31 Aug 2016 13:50:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7VDoNk3041242; Wed, 31 Aug 2016 13:50:23 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201608311350.u7VDoNk3041242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 31 Aug 2016 13:50:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305126 - in vendor/elftoolchain/dist: common elfcopy elfdump libelf libelftc readelf X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2016 13:50:26 -0000 Author: emaste Date: Wed Aug 31 13:50:23 2016 New Revision: 305126 URL: https://svnweb.freebsd.org/changeset/base/305126 Log: Import ELF Tool Chain snapshot at revision 3490 From http://svn.code.sf.net/p/elftoolchain/code/ Added: vendor/elftoolchain/dist/libelftc/elftc_timestamp.3 (contents, props changed) vendor/elftoolchain/dist/libelftc/elftc_timestamp.c (contents, props changed) Modified: vendor/elftoolchain/dist/common/elfdefinitions.h vendor/elftoolchain/dist/elfcopy/archive.c vendor/elftoolchain/dist/elfcopy/ascii.c vendor/elftoolchain/dist/elfcopy/pe.c vendor/elftoolchain/dist/elfdump/elfdump.c vendor/elftoolchain/dist/libelf/elf_flagdata.3 vendor/elftoolchain/dist/libelftc/Makefile vendor/elftoolchain/dist/libelftc/elftc_bfd_find_target.3 vendor/elftoolchain/dist/libelftc/elftc_reloc_type_str.c vendor/elftoolchain/dist/libelftc/libelftc.h vendor/elftoolchain/dist/libelftc/libelftc_bfdtarget.c vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c vendor/elftoolchain/dist/readelf/readelf.1 vendor/elftoolchain/dist/readelf/readelf.c Modified: vendor/elftoolchain/dist/common/elfdefinitions.h ============================================================================== --- vendor/elftoolchain/dist/common/elfdefinitions.h Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/common/elfdefinitions.h Wed Aug 31 13:50:23 2016 (r305126) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfdefinitions.h 3455 2016-05-09 13:47:29Z emaste $ + * $Id: elfdefinitions.h 3485 2016-08-18 13:38:52Z emaste $ */ /* @@ -2091,7 +2091,10 @@ _ELF_DEFINE_RELOC(R_RISCV_GNU_VTINHERIT, _ELF_DEFINE_RELOC(R_RISCV_GNU_VTENTRY, 42) \ _ELF_DEFINE_RELOC(R_RISCV_ALIGN, 43) \ _ELF_DEFINE_RELOC(R_RISCV_RVC_BRANCH, 44) \ -_ELF_DEFINE_RELOC(R_RISCV_RVC_JUMP, 45) +_ELF_DEFINE_RELOC(R_RISCV_RVC_JUMP, 45) \ +_ELF_DEFINE_RELOC(R_RISCV_RVC_LUI, 46) \ +_ELF_DEFINE_RELOC(R_RISCV_GPREL_I, 47) \ +_ELF_DEFINE_RELOC(R_RISCV_GPREL_S, 48) #define _ELF_DEFINE_SPARC_RELOCATIONS() \ _ELF_DEFINE_RELOC(R_SPARC_NONE, 0) \ Modified: vendor/elftoolchain/dist/elfcopy/archive.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/archive.c Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/elfcopy/archive.c Wed Aug 31 13:50:23 2016 (r305126) @@ -38,7 +38,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: archive.c 3287 2015-12-31 16:58:48Z emaste $"); +ELFTC_VCSID("$Id: archive.c 3490 2016-08-31 00:12:22Z emaste $"); #define _ARMAG_LEN 8 /* length of ar magic string */ #define _ARHDR_LEN 60 /* length of ar header */ @@ -440,6 +440,7 @@ ac_write_objs(struct elfcopy *ecp, int o struct archive *a; struct archive_entry *entry; struct ar_obj *obj; + time_t timestamp; int nr; if ((a = archive_write_new()) == NULL) @@ -450,7 +451,9 @@ ac_write_objs(struct elfcopy *ecp, int o /* Write the archive symbol table, even if it's empty. */ entry = archive_entry_new(); archive_entry_copy_pathname(entry, "/"); - archive_entry_set_mtime(entry, time(NULL), 0); + if (elftc_timestamp(×tamp) != 0) + err(EXIT_FAILURE, "elftc_timestamp"); + archive_entry_set_mtime(entry, timestamp, 0); archive_entry_set_size(entry, (ecp->s_cnt + 1) * sizeof(uint32_t) + ecp->s_sn_sz); AC(archive_write_header(a, entry)); Modified: vendor/elftoolchain/dist/elfcopy/ascii.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/ascii.c Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/elfcopy/ascii.c Wed Aug 31 13:50:23 2016 (r305126) @@ -36,7 +36,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: ascii.c 3446 2016-05-03 01:31:17Z emaste $"); +ELFTC_VCSID("$Id: ascii.c 3487 2016-08-24 18:12:08Z emaste $"); static void append_data(struct section *s, const void *buf, size_t sz); static char hex_digit(uint8_t n); @@ -251,6 +251,7 @@ create_elf_from_srec(struct elfcopy *ecp sec_index = 1; sec_addr = entry = 0; while (fgets(line, _LINE_BUFSZ, ifp) != NULL) { + sz = 0; if (line[0] == '\r' || line[0] == '\n') continue; if (line[0] == '$' && line[1] == '$') { Modified: vendor/elftoolchain/dist/elfcopy/pe.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/pe.c Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/elfcopy/pe.c Wed Aug 31 13:50:23 2016 (r305126) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: pe.c 3477 2016-05-25 20:00:42Z kaiwang27 $"); +ELFTC_VCSID("$Id: pe.c 3490 2016-08-31 00:12:22Z emaste $"); /* Convert ELF object to Portable Executable (PE). */ void @@ -54,6 +54,7 @@ create_pe(struct elfcopy *ecp, int ifd, PE_Buffer *pb; const char *name; size_t indx; + time_t timestamp; int elferr; if (ecp->otf == ETF_EFI || ecp->oem == EM_X86_64) @@ -89,7 +90,9 @@ create_pe(struct elfcopy *ecp, int ifd, pch.ch_machine = IMAGE_FILE_MACHINE_UNKNOWN; break; } - pch.ch_timestamp = (uint32_t) time(NULL); + if (elftc_timestamp(×tamp) != 0) + err(EXIT_FAILURE, "elftc_timestamp"); + pch.ch_timestamp = (uint32_t) timestamp; if (pe_update_coff_header(pe, &pch) < 0) err(EXIT_FAILURE, "pe_update_coff_header() failed"); Modified: vendor/elftoolchain/dist/elfdump/elfdump.c ============================================================================== --- vendor/elftoolchain/dist/elfdump/elfdump.c Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/elfdump/elfdump.c Wed Aug 31 13:50:23 2016 (r305126) @@ -50,7 +50,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: elfdump.c 3474 2016-05-17 20:44:53Z emaste $"); +ELFTC_VCSID("$Id: elfdump.c 3482 2016-08-02 18:47:00Z emaste $"); #if defined(ELFTC_NEED_ELF_NOTE_DEFINITION) #include "native-elf-format.h" @@ -332,6 +332,8 @@ static const char *ei_abis[256] = { "ELFOSABI_IRIX", "ELFOSABI_FREEBSD", "ELFOSABI_TRU64", "ELFOSABI_MODESTO", "ELFOSABI_OPENBSD", [17] = "ELFOSABI_CLOUDABI", + [64] = "ELFOSABI_ARM_AEABI", + [97] = "ELFOSABI_ARM", [255] = "ELFOSABI_STANDALONE" }; Modified: vendor/elftoolchain/dist/libelf/elf_flagdata.3 ============================================================================== --- vendor/elftoolchain/dist/libelf/elf_flagdata.3 Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/libelf/elf_flagdata.3 Wed Aug 31 13:50:23 2016 (r305126) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elf_flagdata.3 2884 2013-01-11 02:03:46Z jkoshy $ +.\" $Id: elf_flagdata.3 3479 2016-06-25 20:44:33Z jkoshy $ .\" .Dd December 3, 2011 .Os @@ -208,16 +208,13 @@ was called without a program header bein .Xr elf 3 , .Xr elf32_newehdr 3 , .Xr elf32_newphdr 3 , -.Xr elf32_newshdr 3 , .Xr elf64_newehdr 3 , .Xr elf64_newphdr 3 , -.Xr elf64_newshdr 3 , .Xr elf_newdata 3 , .Xr elf_update 3 , .Xr gelf 3 , .Xr gelf_newehdr 3 , .Xr gelf_newphdr 3 , -.Xr gelf_newshdr 3 , .Xr gelf_update_dyn 3 , .Xr gelf_update_move 3 , .Xr gelf_update_rel 3 , Modified: vendor/elftoolchain/dist/libelftc/Makefile ============================================================================== --- vendor/elftoolchain/dist/libelftc/Makefile Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/libelftc/Makefile Wed Aug 31 13:50:23 2016 (r305126) @@ -1,4 +1,4 @@ -# $Id: Makefile 3418 2016-02-19 20:04:42Z emaste $ +# $Id: Makefile 3489 2016-08-31 00:12:15Z emaste $ TOP= ${.CURDIR}/.. @@ -10,6 +10,7 @@ SRCS= elftc_bfdtarget.c \ elftc_reloc_type_str.c \ elftc_set_timestamps.c \ elftc_string_table.c \ + elftc_timestamp.c \ elftc_version.c \ libelftc_bfdtarget.c \ libelftc_dem_arm.c \ Modified: vendor/elftoolchain/dist/libelftc/elftc_bfd_find_target.3 ============================================================================== --- vendor/elftoolchain/dist/libelftc/elftc_bfd_find_target.3 Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/libelftc/elftc_bfd_find_target.3 Wed Aug 31 13:50:23 2016 (r305126) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elftc_bfd_find_target.3 3348 2016-01-18 14:18:50Z emaste $ +.\" $Id: elftc_bfd_find_target.3 3488 2016-08-24 18:15:57Z emaste $ .\" .Dd November 30, 2011 .Os @@ -89,6 +89,7 @@ Known descriptor names and their propert .It Li elf64-ia64-big Ta ELF Ta MSB Ta 64 .It Li elf64-ia64-little Ta ELF Ta LSB Ta 64 .It Li elf64-little Ta ELF Ta LSB Ta 64 +.It Li elf64-littleaarch64 Ta ELF Ta LSB Ta 64 .It Li elf64-littlemips Ta ELF Ta LSB Ta 64 .It Li elf64-powerpc Ta ELF Ta MSB Ta 64 .It Li elf64-powerpcle Ta ELF Ta LSB Ta 64 Modified: vendor/elftoolchain/dist/libelftc/elftc_reloc_type_str.c ============================================================================== --- vendor/elftoolchain/dist/libelftc/elftc_reloc_type_str.c Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/libelftc/elftc_reloc_type_str.c Wed Aug 31 13:50:23 2016 (r305126) @@ -545,6 +545,9 @@ elftc_reloc_type_str(unsigned int mach, case 43: return "R_RISCV_ALIGN"; case 44: return "R_RISCV_RVC_BRANCH"; case 45: return "R_RISCV_RVC_JUMP"; + case 46: return "R_RISCV_RVC_LUI"; + case 47: return "R_RISCV_GPREL_I"; + case 48: return "R_RISCV_GPREL_S"; } break; case EM_SPARC: Added: vendor/elftoolchain/dist/libelftc/elftc_timestamp.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/elftoolchain/dist/libelftc/elftc_timestamp.3 Wed Aug 31 13:50:23 2016 (r305126) @@ -0,0 +1,79 @@ +.\" Copyright (c) 2016 The FreeBSD Foundation. All rights reserved. +.\" +.\" This documentation was written by Ed Maste under sponsorship of +.\" the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" This software is provided by the author and contributors ``as is'' and +.\" any express or implied warranties, including, but not limited to, the +.\" implied warranties of merchantability and fitness for a particular purpose +.\" are disclaimed. In no event shall the author or contributors be liable +.\" for any direct, indirect, incidental, special, exemplary, or consequential +.\" damages (including, but not limited to, procurement of substitute goods +.\" or services; loss of use, data, or profits; or business interruption) +.\" however caused and on any theory of liability, whether in contract, strict +.\" liability, or tort (including negligence or otherwise) arising in any way +.\" out of the use of this software, even if advised of the possibility of +.\" such damage. +.\" +.\" $Id$ +.\" +.Dd August 24, 2016 +.Os +.Dt ELFTC_TIMESTAMP 3 +.Sh NAME +.Nm elftc_timestamp +.Nd return the current or environment-provided timestamp +.Sh LIBRARY +.Lb libelftc +.Sh SYNOPSIS +.In libelftc.h +.Ft int +.Fo elftc_timestamp +.Fa "time_t *timestamp" +.Fc +.Sh DESCRIPTION +The +.Fn elftc_timestamp +function returns a timestamp supplied by the +.Ev SOURCE_DATE_EPOCH +environment variable, or the current time provided by +.Xr time 3 +if the environment variable is not set. +.Pp +The +.Ar timestamp +argument specifies a pointer to the location where the timestamp will be +stored. +.Sh RETURN VALUE +Function +.Fn elftc_timestamp +returns 0 on success, and -1 in the event of an error. +.Sh ERRORS +The +.Fn elftc_timestamp +function may fail with the following errors: +.Bl -tag -width ".Bq Er ERANGE" +.It Bq Er EINVAL +.Ev SOURCE_DATE_EPOCH +contains invalid characters. +.It Bq Er ERANGE +.Ev SOURCE_DATE_EPOCH +specifies a negative value or a value that cannot be stored in a +time_t. +.El +The +.Fn elftc_timestamp +function may also fail for any of the reasons described in +.Xr strtoll 3 . +.Sh SEE ALSO +.Xr strtoll 3 , +.Xr time 3 Added: vendor/elftoolchain/dist/libelftc/elftc_timestamp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/elftoolchain/dist/libelftc/elftc_timestamp.c Wed Aug 31 13:50:23 2016 (r305126) @@ -0,0 +1,55 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Ed Maste under sponsorship + * of the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include + +int +elftc_timestamp(time_t *timestamp) +{ + long long source_date_epoch; + char *env, *eptr; + + if ((env = getenv("SOURCE_DATE_EPOCH")) != NULL) { + errno = 0; + source_date_epoch = strtoll(env, &eptr, 10); + if (*eptr != '\0') + errno = EINVAL; + if (source_date_epoch < 0) + errno = ERANGE; + if (errno != 0) + return (-1); + *timestamp = source_date_epoch; + return (0); + } + *timestamp = time(NULL); + return (0); +} Modified: vendor/elftoolchain/dist/libelftc/libelftc.h ============================================================================== --- vendor/elftoolchain/dist/libelftc/libelftc.h Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/libelftc/libelftc.h Wed Aug 31 13:50:23 2016 (r305126) @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: users/kaiwang27/elftc/libelftc.h 392 2009-05-31 19:17:46Z kaiwang27 $ - * $Id: libelftc.h 3418 2016-02-19 20:04:42Z emaste $ + * $Id: libelftc.h 3489 2016-08-31 00:12:15Z emaste $ */ #ifndef _LIBELFTC_H_ @@ -91,6 +91,7 @@ int elftc_string_table_remove(Elftc_Str const char *_string); const char *elftc_string_table_to_string(Elftc_String_Table *_table, size_t offset); +int elftc_timestamp(time_t *_timestamp); const char *elftc_version(void); #ifdef __cplusplus } Modified: vendor/elftoolchain/dist/libelftc/libelftc_bfdtarget.c ============================================================================== --- vendor/elftoolchain/dist/libelftc/libelftc_bfdtarget.c Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/libelftc/libelftc_bfdtarget.c Wed Aug 31 13:50:23 2016 (r305126) @@ -30,7 +30,7 @@ #include "_libelftc.h" -ELFTC_VCSID("$Id: libelftc_bfdtarget.c 3309 2016-01-10 09:10:51Z kaiwang27 $"); +ELFTC_VCSID("$Id: libelftc_bfdtarget.c 3488 2016-08-24 18:15:57Z emaste $"); struct _Elftc_Bfd_Target _libelftc_targets[] = { @@ -250,6 +250,14 @@ struct _Elftc_Bfd_Target _libelftc_targe }, { + .bt_name = "elf64-littleaarch64", + .bt_type = ETF_ELF, + .bt_byteorder = ELFDATA2LSB, + .bt_elfclass = ELFCLASS64, + .bt_machine = EM_AARCH64, + }, + + { .bt_name = "elf64-littlemips", .bt_type = ETF_ELF, .bt_byteorder = ELFDATA2LSB, Modified: vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c ============================================================================== --- vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c Wed Aug 31 13:50:23 2016 (r305126) @@ -36,7 +36,7 @@ #include "_libelftc.h" -ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3447 2016-05-03 13:32:23Z emaste $"); +ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3480 2016-07-24 23:38:41Z emaste $"); /** * @file cpp_demangle.c @@ -2551,7 +2551,7 @@ again: case 'w': /* wchar_t */ - if (!cpp_demangle_push_str(ddata, "wchar_t", 6)) + if (!cpp_demangle_push_str(ddata, "wchar_t", 7)) goto clean; ++ddata->cur; goto rtn; Modified: vendor/elftoolchain/dist/readelf/readelf.1 ============================================================================== --- vendor/elftoolchain/dist/readelf/readelf.1 Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/readelf/readelf.1 Wed Aug 31 13:50:23 2016 (r305126) @@ -22,7 +22,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: readelf.1 3219 2015-05-24 23:42:34Z kaiwang27 $ +.\" $Id: readelf.1 3486 2016-08-22 14:10:05Z emaste $ .\" .Dd September 13, 2012 .Os @@ -43,12 +43,12 @@ .Op Fl p Ar section | Fl -string-dump Ns = Ns Ar section .Op Fl r | Fl -relocs .Op Fl t | Fl -section-details -.Op Fl x Ar section | Fl -hex-dump Ns = Ns Ar section .Op Fl v | Fl -version .Oo .Fl w Ns Oo Ns Ar afilmoprsFLR Ns Oc | .Fl -debug-dump Ns Op Ns = Ns Ar long-option-name , Ns ... .Oc +.Op Fl x Ar section | Fl -hex-dump Ns = Ns Ar section .Op Fl A | Fl -arch-specific .Op Fl D | Fl -use-dynamic .Op Fl H | Fl -help Modified: vendor/elftoolchain/dist/readelf/readelf.c ============================================================================== --- vendor/elftoolchain/dist/readelf/readelf.c Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/readelf/readelf.c Wed Aug 31 13:50:23 2016 (r305126) @@ -47,7 +47,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: readelf.c 3469 2016-05-15 23:16:09Z emaste $"); +ELFTC_VCSID("$Id: readelf.c 3484 2016-08-03 13:36:49Z emaste $"); /* * readelf(1) options. @@ -334,7 +334,7 @@ static const char *note_type_openbsd(uns static const char *note_type_unknown(unsigned int nt); static const char *note_type_xen(unsigned int nt); static const char *option_kind(uint8_t kind); -static const char *phdr_type(unsigned int ptype); +static const char *phdr_type(unsigned int mach, unsigned int ptype); static const char *ppc_abi_fp(uint64_t fp); static const char *ppc_abi_vector(uint64_t vec); static void readelf_usage(int status); @@ -431,6 +431,7 @@ elf_osabi(unsigned int abi) case ELFOSABI_OPENVMS: return "OpenVMS"; case ELFOSABI_NSK: return "NSK"; case ELFOSABI_CLOUDABI: return "CloudABI"; + case ELFOSABI_ARM_AEABI: return "ARM EABI"; case ELFOSABI_ARM: return "ARM"; case ELFOSABI_STANDALONE: return "StandAlone"; default: @@ -613,10 +614,24 @@ elf_ver(unsigned int ver) } static const char * -phdr_type(unsigned int ptype) +phdr_type(unsigned int mach, unsigned int ptype) { static char s_ptype[32]; + if (ptype >= PT_LOPROC && ptype <= PT_HIPROC) { + switch (mach) { + case EM_ARM: + switch (ptype) { + case PT_ARM_ARCHEXT: return "ARM_ARCHEXT"; + case PT_ARM_EXIDX: return "ARM_EXIDX"; + } + break; + } + snprintf(s_ptype, sizeof(s_ptype), "LOPROC+%#x", + ptype - PT_LOPROC); + return (s_ptype); + } + switch (ptype) { case PT_NULL: return "NULL"; case PT_LOAD: return "LOAD"; @@ -630,10 +645,7 @@ phdr_type(unsigned int ptype) case PT_GNU_STACK: return "GNU_STACK"; case PT_GNU_RELRO: return "GNU_RELRO"; default: - if (ptype >= PT_LOPROC && ptype <= PT_HIPROC) - snprintf(s_ptype, sizeof(s_ptype), "LOPROC+%#x", - ptype - PT_LOPROC); - else if (ptype >= PT_LOOS && ptype <= PT_HIOS) + if (ptype >= PT_LOOS && ptype <= PT_HIOS) snprintf(s_ptype, sizeof(s_ptype), "LOOS+%#x", ptype - PT_LOOS); else @@ -650,6 +662,15 @@ section_type(unsigned int mach, unsigned if (stype >= SHT_LOPROC && stype <= SHT_HIPROC) { switch (mach) { + case EM_ARM: + switch (stype) { + case SHT_ARM_EXIDX: return "ARM_EXIDX"; + case SHT_ARM_PREEMPTMAP: return "ARM_PREEMPTMAP"; + case SHT_ARM_ATTRIBUTES: return "ARM_ATTRIBUTES"; + case SHT_ARM_DEBUGOVERLAY: return "ARM_DEBUGOVERLAY"; + case SHT_ARM_OVERLAYSECTION: return "ARM_OVERLAYSECTION"; + } + break; case EM_X86_64: switch (stype) { case SHT_X86_64_UNWIND: return "X86_64_UNWIND"; @@ -2264,9 +2285,10 @@ dump_phdr(struct readelf *re) #define PH_HDR "Type", "Offset", "VirtAddr", "PhysAddr", "FileSiz", \ "MemSiz", "Flg", "Align" -#define PH_CT phdr_type(phdr.p_type), (uintmax_t)phdr.p_offset, \ - (uintmax_t)phdr.p_vaddr, (uintmax_t)phdr.p_paddr, \ - (uintmax_t)phdr.p_filesz, (uintmax_t)phdr.p_memsz, \ +#define PH_CT phdr_type(re->ehdr.e_machine, phdr.p_type), \ + (uintmax_t)phdr.p_offset, (uintmax_t)phdr.p_vaddr, \ + (uintmax_t)phdr.p_paddr, (uintmax_t)phdr.p_filesz, \ + (uintmax_t)phdr.p_memsz, \ phdr.p_flags & PF_R ? 'R' : ' ', \ phdr.p_flags & PF_W ? 'W' : ' ', \ phdr.p_flags & PF_X ? 'E' : ' ', \ @@ -2757,6 +2779,8 @@ dump_rel(struct readelf *re, struct sect const char *symname; uint64_t symval; int i, len; + uint32_t type; + uint8_t type2, type3; if (s->link >= re->shnum) return; @@ -2766,8 +2790,8 @@ dump_rel(struct readelf *re, struct sect elftc_reloc_type_str(re->ehdr.e_machine, \ ELF32_R_TYPE(r.r_info)), (uintmax_t)symval, symname #define REL_CT64 (uintmax_t)r.r_offset, (uintmax_t)r.r_info, \ - elftc_reloc_type_str(re->ehdr.e_machine, \ - ELF64_R_TYPE(r.r_info)), (uintmax_t)symval, symname + elftc_reloc_type_str(re->ehdr.e_machine, type), \ + (uintmax_t)symval, symname printf("\nRelocation section (%s):\n", s->name); if (re->ec == ELFCLASS32) @@ -2793,12 +2817,35 @@ dump_rel(struct readelf *re, struct sect ELF64_R_TYPE(r.r_info)); printf("%8.8jx %8.8jx %-19.19s %8.8jx %s\n", REL_CT32); } else { + type = ELF64_R_TYPE(r.r_info); + if (re->ehdr.e_machine == EM_MIPS) { + type2 = (type >> 8) & 0xFF; + type3 = (type >> 16) & 0xFF; + type = type & 0xFF; + } if (re->options & RE_WW) printf("%16.16jx %16.16jx %-24.24s" " %16.16jx %s\n", REL_CT64); else printf("%12.12jx %12.12jx %-19.19s" " %16.16jx %s\n", REL_CT64); + if (re->ehdr.e_machine == EM_MIPS) { + if (re->options & RE_WW) { + printf("%32s: %s\n", "Type2", + elftc_reloc_type_str(EM_MIPS, + type2)); + printf("%32s: %s\n", "Type3", + elftc_reloc_type_str(EM_MIPS, + type3)); + } else { + printf("%24s: %s\n", "Type2", + elftc_reloc_type_str(EM_MIPS, + type2)); + printf("%24s: %s\n", "Type3", + elftc_reloc_type_str(EM_MIPS, + type3)); + } + } } } @@ -2813,6 +2860,8 @@ dump_rela(struct readelf *re, struct sec const char *symname; uint64_t symval; int i, len; + uint32_t type; + uint8_t type2, type3; if (s->link >= re->shnum) return; @@ -2823,8 +2872,8 @@ dump_rela(struct readelf *re, struct sec elftc_reloc_type_str(re->ehdr.e_machine, \ ELF32_R_TYPE(r.r_info)), (uintmax_t)symval, symname #define RELA_CT64 (uintmax_t)r.r_offset, (uintmax_t)r.r_info, \ - elftc_reloc_type_str(re->ehdr.e_machine, \ - ELF64_R_TYPE(r.r_info)), (uintmax_t)symval, symname + elftc_reloc_type_str(re->ehdr.e_machine, type), \ + (uintmax_t)symval, symname printf("\nRelocation section with addend (%s):\n", s->name); if (re->ec == ELFCLASS32) @@ -2851,6 +2900,12 @@ dump_rela(struct readelf *re, struct sec printf("%8.8jx %8.8jx %-19.19s %8.8jx %s", RELA_CT32); printf(" + %x\n", (uint32_t) r.r_addend); } else { + type = ELF64_R_TYPE(r.r_info); + if (re->ehdr.e_machine == EM_MIPS) { + type2 = (type >> 8) & 0xFF; + type3 = (type >> 16) & 0xFF; + type = type & 0xFF; + } if (re->options & RE_WW) printf("%16.16jx %16.16jx %-24.24s" " %16.16jx %s", RELA_CT64); @@ -2858,6 +2913,23 @@ dump_rela(struct readelf *re, struct sec printf("%12.12jx %12.12jx %-19.19s" " %16.16jx %s", RELA_CT64); printf(" + %jx\n", (uintmax_t) r.r_addend); + if (re->ehdr.e_machine == EM_MIPS) { + if (re->options & RE_WW) { + printf("%32s: %s\n", "Type2", + elftc_reloc_type_str(EM_MIPS, + type2)); + printf("%32s: %s\n", "Type3", + elftc_reloc_type_str(EM_MIPS, + type3)); + } else { + printf("%24s: %s\n", "Type2", + elftc_reloc_type_str(EM_MIPS, + type2)); + printf("%24s: %s\n", "Type3", + elftc_reloc_type_str(EM_MIPS, + type3)); + } + } } } From owner-svn-src-vendor@freebsd.org Wed Aug 31 13:51:42 2016 Return-Path: Delivered-To: svn-src-vendor@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 59DF4BCA059; Wed, 31 Aug 2016 13:51:42 +0000 (UTC) (envelope-from emaste@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 0F95D7E5; Wed, 31 Aug 2016 13:51:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7VDpf4V044147; Wed, 31 Aug 2016 13:51:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7VDpfGq044146; Wed, 31 Aug 2016 13:51:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201608311351.u7VDpfGq044146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 31 Aug 2016 13:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305127 - vendor/elftoolchain/elftoolchain-r3490 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2016 13:51:42 -0000 Author: emaste Date: Wed Aug 31 13:51:41 2016 New Revision: 305127 URL: https://svnweb.freebsd.org/changeset/base/305127 Log: Tag ELF Tool Chain r3490 Added: vendor/elftoolchain/elftoolchain-r3490/ - copied from r305126, vendor/elftoolchain/dist/ From owner-svn-src-vendor@freebsd.org Wed Aug 31 21:40:54 2016 Return-Path: Delivered-To: svn-src-vendor@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 A46CEBCA894; Wed, 31 Aug 2016 21:40:54 +0000 (UTC) (envelope-from jkim@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 61846FB; Wed, 31 Aug 2016 21:40:54 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7VLerWV022354; Wed, 31 Aug 2016 21:40:53 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7VLeqPT022336; Wed, 31 Aug 2016 21:40:52 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201608312140.u7VLeqPT022336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 31 Aug 2016 21:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305162 - in vendor-sys/acpica/dist: . generate/unix/acpidump generate/unix/acpiexamples generate/unix/acpiexec generate/unix/acpisrc generate/unix/acpixtract generate/unix/iasl source/... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2016 21:40:54 -0000 Author: jkim Date: Wed Aug 31 21:40:51 2016 New Revision: 305162 URL: https://svnweb.freebsd.org/changeset/base/305162 Log: Import ACPICA 20160831. Added: vendor-sys/acpica/dist/source/compiler/aslhelp.c (contents, props changed) vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/acpidump/Makefile vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile vendor-sys/acpica/dist/generate/unix/acpisrc/Makefile vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslstubs.c vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtfield.c vendor-sys/acpica/dist/source/compiler/dtparser.y vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/compiler/prparser.y vendor-sys/acpica/dist/source/components/debugger/dbconvert.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evrgnini.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/executer/exconcat.c vendor-sys/acpica/dist/source/components/executer/exconfig.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/exmisc.c vendor-sys/acpica/dist/source/components/executer/exoparg1.c vendor-sys/acpica/dist/source/components/executer/exresop.c vendor-sys/acpica/dist/source/components/executer/extrace.c vendor-sys/acpica/dist/source/components/executer/exutils.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/namespace/nsconvert.c vendor-sys/acpica/dist/source/components/namespace/nsload.c vendor-sys/acpica/dist/source/components/namespace/nsparse.c vendor-sys/acpica/dist/source/components/namespace/nsutils.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/psxface.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/tables/tbfind.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/utilities/utaddress.c vendor-sys/acpica/dist/source/components/utilities/uthex.c vendor-sys/acpica/dist/source/components/utilities/utnonansi.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/utxfinit.c vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acevents.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acparser.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/platform/acefi.h vendor-sys/acpica/dist/source/include/platform/acefiex.h vendor-sys/acpica/dist/source/tools/acpidump/apdump.c vendor-sys/acpica/dist/source/tools/acpidump/apmain.c vendor-sys/acpica/dist/source/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aeinitfile.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/changes.txt Wed Aug 31 21:40:51 2016 (r305162) @@ -1,7 +1,72 @@ ---------------------------------------- -29 July 2016. Summary of changes for version 20160729: +31 August 2016. Summary of changes for version 20160831: -This release is available at https://acpica.org/downloads + +1) ACPICA kernel-resident subsystem: + +Improve support for the so-called "module-level code", which is defined +to be math, logical and control AML opcodes that appear outside of any +control method. This change improves the support by adding more opcodes +that can be executed in the manner. Some other issues have been solved, +and the ASL grammar changes to support such code under all scope +operators (Device, etc.) are complete. Lv Zheng. + +UEFI support: these OSL functions have been implemented. This is an +additional step toward supporting the AcpiExec utility natively (with +full hardware access) under UEFI. Marcelo Ferreira. + AcpiOsReadPciConfiguration + AcpiOsWritePciConfiguration + +Fixed a possible mutex error during control method auto-serialization. Lv +Zheng. + +Updated support for the Generic Address Structure by fully implementing +all GAS fields when a 32-bit address is expanded to a 64-bit GAS. Lv +Zheng. + +Updated the return value for the internal _OSI method. Instead of +0xFFFFFFFF, the "Ones" value is now returned, which is 0xFFFFFFFFFFFFFFFF +for 64-bit ACPI tables. This fixes an incompatibility with other ACPI +implementations, and will be reflected and clarified in the next version +of the ACPI specification. + +Implemented two new table events that can be passed to an ACPICA table +handler. These events are used to indicate a table installation or +uninstallation. These events are used in addition to existed table load +and unload events. Lv Zheng. + +Implemented a cleanup for all internal string-to-integer conversions. +Consolidate multiple versions of this functionality and limit possible +bases to either 10 or 16 to simplify the code. Adds a new file, +utstrtoul64. + +Cleanup the inclusion order of the various compiler-specific headers. +This simplifies build configuration management. The compiler-specific +headers are now split out from the host-specific headers. Lv Zheng. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 140.1K Code, 58.1K Data, 198.1K Total + Debug Version: 200.3K Code, 82.1K Data, 282.4K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL/AcpiExec: Added a command line option to display the build date/time +of the tool (-vd). This can be useful to verify that the correct version +of the tools are being used. + +AML Debugger: Implemented a new subcommand ("execute predef") to execute +all predefined control methods and names within the current namespace. +This can be useful for debugging problems with ACPI tables and the ACPI +namespace. + +---------------------------------------- +29 July 2016. Summary of changes for version 20160729: 1) ACPICA kernel-resident subsystem: @@ -34,7 +99,6 @@ help in the implementation of these func AcpiOsReadPciConfiguration AcpiOsWritePciConfiguration - Restructured and standardized the C library configuration for ACPICA, resulting in the various configuration options below. This includes a global restructuring of the compiler-dependent and platform-dependent @@ -102,8 +166,6 @@ through the registry on older versions. ---------------------------------------- 27 May 2016. Summary of changes for version 20160527: -This release is available at https://acpica.org/downloads - 1) ACPICA kernel-resident subsystem: Modified: vendor-sys/acpica/dist/generate/unix/acpidump/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpidump/Makefile Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/generate/unix/acpidump/Makefile Wed Aug 31 21:40:51 2016 (r305162) @@ -43,9 +43,11 @@ OBJECTS = \ $(OBJDIR)/utdebug.o\ $(OBJDIR)/utexcep.o\ $(OBJDIR)/utglobal.o\ + $(OBJDIR)/uthex.o\ $(OBJDIR)/utmath.o\ $(OBJDIR)/utnonansi.o\ $(OBJDIR)/utstring.o\ + $(OBJDIR)/utstrtoul64.o\ $(OBJDIR)/utxferror.o # Modified: vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile Wed Aug 31 21:40:51 2016 (r305162) @@ -156,6 +156,7 @@ OBJECTS = \ $(OBJDIR)/utresrc.o\ $(OBJDIR)/utstate.o\ $(OBJDIR)/utstring.o\ + $(OBJDIR)/utstrtoul64.o\ $(OBJDIR)/utxface.o\ $(OBJDIR)/utxferror.o\ $(OBJDIR)/utxfinit.o Modified: vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Wed Aug 31 21:40:51 2016 (r305162) @@ -226,6 +226,7 @@ OBJECTS = \ $(OBJDIR)/utresrc.o\ $(OBJDIR)/utstate.o\ $(OBJDIR)/utstring.o\ + $(OBJDIR)/utstrtoul64.o\ $(OBJDIR)/uttrack.o\ $(OBJDIR)/utuuid.o\ $(OBJDIR)/utxface.o\ Modified: vendor-sys/acpica/dist/generate/unix/acpisrc/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpisrc/Makefile Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/generate/unix/acpisrc/Makefile Wed Aug 31 21:40:51 2016 (r305162) @@ -42,6 +42,7 @@ OBJECTS = \ $(OBJDIR)/utdebug.o\ $(OBJDIR)/utexcep.o\ $(OBJDIR)/utglobal.o\ + $(OBJDIR)/uthex.o\ $(OBJDIR)/utmath.o\ $(OBJDIR)/utnonansi.o\ $(OBJDIR)/utstring.o\ Modified: vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile Wed Aug 31 21:40:51 2016 (r305162) @@ -36,6 +36,7 @@ OBJECTS = \ $(OBJDIR)/utdebug.o\ $(OBJDIR)/utexcep.o\ $(OBJDIR)/utglobal.o\ + $(OBJDIR)/uthex.o\ $(OBJDIR)/utmath.o\ $(OBJDIR)/utnonansi.o\ $(OBJDIR)/utxferror.o Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Wed Aug 31 21:40:51 2016 (r305162) @@ -62,6 +62,7 @@ OBJECTS = \ $(OBJDIR)/aslfiles.o\ $(OBJDIR)/aslfileio.o\ $(OBJDIR)/aslfold.o\ + $(OBJDIR)/aslhelp.o\ $(OBJDIR)/aslhex.o\ $(OBJDIR)/asllength.o\ $(OBJDIR)/asllisting.o\ @@ -222,6 +223,7 @@ OBJECTS = \ $(OBJDIR)/utpredef.o\ $(OBJDIR)/utresrc.o\ $(OBJDIR)/utstate.o\ + $(OBJDIR)/utstrtoul64.o\ $(OBJDIR)/utstring.o\ $(OBJDIR)/utuuid.o\ $(OBJDIR)/utxface.o\ Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Wed Aug 31 21:40:51 2016 (r305162) @@ -911,7 +911,7 @@ LkFindUnreferencedObjects ( void); /* - * aslmain - startup + * aslhelp - help screens */ void Usage ( @@ -921,6 +921,10 @@ void AslFilenameHelp ( void); +void +AslDisassemblyHelp ( + void); + /* * aslnamesp - namespace output file generation Added: vendor-sys/acpica/dist/source/compiler/aslhelp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/acpica/dist/source/compiler/aslhelp.c Wed Aug 31 21:40:51 2016 (r305162) @@ -0,0 +1,220 @@ +/****************************************************************************** + * + * Module Name: aslhelp - iASL help screens + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2016, Intel Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + */ + +#include "aslcompiler.h" +#include "acapps.h" + +#define _COMPONENT ACPI_COMPILER + ACPI_MODULE_NAME ("aslhelp") + + +/******************************************************************************* + * + * FUNCTION: Usage + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Display option help message. + * Optional items in square brackets. + * + ******************************************************************************/ + +void +Usage ( + void) +{ + printf ("%s\n\n", ASL_COMPLIANCE); + ACPI_USAGE_HEADER ("iasl [Options] [Files]"); + + printf ("\nGeneral:\n"); + ACPI_OPTION ("-@ ", "Specify command file"); + ACPI_OPTION ("-I ", "Specify additional include directory"); + ACPI_OPTION ("-p ", "Specify path/filename prefix for all output files"); + ACPI_OPTION ("-v", "Display compiler version"); + ACPI_OPTION ("-vd", "Display compiler build date and time"); + ACPI_OPTION ("-vo", "Enable optimization comments"); + ACPI_OPTION ("-vs", "Disable signon"); + + printf ("\nHelp:\n"); + ACPI_OPTION ("-h", "This message"); + ACPI_OPTION ("-hc", "Display operators allowed in constant expressions"); + ACPI_OPTION ("-hd", "Info for obtaining and disassembling binary ACPI tables"); + ACPI_OPTION ("-hf", "Display help for output filename generation"); + ACPI_OPTION ("-hr", "Display ACPI reserved method names"); + ACPI_OPTION ("-ht", "Display currently supported ACPI table names"); + + printf ("\nPreprocessor:\n"); + ACPI_OPTION ("-D ", "Define symbol for preprocessor use"); + ACPI_OPTION ("-li", "Create preprocessed output file (*.i)"); + ACPI_OPTION ("-P", "Preprocess only and create preprocessor output file (*.i)"); + ACPI_OPTION ("-Pn", "Disable preprocessor"); + + printf ("\nErrors, Warnings, and Remarks:\n"); + ACPI_OPTION ("-va", "Disable all errors/warnings/remarks"); + ACPI_OPTION ("-ve", "Report only errors (ignore warnings and remarks)"); + ACPI_OPTION ("-vi", "Less verbose errors and warnings for use with IDEs"); + ACPI_OPTION ("-vr", "Disable remarks"); + ACPI_OPTION ("-vw ", "Disable specific warning or remark"); + ACPI_OPTION ("-w <1|2|3>", "Set warning reporting level"); + ACPI_OPTION ("-we", "Report warnings as errors"); + + printf ("\nAML Code Generation (*.aml):\n"); + ACPI_OPTION ("-oa", "Disable all optimizations (compatibility mode)"); + ACPI_OPTION ("-of", "Disable constant folding"); + ACPI_OPTION ("-oi", "Disable integer optimization to Zero/One/Ones"); + ACPI_OPTION ("-on", "Disable named reference string optimization"); + ACPI_OPTION ("-ot", "Disable typechecking"); + ACPI_OPTION ("-cr", "Disable Resource Descriptor error checking"); + ACPI_OPTION ("-in", "Ignore NoOp operators"); + ACPI_OPTION ("-r ", "Override table header Revision (1-255)"); + + printf ("\nListings:\n"); + ACPI_OPTION ("-l", "Create mixed listing file (ASL source and AML) (*.lst)"); + ACPI_OPTION ("-lm", "Create hardware summary map file (*.map)"); + ACPI_OPTION ("-ln", "Create namespace file (*.nsp)"); + ACPI_OPTION ("-ls", "Create combined source file (expanded includes) (*.src)"); + ACPI_OPTION ("-lx", "Create cross-reference file (*.xrf)"); + + printf ("\nFirmware Support - C Output:\n"); + ACPI_OPTION ("-tc", "Create hex AML table in C (*.hex)"); + ACPI_OPTION ("-sc", "Create named hex AML arrays in C (*.c)"); + ACPI_OPTION ("-ic", "Create include file in C for -sc symbols (*.h)"); + ACPI_OPTION ("-so", "Create namespace AML offset table in C (*.offset.h)"); + + printf ("\nFirmware Support - Assembler Output:\n"); + ACPI_OPTION ("-ta", "Create hex AML table in assembler (*.hex)"); + ACPI_OPTION ("-sa", "Create named hex AML arrays in assembler (*.asm)"); + ACPI_OPTION ("-ia", "Create include file in assembler for -sa symbols (*.inc)"); + + printf ("\nFirmware Support - ASL Output:\n"); + ACPI_OPTION ("-ts", "Create hex AML table in ASL (Buffer object) (*.hex)"); + + printf ("\nData Table Compiler:\n"); + ACPI_OPTION ("-G", "Compile custom table that contains generic operators"); + ACPI_OPTION ("-T |ALL", "Create ACPI table template/example files"); + ACPI_OPTION ("-T ", "Emit DSDT and SSDTs to same file"); + ACPI_OPTION ("-vt", "Create verbose template files (full disassembly)"); + + printf ("\nAML Disassembler:\n"); + ACPI_OPTION ("-d ", "Disassemble or decode binary ACPI tables to file (*.dsl)"); + ACPI_OPTION ("", " (Optional, file type is automatically detected)"); + ACPI_OPTION ("-da ", "Disassemble multiple tables from single namespace"); + ACPI_OPTION ("-db", "Do not translate Buffers to Resource Templates"); + ACPI_OPTION ("-dc ", "Disassemble AML and immediately compile it"); + ACPI_OPTION ("", " (Obtain DSDT from current system if no input file)"); + ACPI_OPTION ("-df", "Force disassembler to assume table contains valid AML"); + ACPI_OPTION ("-dl", "Emit legacy ASL code only (no C-style operators)"); + ACPI_OPTION ("-e ", "Include ACPI table(s) for external symbol resolution"); + ACPI_OPTION ("-fe ", "Specify external symbol declaration file"); + ACPI_OPTION ("-in", "Ignore NoOp opcodes"); + ACPI_OPTION ("-l", "Disassemble to mixed ASL and AML code"); + ACPI_OPTION ("-vt", "Dump binary table data in hex format within output file"); + + printf ("\nDebug Options:\n"); + ACPI_OPTION ("-bf", "Create debug file (full output) (*.txt)"); + ACPI_OPTION ("-bs", "Create debug file (parse tree only) (*.txt)"); + ACPI_OPTION ("-bp ", "Prune ASL parse tree"); + ACPI_OPTION ("-bt ", "Object type to be pruned from the parse tree"); + ACPI_OPTION ("-f", "Ignore errors, force creation of AML output file(s)"); + ACPI_OPTION ("-m ", "Set internal line buffer size (in Kbytes)"); + ACPI_OPTION ("-n", "Parse only, no output generation"); + ACPI_OPTION ("-oc", "Display compile times and statistics"); + ACPI_OPTION ("-x ", "Set debug level for trace output"); + ACPI_OPTION ("-z", "Do not insert new compiler ID for DataTables"); +} + + +/******************************************************************************* + * + * FUNCTION: FilenameHelp + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Display help message for output filename generation + * + ******************************************************************************/ + +void +AslFilenameHelp ( + void) +{ + + printf ("\nAML output filename generation:\n"); + printf (" Output filenames are generated by appending an extension to a common\n"); + printf (" filename prefix. The filename prefix is obtained via one of the\n"); + printf (" following methods (in priority order):\n"); + printf (" 1) The -p option specifies the prefix\n"); + printf (" 2) The prefix of the AMLFileName in the ASL Definition Block\n"); + printf (" 3) The prefix of the input filename\n"); + printf ("\n"); +} + +/******************************************************************************* + * + * FUNCTION: AslDisassemblyHelp + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Display help message for obtaining and disassembling AML/ASL + * files. + * + ******************************************************************************/ + +void +AslDisassemblyHelp ( + void) +{ + + printf ("\nObtaining binary ACPI tables and disassembling to ASL source code.\n\n"); + printf ("Use the following ACPICA toolchain:\n"); + printf (" AcpiDump: Dump all ACPI tables to a hex ascii file\n"); + printf (" AcpiXtract: Extract one or more binary ACPI tables from AcpiDump output\n"); + printf (" iASL -d : Disassemble a binary ACPI table to ASL source code\n"); + printf ("\n"); +} Modified: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Wed Aug 31 21:40:51 2016 (r305162) @@ -76,242 +76,15 @@ AslInitialize ( /******************************************************************************* * - * FUNCTION: Usage - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Display option help message. - * Optional items in square brackets. - * - ******************************************************************************/ - -void -Usage ( - void) -{ - printf ("%s\n\n", ASL_COMPLIANCE); - ACPI_USAGE_HEADER ("iasl [Options] [Files]"); - - printf ("\nGeneral:\n"); - ACPI_OPTION ("-@ ", "Specify command file"); - ACPI_OPTION ("-I ", "Specify additional include directory"); - ACPI_OPTION ("-p ", "Specify path/filename prefix for all output files"); - ACPI_OPTION ("-v", "Display compiler version"); - ACPI_OPTION ("-vo", "Enable optimization comments"); - ACPI_OPTION ("-vs", "Disable signon"); - - printf ("\nHelp:\n"); - ACPI_OPTION ("-h", "This message"); - ACPI_OPTION ("-hc", "Display operators allowed in constant expressions"); - ACPI_OPTION ("-hf", "Display help for output filename generation"); - ACPI_OPTION ("-hr", "Display ACPI reserved method names"); - ACPI_OPTION ("-ht", "Display currently supported ACPI table names"); - - printf ("\nPreprocessor:\n"); - ACPI_OPTION ("-D ", "Define symbol for preprocessor use"); - ACPI_OPTION ("-li", "Create preprocessed output file (*.i)"); - ACPI_OPTION ("-P", "Preprocess only and create preprocessor output file (*.i)"); - ACPI_OPTION ("-Pn", "Disable preprocessor"); - - printf ("\nErrors, Warnings, and Remarks:\n"); - ACPI_OPTION ("-va", "Disable all errors/warnings/remarks"); - ACPI_OPTION ("-ve", "Report only errors (ignore warnings and remarks)"); - ACPI_OPTION ("-vi", "Less verbose errors and warnings for use with IDEs"); - ACPI_OPTION ("-vr", "Disable remarks"); - ACPI_OPTION ("-vw ", "Disable specific warning or remark"); - ACPI_OPTION ("-w <1|2|3>", "Set warning reporting level"); - ACPI_OPTION ("-we", "Report warnings as errors"); - - printf ("\nAML Code Generation (*.aml):\n"); - ACPI_OPTION ("-oa", "Disable all optimizations (compatibility mode)"); - ACPI_OPTION ("-of", "Disable constant folding"); - ACPI_OPTION ("-oi", "Disable integer optimization to Zero/One/Ones"); - ACPI_OPTION ("-on", "Disable named reference string optimization"); - ACPI_OPTION ("-ot", "Disable typechecking"); - ACPI_OPTION ("-cr", "Disable Resource Descriptor error checking"); - ACPI_OPTION ("-in", "Ignore NoOp operators"); - ACPI_OPTION ("-r ", "Override table header Revision (1-255)"); - - printf ("\nListings:\n"); - ACPI_OPTION ("-l", "Create mixed listing file (ASL source and AML) (*.lst)"); - ACPI_OPTION ("-lm", "Create hardware summary map file (*.map)"); - ACPI_OPTION ("-ln", "Create namespace file (*.nsp)"); - ACPI_OPTION ("-ls", "Create combined source file (expanded includes) (*.src)"); - ACPI_OPTION ("-lx", "Create cross-reference file (*.xrf)"); - - printf ("\nFirmware Support - C Output:\n"); - ACPI_OPTION ("-tc", "Create hex AML table in C (*.hex)"); - ACPI_OPTION ("-sc", "Create named hex AML arrays in C (*.c)"); - ACPI_OPTION ("-ic", "Create include file in C for -sc symbols (*.h)"); - ACPI_OPTION ("-so", "Create namespace AML offset table in C (*.offset.h)"); - - printf ("\nFirmware Support - Assembler Output:\n"); - ACPI_OPTION ("-ta", "Create hex AML table in assembler (*.hex)"); - ACPI_OPTION ("-sa", "Create named hex AML arrays in assembler (*.asm)"); - ACPI_OPTION ("-ia", "Create include file in assembler for -sa symbols (*.inc)"); - - printf ("\nFirmware Support - ASL Output:\n"); - ACPI_OPTION ("-ts", "Create hex AML table in ASL (Buffer object) (*.hex)"); - - printf ("\nData Table Compiler:\n"); - ACPI_OPTION ("-G", "Compile custom table that contains generic operators"); - ACPI_OPTION ("-T |ALL", "Create ACPI table template/example files"); - ACPI_OPTION ("-T ", "Emit DSDT and SSDTs to same file"); - ACPI_OPTION ("-vt", "Create verbose template files (full disassembly)"); - - printf ("\nAML Disassembler:\n"); - ACPI_OPTION ("-d ", "Disassemble or decode binary ACPI tables to file (*.dsl)"); - ACPI_OPTION ("", " (Optional, file type is automatically detected)"); - ACPI_OPTION ("-da ", "Disassemble multiple tables from single namespace"); - ACPI_OPTION ("-db", "Do not translate Buffers to Resource Templates"); - ACPI_OPTION ("-dc ", "Disassemble AML and immediately compile it"); - ACPI_OPTION ("", " (Obtain DSDT from current system if no input file)"); - ACPI_OPTION ("-df", "Force disassembler to assume table contains valid AML"); - ACPI_OPTION ("-dl", "Emit legacy ASL code only (no C-style operators)"); - ACPI_OPTION ("-e ", "Include ACPI table(s) for external symbol resolution"); - ACPI_OPTION ("-fe ", "Specify external symbol declaration file"); - ACPI_OPTION ("-in", "Ignore NoOp opcodes"); - ACPI_OPTION ("-l", "Disassemble to mixed ASL and AML code"); - ACPI_OPTION ("-vt", "Dump binary table data in hex format within output file"); - - printf ("\nDebug Options:\n"); - ACPI_OPTION ("-bf", "Create debug file (full output) (*.txt)"); - ACPI_OPTION ("-bs", "Create debug file (parse tree only) (*.txt)"); - ACPI_OPTION ("-bp ", "Prune ASL parse tree"); - ACPI_OPTION ("-bt ", "Object type to be pruned from the parse tree"); - ACPI_OPTION ("-f", "Ignore errors, force creation of AML output file(s)"); - ACPI_OPTION ("-m ", "Set internal line buffer size (in Kbytes)"); - ACPI_OPTION ("-n", "Parse only, no output generation"); - ACPI_OPTION ("-oc", "Display compile times and statistics"); - ACPI_OPTION ("-x ", "Set debug level for trace output"); - ACPI_OPTION ("-z", "Do not insert new compiler ID for DataTables"); -} - - -/******************************************************************************* - * - * FUNCTION: FilenameHelp - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Display help message for output filename generation - * - ******************************************************************************/ - -void -AslFilenameHelp ( - void) -{ - - printf ("\nAML output filename generation:\n"); - printf (" Output filenames are generated by appending an extension to a common\n"); - printf (" filename prefix. The filename prefix is obtained via one of the\n"); - printf (" following methods (in priority order):\n"); - printf (" 1) The -p option specifies the prefix\n"); - printf (" 2) The prefix of the AMLFileName in the ASL Definition Block\n"); - printf (" 3) The prefix of the input filename\n"); - printf ("\n"); -} - - -/****************************************************************************** - * - * FUNCTION: AslSignalHandler - * - * PARAMETERS: Sig - Signal that invoked this handler - * - * RETURN: None - * - * DESCRIPTION: Control-C handler. Delete any intermediate files and any - * output files that may be left in an indeterminate state. - * - *****************************************************************************/ - -static void ACPI_SYSTEM_XFACE -AslSignalHandler ( - int Sig) -{ - UINT32 i; - - - signal (Sig, SIG_IGN); - printf ("Aborting\n\n"); - - /* Close all open files */ - - Gbl_Files[ASL_FILE_PREPROCESSOR].Handle = NULL; /* the .pre file is same as source file */ - - for (i = ASL_FILE_INPUT; i < ASL_MAX_FILE_TYPE; i++) - { - FlCloseFile (i); - } - - /* Delete any output files */ - - for (i = ASL_FILE_AML_OUTPUT; i < ASL_MAX_FILE_TYPE; i++) - { - FlDeleteFile (i); - } - - exit (0); -} - - -/******************************************************************************* - * - * FUNCTION: AslInitialize - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Initialize compiler globals - * - ******************************************************************************/ - -static void -AslInitialize ( - void) -{ - UINT32 i; - - - AcpiGbl_DmOpt_Verbose = FALSE; - - /* Default integer width is 64 bits */ - - AcpiGbl_IntegerBitWidth = 64; - AcpiGbl_IntegerNybbleWidth = 16; - AcpiGbl_IntegerByteWidth = 8; - - for (i = 0; i < ASL_NUM_FILES; i++) - { - Gbl_Files[i].Handle = NULL; - Gbl_Files[i].Filename = NULL; - } - - Gbl_Files[ASL_FILE_STDOUT].Handle = stdout; - Gbl_Files[ASL_FILE_STDOUT].Filename = "STDOUT"; - - Gbl_Files[ASL_FILE_STDERR].Handle = stderr; - Gbl_Files[ASL_FILE_STDERR].Filename = "STDERR"; -} - - -/******************************************************************************* - * * FUNCTION: main * * PARAMETERS: Standard argc/argv * * RETURN: Program termination code * - * DESCRIPTION: C main routine for the Asl Compiler. Handle command line - * options and begin the compile for each file on the command line + * DESCRIPTION: C main routine for the iASL Compiler/Disassembler. Process + * command line options and begin the compile/disassembly for each file on + * the command line (wildcards supported). * ******************************************************************************/ @@ -349,7 +122,8 @@ main ( PrInitializePreprocessor (); AslInitialize (); - Index1 = Index2 = AslCommandLine (argc, argv); + Index1 = Index2 = + AslCommandLine (argc, argv); /* Allocate the line buffer(s), must be after command line */ @@ -409,3 +183,87 @@ CleanupAndExit: return (ReturnStatus); } + + +/****************************************************************************** + * + * FUNCTION: AslSignalHandler + * + * PARAMETERS: Sig - Signal that invoked this handler + * + * RETURN: None + * + * DESCRIPTION: Control-C handler. Delete any intermediate files and any + * output files that may be left in an indeterminate state. + * + *****************************************************************************/ + +static void ACPI_SYSTEM_XFACE +AslSignalHandler ( + int Sig) +{ + UINT32 i; + + + signal (Sig, SIG_IGN); + printf ("Aborting\n\n"); + + /* Close all open files */ + + Gbl_Files[ASL_FILE_PREPROCESSOR].Handle = NULL; /* the .pre file is same as source file */ + + for (i = ASL_FILE_INPUT; i < ASL_MAX_FILE_TYPE; i++) + { + FlCloseFile (i); + } + + /* Delete any output files */ + + for (i = ASL_FILE_AML_OUTPUT; i < ASL_MAX_FILE_TYPE; i++) + { + FlDeleteFile (i); + } + + exit (0); +} + + +/******************************************************************************* + * + * FUNCTION: AslInitialize + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Initialize compiler globals + * + ******************************************************************************/ + +static void +AslInitialize ( + void) +{ + UINT32 i; + + + AcpiGbl_DmOpt_Verbose = FALSE; + + /* Default integer width is 64 bits */ + + AcpiGbl_IntegerBitWidth = 64; + AcpiGbl_IntegerNybbleWidth = 16; + AcpiGbl_IntegerByteWidth = 8; + + for (i = 0; i < ASL_NUM_FILES; i++) + { + Gbl_Files[i].Handle = NULL; + Gbl_Files[i].Filename = NULL; + } + + Gbl_Files[ASL_FILE_STDOUT].Handle = stdout; + Gbl_Files[ASL_FILE_STDOUT].Filename = "STDOUT"; + + Gbl_Files[ASL_FILE_STDERR].Handle = stderr; + Gbl_Files[ASL_FILE_STDERR].Filename = "STDERR"; +} Modified: vendor-sys/acpica/dist/source/compiler/aslopt.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslopt.c Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/source/compiler/aslopt.c Wed Aug 31 21:40:51 2016 (r305162) @@ -133,7 +133,7 @@ OptSearchToRoot ( * not match, and we cannot use this optimization. */ Path = &(((char *) TargetPath->Pointer)[ - TargetPath->Length - ACPI_NAME_SIZE]), + TargetPath->Length - ACPI_NAME_SIZE]); ScopeInfo.Scope.Node = CurrentNode; /* Lookup the NameSeg using SEARCH_PARENT (search-to-root) */ Modified: vendor-sys/acpica/dist/source/compiler/asloptions.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloptions.c Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/source/compiler/asloptions.c Wed Aug 31 21:40:51 2016 (r305162) @@ -70,6 +70,9 @@ AslDoResponseFile ( #define ASL_TOKEN_SEPARATORS " \t\n" #define ASL_SUPPORTED_OPTIONS "@:a:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^r:s|t|T+G^v^w|x:z" +static char ASL_BUILD_DATE[] = __DATE__; +static char ASL_BUILD_TIME[] = __TIME__; + /******************************************************************************* * @@ -404,6 +407,11 @@ AslDoOptions ( UtDisplayConstantOpcodes (); exit (0); + case 'd': + + AslDisassemblyHelp (); + exit (0); + case 'f': AslFilenameHelp (); @@ -712,6 +720,12 @@ AslDoOptions ( Gbl_NoErrors = TRUE; break; + case 'd': + + printf ("%s Build date/time: %s %s\n", + ASL_COMPILER_NAME, ASL_BUILD_DATE, ASL_BUILD_TIME); + exit (0); + case 'e': /* Disable all warning/remark messages (errors only) */ Modified: vendor-sys/acpica/dist/source/compiler/aslstubs.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslstubs.c Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/source/compiler/aslstubs.c Wed Aug 31 21:40:51 2016 (r305162) @@ -47,6 +47,7 @@ #include "acevents.h" #include "acinterp.h" #include "acnamesp.h" +#include "acparser.h" #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslstubs") @@ -71,6 +72,13 @@ AcpiNsInitializeObjects ( } ACPI_STATUS +AcpiPsExecuteTable ( + ACPI_EVALUATE_INFO *Info) +{ + return (AE_OK); +} + +ACPI_STATUS AcpiHwReadPort ( ACPI_IO_ADDRESS Address, UINT32 *Value, @@ -156,6 +164,13 @@ AcpiEvDeleteGpeBlock ( return (AE_OK); } +void +AcpiEvUpdateGpes ( + ACPI_OWNER_ID TableOwnerId) +{ + return; +} + ACPI_STATUS AcpiEvAcquireGlobalLock ( UINT16 Timeout) Modified: vendor-sys/acpica/dist/source/compiler/aslutils.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslutils.c Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/source/compiler/aslutils.c Wed Aug 31 21:40:51 2016 (r305162) @@ -889,7 +889,7 @@ UtAttachNamepathToOwner ( * * FUNCTION: UtDoConstant * - * PARAMETERS: String - Hex, Octal, or Decimal string + * PARAMETERS: String - Hexadecimal or decimal string * * RETURN: Converted Integer * @@ -906,9 +906,7 @@ UtDoConstant ( char ErrBuf[64]; - Status = AcpiUtStrtoul64 (String, ACPI_ANY_BASE, - ACPI_MAX64_BYTE_WIDTH, &Converted); - + Status = AcpiUtStrtoul64 (String, ACPI_STRTOUL_64BIT, &Converted); if (ACPI_FAILURE (Status)) { sprintf (ErrBuf, "%s %s\n", "Conversion error:", @@ -918,64 +916,3 @@ UtDoConstant ( return (Converted); } - - -#ifdef _OBSOLETE_FUNCTIONS -/* Removed 01/2016 */ - -/******************************************************************************* - * - * FUNCTION: UtConvertByteToHex - * - * PARAMETERS: RawByte - Binary data - * Buffer - Pointer to where the hex bytes will be - * stored - * - * RETURN: Ascii hex byte is stored in Buffer. - * - * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed - * with "0x" - * - ******************************************************************************/ - -void -UtConvertByteToHex ( - UINT8 RawByte, - UINT8 *Buffer) -{ - - Buffer[0] = '0'; - Buffer[1] = 'x'; - - Buffer[2] = (UINT8) AcpiUtHexToAsciiChar (RawByte, 4); - Buffer[3] = (UINT8) AcpiUtHexToAsciiChar (RawByte, 0); -} - - -/******************************************************************************* - * - * FUNCTION: UtConvertByteToAsmHex - * - * PARAMETERS: RawByte - Binary data - * Buffer - Pointer to where the hex bytes will be - * stored - * - * RETURN: Ascii hex byte is stored in Buffer. - * - * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed - * with '0', and a trailing 'h' is added. - * - ******************************************************************************/ - -void -UtConvertByteToAsmHex ( - UINT8 RawByte, - UINT8 *Buffer) -{ - - Buffer[0] = '0'; - Buffer[1] = (UINT8) AcpiUtHexToAsciiChar (RawByte, 4); - Buffer[2] = (UINT8) AcpiUtHexToAsciiChar (RawByte, 0); - Buffer[3] = 'h'; -} -#endif /* OBSOLETE_FUNCTIONS */ Modified: vendor-sys/acpica/dist/source/compiler/dtcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtcompiler.h Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/source/compiler/dtcompiler.h Wed Aug 31 21:40:51 2016 (r305162) @@ -373,11 +373,6 @@ DtFatal ( DT_FIELD *FieldObject, char *ExtraMessage); -ACPI_STATUS -DtStrtoul64 ( - char *String, - UINT64 *ReturnInteger); - char* DtGetFieldValue ( DT_FIELD *Field); Modified: vendor-sys/acpica/dist/source/compiler/dtfield.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtfield.c Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/source/compiler/dtfield.c Wed Aug 31 21:40:51 2016 (r305162) @@ -370,10 +370,10 @@ DtCompileInteger ( * FUNCTION: DtNormalizeBuffer * * PARAMETERS: Buffer - Input buffer - * Count - Output the count of hex number in + * Count - Output the count of hex numbers in * the Buffer * - * RETURN: The normalized buffer, freed by caller + * RETURN: The normalized buffer, must be freed by caller * * DESCRIPTION: [1A,2B,3C,4D] or 1A, 2B, 3C, 4D will be normalized * to 1A 2B 3C 4D @@ -457,36 +457,38 @@ DtCompileBuffer ( DT_FIELD *Field, UINT32 ByteLength) { + char *Substring; ACPI_STATUS Status; - char Hex[3]; - UINT64 Value; - UINT32 i; UINT32 Count; + UINT32 i; /* Allow several different types of value separators */ StringValue = DtNormalizeBuffer (StringValue, &Count); + Substring = StringValue; + + /* Each element of StringValue is now three chars (2 hex + 1 space) */ - Hex[2] = 0; - for (i = 0; i < Count; i++) + for (i = 0; i < Count; i++, Substring += 3) { - /* Each element of StringValue is three chars */ + /* Check for byte value too long */ - Hex[0] = StringValue[(3 * i)]; - Hex[1] = StringValue[(3 * i) + 1]; + if (*(&Substring[2]) && + (*(&Substring[2]) != ' ')) + { + DtError (ASL_ERROR, ASL_MSG_BUFFER_ELEMENT, Field, Substring); + goto Exit; + } - /* Convert one hex byte */ + /* Convert two ASCII characters to one hex byte */ - Value = 0; - Status = DtStrtoul64 (Hex, &Value); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Wed Aug 31 21:41:34 2016 Return-Path: Delivered-To: svn-src-vendor@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 1F649BCA908; Wed, 31 Aug 2016 21:41:34 +0000 (UTC) (envelope-from jkim@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 CAF8E32E; Wed, 31 Aug 2016 21:41:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7VLfXT9023087; Wed, 31 Aug 2016 21:41:33 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7VLfXmB023086; Wed, 31 Aug 2016 21:41:33 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201608312141.u7VLfXmB023086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 31 Aug 2016 21:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305163 - vendor-sys/acpica/20160831 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2016 21:41:34 -0000 Author: jkim Date: Wed Aug 31 21:41:32 2016 New Revision: 305163 URL: https://svnweb.freebsd.org/changeset/base/305163 Log: Tag ACPICA 20160831. Added: vendor-sys/acpica/20160831/ - copied from r305162, vendor-sys/acpica/dist/ From owner-svn-src-vendor@freebsd.org Fri Sep 2 19:04:23 2016 Return-Path: Delivered-To: svn-src-vendor@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 20CF8BCD2B9; Fri, 2 Sep 2016 19:04:23 +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 C06AB252; Fri, 2 Sep 2016 19:04:22 +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 u82J4MX6058148; Fri, 2 Sep 2016 19:04:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u82J4Mne058147; Fri, 2 Sep 2016 19:04:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201609021904.u82J4Mne058147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 2 Sep 2016 19:04:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305291 - vendor/llvm/llvm-release_390-r280324 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 19:04:23 -0000 Author: dim Date: Fri Sep 2 19:04:21 2016 New Revision: 305291 URL: https://svnweb.freebsd.org/changeset/base/305291 Log: Tag llvm 3.9.0 release r280324. Added: vendor/llvm/llvm-release_390-r280324/ - copied from r305290, vendor/llvm/dist/ From owner-svn-src-vendor@freebsd.org Fri Sep 2 19:05:14 2016 Return-Path: Delivered-To: svn-src-vendor@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 3EA89BCD31E; Fri, 2 Sep 2016 19:05:14 +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 0EFC43DF; Fri, 2 Sep 2016 19:05:13 +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 u82J5DIU058233; Fri, 2 Sep 2016 19:05:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u82J5DNF058232; Fri, 2 Sep 2016 19:05:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201609021905.u82J5DNF058232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 2 Sep 2016 19:05:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305292 - vendor/clang/dist/lib/Basic X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 19:05:14 -0000 Author: dim Date: Fri Sep 2 19:05:13 2016 New Revision: 305292 URL: https://svnweb.freebsd.org/changeset/base/305292 Log: Vendor import of clang 3.9.0 release r280324: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_390/final@280324 Modified: vendor/clang/dist/lib/Basic/Version.cpp Modified: vendor/clang/dist/lib/Basic/Version.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Version.cpp Fri Sep 2 19:04:21 2016 (r305291) +++ vendor/clang/dist/lib/Basic/Version.cpp Fri Sep 2 19:05:13 2016 (r305292) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_39/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_390/final/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); From owner-svn-src-vendor@freebsd.org Fri Sep 2 19:05:31 2016 Return-Path: Delivered-To: svn-src-vendor@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 C87A9BCD358; Fri, 2 Sep 2016 19:05:31 +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 8268978F; Fri, 2 Sep 2016 19:05:31 +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 u82J5Ud7058285; Fri, 2 Sep 2016 19:05:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u82J5UsC058284; Fri, 2 Sep 2016 19:05:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201609021905.u82J5UsC058284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 2 Sep 2016 19:05:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305293 - vendor/clang/clang-release_390-r280324 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 19:05:31 -0000 Author: dim Date: Fri Sep 2 19:05:30 2016 New Revision: 305293 URL: https://svnweb.freebsd.org/changeset/base/305293 Log: Tag clang 3.9.0 release r280324. Added: vendor/clang/clang-release_390-r280324/ - copied from r305292, vendor/clang/dist/ From owner-svn-src-vendor@freebsd.org Fri Sep 2 19:06:08 2016 Return-Path: Delivered-To: svn-src-vendor@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 79169BCD3C8; Fri, 2 Sep 2016 19:06:08 +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 2FB528F3; Fri, 2 Sep 2016 19:06: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 u82J677Z058355; Fri, 2 Sep 2016 19:06:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u82J67Dp058354; Fri, 2 Sep 2016 19:06:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201609021906.u82J67Dp058354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 2 Sep 2016 19:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305294 - vendor/compiler-rt/compiler-rt-release_390-r280324 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 19:06:08 -0000 Author: dim Date: Fri Sep 2 19:06:07 2016 New Revision: 305294 URL: https://svnweb.freebsd.org/changeset/base/305294 Log: Tag compiler-rt 3.9.0 release r280324. Added: vendor/compiler-rt/compiler-rt-release_390-r280324/ - copied from r305293, vendor/compiler-rt/dist/ From owner-svn-src-vendor@freebsd.org Fri Sep 2 19:06:47 2016 Return-Path: Delivered-To: svn-src-vendor@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 4D9E4BCD415; Fri, 2 Sep 2016 19:06:47 +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 06AEDA3F; Fri, 2 Sep 2016 19:06:46 +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 u82J6kE7058423; Fri, 2 Sep 2016 19:06:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u82J6k11058422; Fri, 2 Sep 2016 19:06:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201609021906.u82J6k11058422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 2 Sep 2016 19:06:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305295 - vendor/libc++/libc++-release_390-r280324 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 19:06:47 -0000 Author: dim Date: Fri Sep 2 19:06:46 2016 New Revision: 305295 URL: https://svnweb.freebsd.org/changeset/base/305295 Log: Tag libc++ 3.9.0 release r280324. Added: vendor/libc++/libc++-release_390-r280324/ - copied from r305294, vendor/libc++/dist/ From owner-svn-src-vendor@freebsd.org Fri Sep 2 19:07:18 2016 Return-Path: Delivered-To: svn-src-vendor@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 22354BCD473; Fri, 2 Sep 2016 19:07:18 +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 CF8E9BA2; Fri, 2 Sep 2016 19:07:17 +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 u82J7HG2058485; Fri, 2 Sep 2016 19:07:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u82J7HoH058484; Fri, 2 Sep 2016 19:07:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201609021907.u82J7HoH058484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 2 Sep 2016 19:07:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305296 - vendor/lld/lld-release_390-r280324 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 19:07:18 -0000 Author: dim Date: Fri Sep 2 19:07:16 2016 New Revision: 305296 URL: https://svnweb.freebsd.org/changeset/base/305296 Log: Tag lld 3.9.0 release r280324. Added: vendor/lld/lld-release_390-r280324/ - copied from r305295, vendor/lld/dist/ From owner-svn-src-vendor@freebsd.org Fri Sep 2 19:07:46 2016 Return-Path: Delivered-To: svn-src-vendor@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 79E0EBCD4D5; Fri, 2 Sep 2016 19:07:46 +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 330E1D0A; Fri, 2 Sep 2016 19:07:46 +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 u82J7jYP058541; Fri, 2 Sep 2016 19:07:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u82J7jY3058540; Fri, 2 Sep 2016 19:07:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201609021907.u82J7jY3058540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 2 Sep 2016 19:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305297 - vendor/lldb/lldb-release_390-r280324 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 19:07:46 -0000 Author: dim Date: Fri Sep 2 19:07:45 2016 New Revision: 305297 URL: https://svnweb.freebsd.org/changeset/base/305297 Log: Tag lldb 3.9.0 release r280324. Added: vendor/lldb/lldb-release_390-r280324/ - copied from r305296, vendor/lldb/dist/ From owner-svn-src-vendor@freebsd.org Sat Sep 3 10:48:49 2016 Return-Path: Delivered-To: svn-src-vendor@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 CD512BCB82D; Sat, 3 Sep 2016 10:48: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 8D705CEA; Sat, 3 Sep 2016 10:48:49 +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 u83AmmOK012657; Sat, 3 Sep 2016 10:48:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u83AmmnN012652; Sat, 3 Sep 2016 10:48:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609031048.u83AmmnN012652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 3 Sep 2016 10:48:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305335 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2016 10:48:49 -0000 Author: mav Date: Sat Sep 3 10:48:48 2016 New Revision: 305335 URL: https://svnweb.freebsd.org/changeset/base/305335 Log: 7003 zap_lockdir() should tag hold zap_lockdir() / zap_unlockdir() should take a "void *tag" argument which tags the hold on the zap. This will help diagnose programming errors which misuse the hold on the ZAP. Sponsored by: Intel Corp. Closes #108 Reviewed by: Pavel Zakharov Reviewed by: Steve Gonczi Reviewed by: George Wilson Reviewed by: Brian Behlendorf Author: Matthew Ahrens openzfs/openzfs@0780b3eab5a2c13e04328b39ecd2a6d0d3c4f7cb Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Sat Sep 3 10:10:58 2016 (r305334) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Sat Sep 3 10:48:48 2016 (r305335) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. @@ -2903,6 +2903,13 @@ dmu_buf_get_blkptr(dmu_buf_t *db) return (dbi->db_blkptr); } +objset_t * +dmu_buf_get_objset(dmu_buf_t *db) +{ + dmu_buf_impl_t *dbi = (dmu_buf_impl_t *)db; + return (dbi->db_objset); +} + static void dbuf_check_blkptr(dnode_t *dn, dmu_buf_impl_t *db) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Sat Sep 3 10:10:58 2016 (r305334) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Sat Sep 3 10:48:48 2016 (r305335) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2016 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright 2013 DEY Storage Systems, Inc. @@ -615,6 +615,8 @@ void *dmu_buf_remove_user(dmu_buf_t *db, */ void *dmu_buf_get_user(dmu_buf_t *db); +objset_t *dmu_buf_get_objset(dmu_buf_t *db); + /* Block until any in-progress dmu buf user evictions complete. */ void dmu_buf_user_evict_wait(void); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h Sat Sep 3 10:10:58 2016 (r305334) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h Sat Sep 3 10:48:48 2016 (r305335) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013, 2015 by Delphix. All rights reserved. + * Copyright (c) 2013, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -197,8 +197,8 @@ typedef struct zap_name { boolean_t zap_match(zap_name_t *zn, const char *matchname); int zap_lockdir(objset_t *os, uint64_t obj, dmu_tx_t *tx, - krw_t lti, boolean_t fatreader, boolean_t adding, zap_t **zapp); -void zap_unlockdir(zap_t *zap); + krw_t lti, boolean_t fatreader, boolean_t adding, void *tag, zap_t **zapp); +void zap_unlockdir(zap_t *zap, void *tag); void zap_evict(void *dbu); zap_name_t *zap_name_alloc(zap_t *zap, const char *key, matchtype_t mt); void zap_name_free(zap_name_t *zn); @@ -217,9 +217,10 @@ void fzap_prefetch(zap_name_t *zn); int fzap_count_write(zap_name_t *zn, int add, refcount_t *towrite, refcount_t *tooverwrite); int fzap_add(zap_name_t *zn, uint64_t integer_size, uint64_t num_integers, - const void *val, dmu_tx_t *tx); + const void *val, void *tag, dmu_tx_t *tx); int fzap_update(zap_name_t *zn, - int integer_size, uint64_t num_integers, const void *val, dmu_tx_t *tx); + int integer_size, uint64_t num_integers, const void *val, + void *tag, dmu_tx_t *tx); int fzap_length(zap_name_t *zn, uint64_t *integer_size, uint64_t *num_integers); int fzap_remove(zap_name_t *zn, dmu_tx_t *tx); @@ -229,7 +230,7 @@ void zap_put_leaf(struct zap_leaf *l); int fzap_add_cd(zap_name_t *zn, uint64_t integer_size, uint64_t num_integers, - const void *val, uint32_t cd, dmu_tx_t *tx); + const void *val, uint32_t cd, void *tag, dmu_tx_t *tx); void fzap_upgrade(zap_t *zap, dmu_tx_t *tx, zap_flags_t flags); #ifdef __cplusplus Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c Sat Sep 3 10:10:58 2016 (r305334) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c Sat Sep 3 10:48:48 2016 (r305335) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ @@ -596,7 +596,8 @@ zap_deref_leaf(zap_t *zap, uint64_t h, d } static int -zap_expand_leaf(zap_name_t *zn, zap_leaf_t *l, dmu_tx_t *tx, zap_leaf_t **lp) +zap_expand_leaf(zap_name_t *zn, zap_leaf_t *l, + void *tag, dmu_tx_t *tx, zap_leaf_t **lp) { zap_t *zap = zn->zn_zap; uint64_t hash = zn->zn_hash; @@ -618,9 +619,9 @@ zap_expand_leaf(zap_name_t *zn, zap_leaf uint64_t object = zap->zap_object; zap_put_leaf(l); - zap_unlockdir(zap); + zap_unlockdir(zap, tag); err = zap_lockdir(os, object, tx, RW_WRITER, - FALSE, FALSE, &zn->zn_zap); + FALSE, FALSE, tag, &zn->zn_zap); zap = zn->zn_zap; if (err) return (err); @@ -683,7 +684,8 @@ zap_expand_leaf(zap_name_t *zn, zap_leaf } static void -zap_put_leaf_maybe_grow_ptrtbl(zap_name_t *zn, zap_leaf_t *l, dmu_tx_t *tx) +zap_put_leaf_maybe_grow_ptrtbl(zap_name_t *zn, zap_leaf_t *l, + void *tag, dmu_tx_t *tx) { zap_t *zap = zn->zn_zap; int shift = zap_f_phys(zap)->zap_ptrtbl.zt_shift; @@ -703,9 +705,9 @@ zap_put_leaf_maybe_grow_ptrtbl(zap_name_ objset_t *os = zap->zap_objset; uint64_t zapobj = zap->zap_object; - zap_unlockdir(zap); + zap_unlockdir(zap, tag); err = zap_lockdir(os, zapobj, tx, - RW_WRITER, FALSE, FALSE, &zn->zn_zap); + RW_WRITER, FALSE, FALSE, tag, &zn->zn_zap); zap = zn->zn_zap; if (err) return; @@ -795,7 +797,7 @@ fzap_lookup(zap_name_t *zn, int fzap_add_cd(zap_name_t *zn, uint64_t integer_size, uint64_t num_integers, - const void *val, uint32_t cd, dmu_tx_t *tx) + const void *val, uint32_t cd, void *tag, dmu_tx_t *tx) { zap_leaf_t *l; int err; @@ -824,7 +826,7 @@ retry: if (err == 0) { zap_increment_num_entries(zap, 1, tx); } else if (err == EAGAIN) { - err = zap_expand_leaf(zn, l, tx, &l); + err = zap_expand_leaf(zn, l, tag, tx, &l); zap = zn->zn_zap; /* zap_expand_leaf() may change zap */ if (err == 0) goto retry; @@ -832,26 +834,27 @@ retry: out: if (zap != NULL) - zap_put_leaf_maybe_grow_ptrtbl(zn, l, tx); + zap_put_leaf_maybe_grow_ptrtbl(zn, l, tag, tx); return (err); } int fzap_add(zap_name_t *zn, uint64_t integer_size, uint64_t num_integers, - const void *val, dmu_tx_t *tx) + const void *val, void *tag, dmu_tx_t *tx) { int err = fzap_check(zn, integer_size, num_integers); if (err != 0) return (err); return (fzap_add_cd(zn, integer_size, num_integers, - val, ZAP_NEED_CD, tx)); + val, ZAP_NEED_CD, tag, tx)); } int fzap_update(zap_name_t *zn, - int integer_size, uint64_t num_integers, const void *val, dmu_tx_t *tx) + int integer_size, uint64_t num_integers, const void *val, + void *tag, dmu_tx_t *tx) { zap_leaf_t *l; int err, create; @@ -881,14 +884,14 @@ retry: } if (err == EAGAIN) { - err = zap_expand_leaf(zn, l, tx, &l); + err = zap_expand_leaf(zn, l, tag, tx, &l); zap = zn->zn_zap; /* zap_expand_leaf() may change zap */ if (err == 0) goto retry; } if (zap != NULL) - zap_put_leaf_maybe_grow_ptrtbl(zn, l, tx); + zap_put_leaf_maybe_grow_ptrtbl(zn, l, tag, tx); return (err); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c Sat Sep 3 10:10:58 2016 (r305334) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c Sat Sep 3 10:48:48 2016 (r305335) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2015 by Delphix. All rights reserved. + * Copyright (c) 2011, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -43,7 +43,8 @@ extern inline mzap_phys_t *zap_m_phys(zap_t *zap); -static int mzap_upgrade(zap_t **zapp, dmu_tx_t *tx, zap_flags_t flags); +static int mzap_upgrade(zap_t **zapp, + void *tag, dmu_tx_t *tx, zap_flags_t flags); uint64_t zap_getflags(zap_t *zap) @@ -457,20 +458,18 @@ handle_winner: return (winner); } -int -zap_lockdir(objset_t *os, uint64_t obj, dmu_tx_t *tx, +static int +zap_lockdir_impl(dmu_buf_t *db, void *tag, dmu_tx_t *tx, krw_t lti, boolean_t fatreader, boolean_t adding, zap_t **zapp) { zap_t *zap; - dmu_buf_t *db; krw_t lt; - int err; - *zapp = NULL; + ASSERT0(db->db_offset); + objset_t *os = dmu_buf_get_objset(db); + uint64_t obj = db->db_object; - err = dmu_buf_hold(os, obj, 0, NULL, &db, DMU_READ_NO_PREFETCH); - if (err) - return (err); + *zapp = NULL; #ifdef ZFS_DEBUG { @@ -488,7 +487,6 @@ zap_lockdir(objset_t *os, uint64_t obj, * mzap_open() didn't like what it saw on-disk. * Check for corruption! */ - dmu_buf_rele(db, NULL); return (SET_ERROR(EIO)); } } @@ -527,10 +525,12 @@ zap_lockdir(objset_t *os, uint64_t obj, dprintf("upgrading obj %llu: num_entries=%u\n", obj, zap->zap_m.zap_num_entries); *zapp = zap; - return (mzap_upgrade(zapp, tx, 0)); + int err = mzap_upgrade(zapp, tag, tx, 0); + if (err != 0) + rw_exit(&zap->zap_rwlock); + return (err); } - err = dmu_object_set_blocksize(os, obj, newsz, 0, tx); - ASSERT0(err); + VERIFY0(dmu_object_set_blocksize(os, obj, newsz, 0, tx)); zap->zap_m.zap_num_chunks = db->db_size / MZAP_ENT_LEN - 1; } @@ -539,15 +539,31 @@ zap_lockdir(objset_t *os, uint64_t obj, return (0); } +int +zap_lockdir(objset_t *os, uint64_t obj, dmu_tx_t *tx, + krw_t lti, boolean_t fatreader, boolean_t adding, void *tag, zap_t **zapp) +{ + dmu_buf_t *db; + int err; + + err = dmu_buf_hold(os, obj, 0, tag, &db, DMU_READ_NO_PREFETCH); + if (err != 0) + return (err); + err = zap_lockdir_impl(db, tag, tx, lti, fatreader, adding, zapp); + if (err != 0) + dmu_buf_rele(db, tag); + return (err); +} + void -zap_unlockdir(zap_t *zap) +zap_unlockdir(zap_t *zap, void *tag) { rw_exit(&zap->zap_rwlock); - dmu_buf_rele(zap->zap_dbuf, NULL); + dmu_buf_rele(zap->zap_dbuf, tag); } static int -mzap_upgrade(zap_t **zapp, dmu_tx_t *tx, zap_flags_t flags) +mzap_upgrade(zap_t **zapp, void *tag, dmu_tx_t *tx, zap_flags_t flags) { mzap_phys_t *mzp; int i, sz, nchunks; @@ -585,7 +601,8 @@ mzap_upgrade(zap_t **zapp, dmu_tx_t *tx, dprintf("adding %s=%llu\n", mze->mze_name, mze->mze_value); zn = zap_name_alloc(zap, mze->mze_name, MT_EXACT); - err = fzap_add_cd(zn, 8, 1, &mze->mze_value, mze->mze_cd, tx); + err = fzap_add_cd(zn, 8, 1, &mze->mze_value, mze->mze_cd, + tag, tx); zap = zn->zn_zap; /* fzap_add_cd() may change zap */ zap_name_free(zn); if (err) @@ -624,9 +641,9 @@ mzap_create_impl(objset_t *os, uint64_t zap_t *zap; /* Only fat zap supports flags; upgrade immediately. */ VERIFY(0 == zap_lockdir(os, obj, tx, RW_WRITER, - B_FALSE, B_FALSE, &zap)); - VERIFY3U(0, ==, mzap_upgrade(&zap, tx, flags)); - zap_unlockdir(zap); + B_FALSE, B_FALSE, FTAG, &zap)); + VERIFY3U(0, ==, mzap_upgrade(&zap, FTAG, tx, flags)); + zap_unlockdir(zap, FTAG); } } @@ -721,7 +738,7 @@ zap_count(objset_t *os, uint64_t zapobj, zap_t *zap; int err; - err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, &zap); + err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, FTAG, &zap); if (err) return (err); if (!zap->zap_ismicro) { @@ -729,7 +746,7 @@ zap_count(objset_t *os, uint64_t zapobj, } else { *count = zap->zap_m.zap_num_entries; } - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (err); } @@ -786,25 +803,19 @@ zap_lookup(objset_t *os, uint64_t zapobj num_integers, buf, MT_EXACT, NULL, 0, NULL)); } -int -zap_lookup_norm(objset_t *os, uint64_t zapobj, const char *name, +static int +zap_lookup_impl(zap_t *zap, const char *name, uint64_t integer_size, uint64_t num_integers, void *buf, matchtype_t mt, char *realname, int rn_len, boolean_t *ncp) { - zap_t *zap; - int err; + int err = 0; mzap_ent_t *mze; zap_name_t *zn; - err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, &zap); - if (err) - return (err); zn = zap_name_alloc(zap, name, mt); - if (zn == NULL) { - zap_unlockdir(zap); + if (zn == NULL) return (SET_ERROR(ENOTSUP)); - } if (!zap->zap_ismicro) { err = fzap_lookup(zn, integer_size, num_integers, buf, @@ -831,7 +842,24 @@ zap_lookup_norm(objset_t *os, uint64_t z } } zap_name_free(zn); - zap_unlockdir(zap); + return (err); +} + +int +zap_lookup_norm(objset_t *os, uint64_t zapobj, const char *name, + uint64_t integer_size, uint64_t num_integers, void *buf, + matchtype_t mt, char *realname, int rn_len, + boolean_t *ncp) +{ + zap_t *zap; + int err; + + err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, FTAG, &zap); + if (err != 0) + return (err); + err = zap_lookup_impl(zap, name, integer_size, + num_integers, buf, mt, realname, rn_len, ncp); + zap_unlockdir(zap, FTAG); return (err); } @@ -843,18 +871,18 @@ zap_prefetch_uint64(objset_t *os, uint64 int err; zap_name_t *zn; - err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, &zap); + err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, FTAG, &zap); if (err) return (err); zn = zap_name_alloc_uint64(zap, key, key_numints); if (zn == NULL) { - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); } fzap_prefetch(zn); zap_name_free(zn); - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (err); } @@ -866,19 +894,19 @@ zap_lookup_uint64(objset_t *os, uint64_t int err; zap_name_t *zn; - err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, &zap); + err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, FTAG, &zap); if (err) return (err); zn = zap_name_alloc_uint64(zap, key, key_numints); if (zn == NULL) { - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); } err = fzap_lookup(zn, integer_size, num_integers, buf, NULL, 0, NULL); zap_name_free(zn); - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (err); } @@ -901,12 +929,12 @@ zap_length(objset_t *os, uint64_t zapobj mzap_ent_t *mze; zap_name_t *zn; - err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, &zap); + err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, FTAG, &zap); if (err) return (err); zn = zap_name_alloc(zap, name, MT_EXACT); if (zn == NULL) { - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); } if (!zap->zap_ismicro) { @@ -923,7 +951,7 @@ zap_length(objset_t *os, uint64_t zapobj } } zap_name_free(zn); - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (err); } @@ -935,17 +963,17 @@ zap_length_uint64(objset_t *os, uint64_t int err; zap_name_t *zn; - err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, &zap); + err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, FTAG, &zap); if (err) return (err); zn = zap_name_alloc_uint64(zap, key, key_numints); if (zn == NULL) { - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); } err = fzap_length(zn, integer_size, num_integers); zap_name_free(zn); - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (err); } @@ -1004,22 +1032,24 @@ zap_add(objset_t *os, uint64_t zapobj, c const uint64_t *intval = val; zap_name_t *zn; - err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, &zap); + err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, FTAG, &zap); if (err) return (err); zn = zap_name_alloc(zap, key, MT_EXACT); if (zn == NULL) { - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); } if (!zap->zap_ismicro) { - err = fzap_add(zn, integer_size, num_integers, val, tx); + err = fzap_add(zn, integer_size, num_integers, val, FTAG, tx); zap = zn->zn_zap; /* fzap_add() may change zap */ } else if (integer_size != 8 || num_integers != 1 || strlen(key) >= MZAP_NAME_LEN) { - err = mzap_upgrade(&zn->zn_zap, tx, 0); - if (err == 0) - err = fzap_add(zn, integer_size, num_integers, val, tx); + err = mzap_upgrade(&zn->zn_zap, FTAG, tx, 0); + if (err == 0) { + err = fzap_add(zn, integer_size, num_integers, val, + FTAG, tx); + } zap = zn->zn_zap; /* fzap_add() may change zap */ } else { mze = mze_find(zn); @@ -1032,7 +1062,7 @@ zap_add(objset_t *os, uint64_t zapobj, c ASSERT(zap == zn->zn_zap); zap_name_free(zn); if (zap != NULL) /* may be NULL if fzap_add() failed */ - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (err); } @@ -1045,19 +1075,19 @@ zap_add_uint64(objset_t *os, uint64_t za int err; zap_name_t *zn; - err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, &zap); + err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, FTAG, &zap); if (err) return (err); zn = zap_name_alloc_uint64(zap, key, key_numints); if (zn == NULL) { - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); } - err = fzap_add(zn, integer_size, num_integers, val, tx); + err = fzap_add(zn, integer_size, num_integers, val, FTAG, tx); zap = zn->zn_zap; /* fzap_add() may change zap */ zap_name_free(zn); if (zap != NULL) /* may be NULL if fzap_add() failed */ - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (err); } @@ -1081,25 +1111,27 @@ zap_update(objset_t *os, uint64_t zapobj (void) zap_lookup(os, zapobj, name, 8, 1, &oldval); #endif - err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, &zap); + err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, FTAG, &zap); if (err) return (err); zn = zap_name_alloc(zap, name, MT_EXACT); if (zn == NULL) { - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); } if (!zap->zap_ismicro) { - err = fzap_update(zn, integer_size, num_integers, val, tx); + err = fzap_update(zn, integer_size, num_integers, val, + FTAG, tx); zap = zn->zn_zap; /* fzap_update() may change zap */ } else if (integer_size != 8 || num_integers != 1 || strlen(name) >= MZAP_NAME_LEN) { dprintf("upgrading obj %llu: intsz=%u numint=%llu name=%s\n", zapobj, integer_size, num_integers, name); - err = mzap_upgrade(&zn->zn_zap, tx, 0); - if (err == 0) + err = mzap_upgrade(&zn->zn_zap, FTAG, tx, 0); + if (err == 0) { err = fzap_update(zn, integer_size, num_integers, - val, tx); + val, FTAG, tx); + } zap = zn->zn_zap; /* fzap_update() may change zap */ } else { mze = mze_find(zn); @@ -1113,7 +1145,7 @@ zap_update(objset_t *os, uint64_t zapobj ASSERT(zap == zn->zn_zap); zap_name_free(zn); if (zap != NULL) /* may be NULL if fzap_upgrade() failed */ - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (err); } @@ -1126,19 +1158,19 @@ zap_update_uint64(objset_t *os, uint64_t zap_name_t *zn; int err; - err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, &zap); + err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, TRUE, FTAG, &zap); if (err) return (err); zn = zap_name_alloc_uint64(zap, key, key_numints); if (zn == NULL) { - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); } - err = fzap_update(zn, integer_size, num_integers, val, tx); + err = fzap_update(zn, integer_size, num_integers, val, FTAG, tx); zap = zn->zn_zap; /* fzap_update() may change zap */ zap_name_free(zn); if (zap != NULL) /* may be NULL if fzap_upgrade() failed */ - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (err); } @@ -1157,12 +1189,12 @@ zap_remove_norm(objset_t *os, uint64_t z mzap_ent_t *mze; zap_name_t *zn; - err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, FALSE, &zap); + err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, FALSE, FTAG, &zap); if (err) return (err); zn = zap_name_alloc(zap, name, mt); if (zn == NULL) { - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); } if (!zap->zap_ismicro) { @@ -1179,7 +1211,7 @@ zap_remove_norm(objset_t *os, uint64_t z } } zap_name_free(zn); - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (err); } @@ -1191,17 +1223,17 @@ zap_remove_uint64(objset_t *os, uint64_t int err; zap_name_t *zn; - err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, FALSE, &zap); + err = zap_lockdir(os, zapobj, tx, RW_WRITER, TRUE, FALSE, FTAG, &zap); if (err) return (err); zn = zap_name_alloc_uint64(zap, key, key_numints); if (zn == NULL) { - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (SET_ERROR(ENOTSUP)); } err = fzap_remove(zn, tx); zap_name_free(zn); - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (err); } @@ -1233,7 +1265,7 @@ zap_cursor_fini(zap_cursor_t *zc) { if (zc->zc_zap) { rw_enter(&zc->zc_zap->zap_rwlock, RW_READER); - zap_unlockdir(zc->zc_zap); + zap_unlockdir(zc->zc_zap, NULL); zc->zc_zap = NULL; } if (zc->zc_leaf) { @@ -1280,7 +1312,7 @@ zap_cursor_retrieve(zap_cursor_t *zc, za if (zc->zc_zap == NULL) { int hb; err = zap_lockdir(zc->zc_objset, zc->zc_zapobj, NULL, - RW_READER, TRUE, FALSE, &zc->zc_zap); + RW_READER, TRUE, FALSE, NULL, &zc->zc_zap); if (err) return (err); @@ -1344,7 +1376,7 @@ zap_get_stats(objset_t *os, uint64_t zap int err; zap_t *zap; - err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, &zap); + err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, FTAG, &zap); if (err) return (err); @@ -1357,7 +1389,7 @@ zap_get_stats(objset_t *os, uint64_t zap } else { fzap_get_stats(zap, zs); } - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (0); } @@ -1376,7 +1408,7 @@ zap_count_write(objset_t *os, uint64_t z * - 2 blocks for possibly split leaves, * - 2 grown ptrtbl blocks * - * This also accomodates the case where an add operation to a fairly + * This also accommodates the case where an add operation to a fairly * large microzap results in a promotion to fatzap. */ if (name == NULL) { @@ -1389,10 +1421,11 @@ zap_count_write(objset_t *os, uint64_t z * We lock the zap with adding == FALSE. Because, if we pass * the actual value of add, it could trigger a mzap_upgrade(). * At present we are just evaluating the possibility of this operation - * and hence we donot want to trigger an upgrade. + * and hence we do not want to trigger an upgrade. */ - err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, &zap); - if (err) + err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, + FTAG, &zap); + if (err != 0) return (err); if (!zap->zap_ismicro) { @@ -1438,6 +1471,6 @@ zap_count_write(objset_t *os, uint64_t z } } - zap_unlockdir(zap); + zap_unlockdir(zap, FTAG); return (err); } From owner-svn-src-vendor@freebsd.org Sat Sep 3 10:50:44 2016 Return-Path: Delivered-To: svn-src-vendor@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 E5BBABCBA56; Sat, 3 Sep 2016 10:50:44 +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 BD091FAD; Sat, 3 Sep 2016 10:50:44 +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 u83AohEp012780; Sat, 3 Sep 2016 10:50:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u83Aoh8L012779; Sat, 3 Sep 2016 10:50:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609031050.u83Aoh8L012779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 3 Sep 2016 10:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305336 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2016 10:50:45 -0000 Author: mav Date: Sat Sep 3 10:50:43 2016 New Revision: 305336 URL: https://svnweb.freebsd.org/changeset/base/305336 Log: 7247 zfs receive of deduplicated stream fails This resolves two 'zfs recv' issues. First, when receiving into an existing filesystem, a snapshot created during the receive process is not added to the guid->dataset map for the stream, resulting in failed lookups for deduped streams when a WRITE_BYREF record refers to a snapshot received earlier in the stream. Second, the newly created snapshot was also not set properly, referencing the snapshot before the new receiving dataset rather than the existing filesystem. Closes #159 Reviewed by: Matthew Ahrens Reviewed by: Dan Kimmel Author: Chris Williamson openzfs/openzfs@b09697c8c18be68abfe538de9809938239402ae8 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Sat Sep 3 10:48:48 2016 (r305335) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Sat Sep 3 10:50:43 2016 (r305336) @@ -3047,6 +3047,9 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t dsl_dataset_phys(origin_head)->ds_flags &= ~DS_FLAG_INCONSISTENT; + drc->drc_newsnapobj = + dsl_dataset_phys(origin_head)->ds_prev_snap_obj; + dsl_dataset_rele(origin_head, FTAG); dsl_destroy_head_sync_impl(drc->drc_ds, tx); @@ -3082,8 +3085,9 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t (void) zap_remove(dp->dp_meta_objset, ds->ds_object, DS_FIELD_RESUME_TONAME, tx); } + drc->drc_newsnapobj = + dsl_dataset_phys(drc->drc_ds)->ds_prev_snap_obj; } - drc->drc_newsnapobj = dsl_dataset_phys(drc->drc_ds)->ds_prev_snap_obj; /* * Release the hold from dmu_recv_begin. This must be done before * we return to open context, so that when we free the dataset's dnode, @@ -3126,8 +3130,6 @@ static int dmu_recv_end_modified_blocks static int dmu_recv_existing_end(dmu_recv_cookie_t *drc) { - int error; - #ifdef _KERNEL /* * We will be destroying the ds; make sure its origin is unmounted if @@ -3138,23 +3140,30 @@ dmu_recv_existing_end(dmu_recv_cookie_t zfs_destroy_unmount_origin(name); #endif - error = dsl_sync_task(drc->drc_tofs, + return (dsl_sync_task(drc->drc_tofs, dmu_recv_end_check, dmu_recv_end_sync, drc, - dmu_recv_end_modified_blocks, ZFS_SPACE_CHECK_NORMAL); - - if (error != 0) - dmu_recv_cleanup_ds(drc); - return (error); + dmu_recv_end_modified_blocks, ZFS_SPACE_CHECK_NORMAL)); } static int dmu_recv_new_end(dmu_recv_cookie_t *drc) { + return (dsl_sync_task(drc->drc_tofs, + dmu_recv_end_check, dmu_recv_end_sync, drc, + dmu_recv_end_modified_blocks, ZFS_SPACE_CHECK_NORMAL)); +} + +int +dmu_recv_end(dmu_recv_cookie_t *drc, void *owner) +{ int error; - error = dsl_sync_task(drc->drc_tofs, - dmu_recv_end_check, dmu_recv_end_sync, drc, - dmu_recv_end_modified_blocks, ZFS_SPACE_CHECK_NORMAL); + drc->drc_owner = owner; + + if (drc->drc_newfs) + error = dmu_recv_new_end(drc); + else + error = dmu_recv_existing_end(drc); if (error != 0) { dmu_recv_cleanup_ds(drc); @@ -3166,17 +3175,6 @@ dmu_recv_new_end(dmu_recv_cookie_t *drc) return (error); } -int -dmu_recv_end(dmu_recv_cookie_t *drc, void *owner) -{ - drc->drc_owner = owner; - - if (drc->drc_newfs) - return (dmu_recv_new_end(drc)); - else - return (dmu_recv_existing_end(drc)); -} - /* * Return TRUE if this objset is currently being received into. */ From owner-svn-src-vendor@freebsd.org Sat Sep 3 10:54:58 2016 Return-Path: Delivered-To: svn-src-vendor@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 BB214BCBC29; Sat, 3 Sep 2016 10:54:58 +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 8D26A6CB; Sat, 3 Sep 2016 10:54:58 +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 u83Asvsg016225; Sat, 3 Sep 2016 10:54:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u83AsvWe016217; Sat, 3 Sep 2016 10:54:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609031054.u83AsvWe016217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 3 Sep 2016 10:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305337 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2016 10:54:58 -0000 Author: mav Date: Sat Sep 3 10:54:56 2016 New Revision: 305337 URL: https://svnweb.freebsd.org/changeset/base/305337 Log: 7004 dmu_tx_hold_zap() does dnode_hold() 7x on same object Using a benchmark which has 32 threads creating 2 million files in the same directory, on a machine with 16 CPU cores, I observed poor performance. I noticed that dmu_tx_hold_zap() was using about 30% of all CPU, and doing dnode_hold() 7 times on the same object (the ZAP object that is being held). dmu_tx_hold_zap() keeps a hold on the dnode_t the entire time it is running, in dmu_tx_hold_t:txh_dnode, so it would be nice to use the dnode_t that we already have in hand, rather than repeatedly calling dnode_hold(). To do this, we need to pass the dnode_t down through all the intermediate calls that dmu_tx_hold_zap() makes, making these routines take the dnode_t* rather than an objset_t* and a uint64_t object number. In particular, the following routines will need to have analogous *_by_dnode() variants created: dmu_buf_hold_noread() dmu_buf_hold() zap_lookup() zap_lookup_norm() zap_count_write() zap_lockdir() zap_count_write() This can improve performance on the benchmark described above by 100%, from 30,000 file creations per second to 60,000. (This improvement is on top of that provided by working around the object allocation issue. Peak performance of ~90,000 creations per second was observed with 8 CPUs; adding CPUs past that decreased performance due to lock contention.) The CPU used by dmu_tx_hold_zap() was reduced by 88%, from 340 CPU-seconds to 40 CPU-seconds. Sponsored by: Intel Corp. Closes #109 Reviewed by: Steve Gonczi Reviewed by: George Wilson Reviewed by: Pavel Zakharov Reviewed by: Ned Bass Reviewed by: Brian Behlendorf Author: Matthew Ahrens openzfs/openzfs@d3e523d489a169ab36f9ec1b2a111a60a5563a9f Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap.h vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Sat Sep 3 10:50:43 2016 (r305336) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Sat Sep 3 10:54:56 2016 (r305337) @@ -2910,6 +2910,21 @@ dmu_buf_get_objset(dmu_buf_t *db) return (dbi->db_objset); } +dnode_t * +dmu_buf_dnode_enter(dmu_buf_t *db) +{ + dmu_buf_impl_t *dbi = (dmu_buf_impl_t *)db; + DB_DNODE_ENTER(dbi); + return (DB_DNODE(dbi)); +} + +void +dmu_buf_dnode_exit(dmu_buf_t *db) +{ + dmu_buf_impl_t *dbi = (dmu_buf_impl_t *)db; + DB_DNODE_EXIT(dbi); +} + static void dbuf_check_blkptr(dnode_t *dn, dmu_buf_impl_t *db) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Sat Sep 3 10:50:43 2016 (r305336) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Sat Sep 3 10:54:56 2016 (r305337) @@ -127,6 +127,26 @@ const dmu_object_byteswap_info_t dmu_ot_ }; int +dmu_buf_hold_noread_by_dnode(dnode_t *dn, uint64_t offset, + void *tag, dmu_buf_t **dbp) +{ + uint64_t blkid; + dmu_buf_impl_t *db; + + blkid = dbuf_whichblock(dn, 0, offset); + rw_enter(&dn->dn_struct_rwlock, RW_READER); + db = dbuf_hold(dn, blkid, tag); + rw_exit(&dn->dn_struct_rwlock); + + if (db == NULL) { + *dbp = NULL; + return (SET_ERROR(EIO)); + } + + *dbp = &db->db; + return (0); +} +int dmu_buf_hold_noread(objset_t *os, uint64_t object, uint64_t offset, void *tag, dmu_buf_t **dbp) { @@ -154,6 +174,29 @@ dmu_buf_hold_noread(objset_t *os, uint64 } int +dmu_buf_hold_by_dnode(dnode_t *dn, uint64_t offset, + void *tag, dmu_buf_t **dbp, int flags) +{ + int err; + int db_flags = DB_RF_CANFAIL; + + if (flags & DMU_READ_NO_PREFETCH) + db_flags |= DB_RF_NOPREFETCH; + + err = dmu_buf_hold_noread_by_dnode(dn, offset, tag, dbp); + if (err == 0) { + dmu_buf_impl_t *db = (dmu_buf_impl_t *)(*dbp); + err = dbuf_read(db, NULL, db_flags); + if (err != 0) { + dbuf_rele(db, tag); + *dbp = NULL; + } + } + + return (err); +} + +int dmu_buf_hold(objset_t *os, uint64_t object, uint64_t offset, void *tag, dmu_buf_t **dbp, int flags) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Sat Sep 3 10:50:43 2016 (r305336) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Sat Sep 3 10:54:56 2016 (r305337) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -807,15 +807,14 @@ dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t o * access the name in this fat-zap so that we'll check * for i/o errors to the leaf blocks, etc. */ - err = zap_lookup(dn->dn_objset, dn->dn_object, name, - 8, 0, NULL); + err = zap_lookup_by_dnode(dn, name, 8, 0, NULL); if (err == EIO) { tx->tx_err = err; return; } } - err = zap_count_write(dn->dn_objset, dn->dn_object, name, add, + err = zap_count_write_by_dnode(dn, name, add, &txh->txh_space_towrite, &txh->txh_space_tooverwrite); /* Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Sat Sep 3 10:50:43 2016 (r305336) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Sat Sep 3 10:54:56 2016 (r305337) @@ -78,6 +78,7 @@ struct sa_handle; typedef struct objset objset_t; typedef struct dmu_tx dmu_tx_t; typedef struct dsl_dir dsl_dir_t; +typedef struct dnode dnode_t; typedef enum dmu_object_byteswap { DMU_BSWAP_UINT8, @@ -417,7 +418,7 @@ dmu_write_embedded(objset_t *os, uint64_ #define WP_DMU_SYNC 0x2 #define WP_SPILL 0x4 -void dmu_write_policy(objset_t *os, struct dnode *dn, int level, int wp, +void dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, struct zio_prop *zp); /* * The bonus data is accessed more or less like a regular buffer. @@ -443,7 +444,7 @@ int dmu_rm_spill(objset_t *, uint64_t, d */ int dmu_spill_hold_by_bonus(dmu_buf_t *bonus, void *tag, dmu_buf_t **dbp); -int dmu_spill_hold_by_dnode(struct dnode *dn, uint32_t flags, +int dmu_spill_hold_by_dnode(dnode_t *dn, uint32_t flags, void *tag, dmu_buf_t **dbp); int dmu_spill_hold_existing(dmu_buf_t *bonus, void *tag, dmu_buf_t **dbp); @@ -463,6 +464,8 @@ int dmu_spill_hold_existing(dmu_buf_t *b */ int dmu_buf_hold(objset_t *os, uint64_t object, uint64_t offset, void *tag, dmu_buf_t **, int flags); +int dmu_buf_hold_by_dnode(dnode_t *dn, uint64_t offset, + void *tag, dmu_buf_t **dbp, int flags); /* * Add a reference to a dmu buffer that has already been held via @@ -616,6 +619,8 @@ void *dmu_buf_remove_user(dmu_buf_t *db, void *dmu_buf_get_user(dmu_buf_t *db); objset_t *dmu_buf_get_objset(dmu_buf_t *db); +dnode_t *dmu_buf_dnode_enter(dmu_buf_t *db); +void dmu_buf_dnode_exit(dmu_buf_t *db); /* Block until any in-progress dmu buf user evictions complete. */ void dmu_buf_user_evict_wait(void); @@ -792,7 +797,7 @@ extern const dmu_object_byteswap_info_t */ int dmu_object_info(objset_t *os, uint64_t object, dmu_object_info_t *doi); /* Like dmu_object_info, but faster if you have a held dnode in hand. */ -void dmu_object_info_from_dnode(struct dnode *dn, dmu_object_info_t *doi); +void dmu_object_info_from_dnode(dnode_t *dn, dmu_object_info_t *doi); /* Like dmu_object_info, but faster if you have a held dbuf in hand. */ void dmu_object_info_from_db(dmu_buf_t *db, dmu_object_info_t *doi); /* Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Sat Sep 3 10:50:43 2016 (r305336) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Sat Sep 3 10:54:56 2016 (r305337) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ @@ -149,7 +149,7 @@ typedef struct dnode_phys { blkptr_t dn_spill; } dnode_phys_t; -typedef struct dnode { +struct dnode { /* * Protects the structure of the dnode, including the number of levels * of indirection (dn_nlevels), dn_maxblkid, and dn_next_* @@ -247,7 +247,7 @@ typedef struct dnode { /* holds prefetch structure */ struct zfetch dn_zfetch; -} dnode_t; +}; /* * Adds a level of indirection between the dbuf and the dnode to avoid Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap.h Sat Sep 3 10:50:43 2016 (r305336) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap.h Sat Sep 3 10:54:56 2016 (r305337) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. */ #ifndef _SYS_ZAP_H @@ -216,8 +216,14 @@ int zap_lookup_uint64(objset_t *os, uint int zap_contains(objset_t *ds, uint64_t zapobj, const char *name); int zap_prefetch_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key, int key_numints); +int zap_lookup_by_dnode(dnode_t *dn, const char *name, + uint64_t integer_size, uint64_t num_integers, void *buf); +int zap_lookup_norm_by_dnode(dnode_t *dn, const char *name, + uint64_t integer_size, uint64_t num_integers, void *buf, + matchtype_t mt, char *realname, int rn_len, + boolean_t *ncp); -int zap_count_write(objset_t *os, uint64_t zapobj, const char *name, +int zap_count_write_by_dnode(dnode_t *dn, const char *name, int add, refcount_t *towrite, refcount_t *tooverwrite); /* Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c Sat Sep 3 10:50:43 2016 (r305336) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c Sat Sep 3 10:54:56 2016 (r305337) @@ -270,6 +270,7 @@ zap_table_load(zap_t *zap, zap_table_phy uint64_t blk, off; int err; dmu_buf_t *db; + dnode_t *dn; int bs = FZAP_BLOCK_SHIFT(zap); ASSERT(RW_LOCK_HELD(&zap->zap_rwlock)); @@ -277,8 +278,15 @@ zap_table_load(zap_t *zap, zap_table_phy blk = idx >> (bs-3); off = idx & ((1<<(bs-3))-1); - err = dmu_buf_hold(zap->zap_objset, zap->zap_object, + /* + * Note: this is equivalent to dmu_buf_hold(), but we use + * _dnode_enter / _by_dnode because it's faster because we don't + * have to hold the dnode. + */ + dn = dmu_buf_dnode_enter(zap->zap_dbuf); + err = dmu_buf_hold_by_dnode(dn, (tbl->zt_blk + blk) << bs, FTAG, &db, DMU_READ_NO_PREFETCH); + dmu_buf_dnode_exit(zap->zap_dbuf); if (err) return (err); *valp = ((uint64_t *)db->db_data)[off]; @@ -292,9 +300,11 @@ zap_table_load(zap_t *zap, zap_table_phy */ blk = (idx*2) >> (bs-3); - err = dmu_buf_hold(zap->zap_objset, zap->zap_object, + dn = dmu_buf_dnode_enter(zap->zap_dbuf); + err = dmu_buf_hold_by_dnode(dn, (tbl->zt_nextblk + blk) << bs, FTAG, &db, DMU_READ_NO_PREFETCH); + dmu_buf_dnode_exit(zap->zap_dbuf); if (err == 0) dmu_buf_rele(db, FTAG); } @@ -505,8 +515,10 @@ zap_get_leaf_byblk(zap_t *zap, uint64_t ASSERT(RW_LOCK_HELD(&zap->zap_rwlock)); - err = dmu_buf_hold(zap->zap_objset, zap->zap_object, + dnode_t *dn = dmu_buf_dnode_enter(zap->zap_dbuf); + err = dmu_buf_hold_by_dnode(dn, blkid << bs, NULL, &db, DMU_READ_NO_PREFETCH); + dmu_buf_dnode_exit(zap->zap_dbuf); if (err) return (err); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c Sat Sep 3 10:50:43 2016 (r305336) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c Sat Sep 3 10:54:56 2016 (r305337) @@ -539,6 +539,24 @@ zap_lockdir_impl(dmu_buf_t *db, void *ta return (0); } +static int +zap_lockdir_by_dnode(dnode_t *dn, dmu_tx_t *tx, + krw_t lti, boolean_t fatreader, boolean_t adding, void *tag, zap_t **zapp) +{ + dmu_buf_t *db; + int err; + + err = dmu_buf_hold_by_dnode(dn, 0, tag, &db, DMU_READ_NO_PREFETCH); + if (err != 0) { + return (err); + } + err = zap_lockdir_impl(db, tag, tx, lti, fatreader, adding, zapp); + if (err != 0) { + dmu_buf_rele(db, tag); + } + return (err); +} + int zap_lockdir(objset_t *os, uint64_t obj, dmu_tx_t *tx, krw_t lti, boolean_t fatreader, boolean_t adding, void *tag, zap_t **zapp) @@ -864,6 +882,33 @@ zap_lookup_norm(objset_t *os, uint64_t z } int +zap_lookup_by_dnode(dnode_t *dn, const char *name, + uint64_t integer_size, uint64_t num_integers, void *buf) +{ + return (zap_lookup_norm_by_dnode(dn, name, integer_size, + num_integers, buf, MT_EXACT, NULL, 0, NULL)); +} + +int +zap_lookup_norm_by_dnode(dnode_t *dn, const char *name, + uint64_t integer_size, uint64_t num_integers, void *buf, + matchtype_t mt, char *realname, int rn_len, + boolean_t *ncp) +{ + zap_t *zap; + int err; + + err = zap_lockdir_by_dnode(dn, NULL, RW_READER, TRUE, FALSE, + FTAG, &zap); + if (err != 0) + return (err); + err = zap_lookup_impl(zap, name, integer_size, + num_integers, buf, mt, realname, rn_len, ncp); + zap_unlockdir(zap, FTAG); + return (err); +} + +int zap_prefetch_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key, int key_numints) { @@ -1394,7 +1439,7 @@ zap_get_stats(objset_t *os, uint64_t zap } int -zap_count_write(objset_t *os, uint64_t zapobj, const char *name, int add, +zap_count_write_by_dnode(dnode_t *dn, const char *name, int add, refcount_t *towrite, refcount_t *tooverwrite) { zap_t *zap; @@ -1423,7 +1468,7 @@ zap_count_write(objset_t *os, uint64_t z * At present we are just evaluating the possibility of this operation * and hence we do not want to trigger an upgrade. */ - err = zap_lockdir(os, zapobj, NULL, RW_READER, TRUE, FALSE, + err = zap_lockdir_by_dnode(dn, NULL, RW_READER, TRUE, FALSE, FTAG, &zap); if (err != 0) return (err); From owner-svn-src-vendor@freebsd.org Sat Sep 3 15:08:14 2016 Return-Path: Delivered-To: svn-src-vendor@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 B71DABCE0E4; Sat, 3 Sep 2016 15:08:14 +0000 (UTC) (envelope-from des@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 63B60FA5; Sat, 3 Sep 2016 15:08:14 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u83F8DKf009544; Sat, 3 Sep 2016 15:08:13 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u83F8DrF009540; Sat, 3 Sep 2016 15:08:13 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609031508.u83F8DrF009540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sat, 3 Sep 2016 15:08:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305347 - in vendor/unbound/dist: . cachedb compat daemon dns64 dnstap doc iterator libunbound libunbound/python pythonmod services services/cache sldns smallapp testcode testdata util ... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2016 15:08:14 -0000 Author: des Date: Sat Sep 3 15:08:13 2016 New Revision: 305347 URL: https://svnweb.freebsd.org/changeset/base/305347 Log: import unbound 1.5.9 Added: vendor/unbound/dist/cachedb/ vendor/unbound/dist/cachedb/cachedb.c (contents, props changed) vendor/unbound/dist/cachedb/cachedb.h (contents, props changed) vendor/unbound/dist/compat/strsep.c (contents, props changed) vendor/unbound/dist/testdata/val_deleg_nons.rpl vendor/unbound/dist/util/ub_event.c (contents, props changed) vendor/unbound/dist/util/ub_event.h (contents, props changed) vendor/unbound/dist/util/ub_event_pluggable.c (contents, props changed) Modified: vendor/unbound/dist/Makefile.in vendor/unbound/dist/acx_nlnetlabs.m4 vendor/unbound/dist/compat/explicit_bzero.c vendor/unbound/dist/compat/getentropy_linux.c vendor/unbound/dist/config.h.in vendor/unbound/dist/configure vendor/unbound/dist/configure.ac vendor/unbound/dist/daemon/daemon.c vendor/unbound/dist/daemon/daemon.h vendor/unbound/dist/daemon/remote.c vendor/unbound/dist/daemon/unbound.c vendor/unbound/dist/daemon/worker.c vendor/unbound/dist/dns64/dns64.c vendor/unbound/dist/dnstap/dnstap.c vendor/unbound/dist/doc/Changelog vendor/unbound/dist/doc/README vendor/unbound/dist/doc/example.conf.in vendor/unbound/dist/doc/libunbound.3.in vendor/unbound/dist/doc/unbound-anchor.8.in vendor/unbound/dist/doc/unbound-checkconf.8.in vendor/unbound/dist/doc/unbound-control.8.in vendor/unbound/dist/doc/unbound-host.1.in vendor/unbound/dist/doc/unbound.8.in vendor/unbound/dist/doc/unbound.conf.5.in vendor/unbound/dist/iterator/iter_fwd.c vendor/unbound/dist/iterator/iter_utils.c vendor/unbound/dist/iterator/iter_utils.h vendor/unbound/dist/iterator/iterator.c vendor/unbound/dist/iterator/iterator.h vendor/unbound/dist/libunbound/context.h vendor/unbound/dist/libunbound/libunbound.c vendor/unbound/dist/libunbound/libworker.c vendor/unbound/dist/libunbound/libworker.h vendor/unbound/dist/libunbound/python/libunbound.i vendor/unbound/dist/libunbound/ubsyms.def vendor/unbound/dist/libunbound/unbound-event.h vendor/unbound/dist/libunbound/worker.h vendor/unbound/dist/pythonmod/pythonmod.c vendor/unbound/dist/pythonmod/pythonmod_utils.c vendor/unbound/dist/services/cache/dns.c vendor/unbound/dist/services/listen_dnsport.c vendor/unbound/dist/services/listen_dnsport.h vendor/unbound/dist/services/localzone.c vendor/unbound/dist/services/localzone.h vendor/unbound/dist/services/mesh.c vendor/unbound/dist/services/modstack.c vendor/unbound/dist/services/outside_network.c vendor/unbound/dist/services/outside_network.h vendor/unbound/dist/sldns/keyraw.c vendor/unbound/dist/sldns/parseutil.c vendor/unbound/dist/sldns/rrdef.h vendor/unbound/dist/sldns/str2wire.c vendor/unbound/dist/sldns/wire2str.c vendor/unbound/dist/smallapp/unbound-checkconf.c vendor/unbound/dist/smallapp/unbound-control.c vendor/unbound/dist/smallapp/worker_cb.c vendor/unbound/dist/testcode/fake_event.c vendor/unbound/dist/testcode/petal.c vendor/unbound/dist/testcode/unitmain.c vendor/unbound/dist/testcode/unitverify.c vendor/unbound/dist/util/config_file.c vendor/unbound/dist/util/config_file.h vendor/unbound/dist/util/configlexer.c vendor/unbound/dist/util/configlexer.lex vendor/unbound/dist/util/configparser.c vendor/unbound/dist/util/configparser.h vendor/unbound/dist/util/configparser.y vendor/unbound/dist/util/data/dname.c vendor/unbound/dist/util/data/msgencode.c vendor/unbound/dist/util/data/msgparse.c vendor/unbound/dist/util/data/msgparse.h vendor/unbound/dist/util/data/msgreply.c vendor/unbound/dist/util/data/msgreply.h vendor/unbound/dist/util/fptr_wlist.c vendor/unbound/dist/util/fptr_wlist.h vendor/unbound/dist/util/iana_ports.inc vendor/unbound/dist/util/module.h vendor/unbound/dist/util/net_help.c vendor/unbound/dist/util/netevent.c vendor/unbound/dist/util/netevent.h vendor/unbound/dist/util/tube.c vendor/unbound/dist/util/tube.h vendor/unbound/dist/validator/autotrust.c vendor/unbound/dist/validator/val_anchor.c vendor/unbound/dist/validator/val_secalgo.c vendor/unbound/dist/validator/val_secalgo.h vendor/unbound/dist/winrc/w_inst.c vendor/unbound/dist/winrc/win_svc.c Modified: vendor/unbound/dist/Makefile.in ============================================================================== --- vendor/unbound/dist/Makefile.in Sat Sep 3 13:57:47 2016 (r305346) +++ vendor/unbound/dist/Makefile.in Sat Sep 3 15:08:13 2016 (r305347) @@ -108,11 +108,12 @@ util/fptr_wlist.c util/locks.c util/log. util/netevent.c util/net_help.c util/random.c util/rbtree.c util/regional.c \ util/rtt.c util/storage/dnstree.c util/storage/lookup3.c \ util/storage/lruhash.c util/storage/slabhash.c util/timehist.c util/tube.c \ -util/winsock_event.c validator/autotrust.c validator/val_anchor.c \ -validator/validator.c validator/val_kcache.c validator/val_kentry.c \ -validator/val_neg.c validator/val_nsec3.c validator/val_nsec.c \ -validator/val_secalgo.c validator/val_sigcrypt.c \ -validator/val_utils.c dns64/dns64.c $(CHECKLOCK_SRC) $(DNSTAP_SRC) +util/ub_event.c util/ub_event_pluggable.c util/winsock_event.c \ +validator/autotrust.c validator/val_anchor.c validator/validator.c \ +validator/val_kcache.c validator/val_kentry.c validator/val_neg.c \ +validator/val_nsec3.c validator/val_nsec.c validator/val_secalgo.c \ +validator/val_sigcrypt.c validator/val_utils.c dns64/dns64.c cachedb/cachedb.c $(CHECKLOCK_SRC) \ +$(DNSTAP_SRC) COMMON_OBJ_WITHOUT_NETCALL=dns.lo infra.lo rrset.lo dname.lo msgencode.lo \ as112.lo msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ @@ -122,10 +123,11 @@ fptr_wlist.lo locks.lo log.lo mini_event random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo \ slabhash.lo timehist.lo tube.lo winsock_event.lo autotrust.lo val_anchor.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ -val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo \ +val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo cachedb.lo \ $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) $(DNSTAP_OBJ) -COMMON_OBJ=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ +COMMON_OBJ_WITHOUT_UB_EVENT=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo +COMMON_OBJ=$(COMMON_OBJ_WITHOUT_UB_EVENT) ub_event.lo # set to $COMMON_OBJ or to "" if --enableallsymbols COMMON_OBJ_ALL_SYMBOLS=@COMMON_OBJ_ALL_SYMBOLS@ COMPAT_SRC=compat/ctime_r.c compat/fake-rfc2553.c compat/gmtime_r.c \ @@ -134,7 +136,8 @@ compat/memcmp.c compat/memmove.c compat/ compat/strlcpy.c compat/strptime.c compat/getentropy_linux.c \ compat/getentropy_osx.c compat/getentropy_solaris.c compat/getentropy_win.c \ compat/explicit_bzero.c compat/arc4random.c compat/arc4random_uniform.c \ -compat/arc4_lock.c compat/sha512.c compat/reallocarray.c compat/isblank.c +compat/arc4_lock.c compat/sha512.c compat/reallocarray.c compat/isblank.c \ +compat/strsep.c COMPAT_OBJ=$(LIBOBJS:.o=.lo) COMPAT_OBJ_WITHOUT_CTIME=$(LIBOBJ_WITHOUT_CTIME:.o=.lo) COMPAT_OBJ_WITHOUT_CTIMEARC4=$(LIBOBJ_WITHOUT_CTIMEARC4:.o=.lo) @@ -177,7 +180,8 @@ daemon/worker.c daemon/acl_list.c daemon testcode/replay.c testcode/fake_event.c TESTBOUND_OBJ=testbound.lo replay.lo fake_event.lo TESTBOUND_OBJ_LINK=$(TESTBOUND_OBJ) testpkts.lo worker.lo acl_list.lo \ -daemon.lo stats.lo $(COMMON_OBJ_WITHOUT_NETCALL) $(SLDNS_OBJ) $(COMPAT_OBJ) +daemon.lo stats.lo $(COMMON_OBJ_WITHOUT_NETCALL) ub_event.lo $(SLDNS_OBJ) \ +$(COMPAT_OBJ) LOCKVERIFY_SRC=testcode/lock_verify.c LOCKVERIFY_OBJ=lock_verify.lo LOCKVERIFY_OBJ_LINK=$(LOCKVERIFY_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) \ @@ -209,8 +213,8 @@ DELAYER_OBJ_LINK=$(DELAYER_OBJ) worker_c $(SLDNS_OBJ) LIBUNBOUND_SRC=libunbound/context.c libunbound/libunbound.c \ libunbound/libworker.c -LIBUNBOUND_OBJ=context.lo libunbound.lo libworker.lo -LIBUNBOUND_OBJ_LINK=$(LIBUNBOUND_OBJ) $(COMMON_OBJ) $(SLDNS_OBJ) $(COMPAT_OBJ) +LIBUNBOUND_OBJ=context.lo libunbound.lo libworker.lo ub_event_pluggable.lo +LIBUNBOUND_OBJ_LINK=$(LIBUNBOUND_OBJ) $(COMMON_OBJ_WITHOUT_UB_EVENT) $(SLDNS_OBJ) $(COMPAT_OBJ) # win apps or "" if not on windows WINAPPS=@WINAPPS@ @@ -552,7 +556,7 @@ uninstall: $(PYTHONMOD_UNINSTALL) $(PYUN @echo "You still need to remove "`dirname $(DESTDIR)$(configfile)`" , $(DESTDIR)$(configfile) by hand" iana_update: - curl -o port-numbers.tmp http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml --compressed + curl -o port-numbers.tmp https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml --compressed if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc rm -f port-numbers.tmp @@ -596,7 +600,6 @@ depend: rm -f $(DEPEND_TMP) $(DEPEND_TMP2) # Dependencies -as112.lo as112.o: $(srcdir)/util/as112.c $(srcdir)/util/as112.h dns.lo dns.o: $(srcdir)/services/cache/dns.c config.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/msgreply.h \ @@ -614,6 +617,7 @@ rrset.lo rrset.o: $(srcdir)/services/cac $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/regional.h $(srcdir)/util/alloc.h +as112.lo as112.o: $(srcdir)/util/as112.c $(srcdir)/util/as112.h dname.lo dname.o: $(srcdir)/util/data/dname.c config.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/storage/lookup3.h $(srcdir)/sldns/sbuffer.h @@ -624,9 +628,9 @@ msgencode.lo msgencode.o: $(srcdir)/util $(srcdir)/sldns/sbuffer.h msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/dname.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h \ - $(srcdir)/sldns/wire2str.h + $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h msgreply.lo msgreply.o: $(srcdir)/util/data/msgreply.c config.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h \ @@ -718,7 +722,7 @@ modstack.lo modstack.o: $(srcdir)/servic $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \ - $(srcdir)/validator/val_utils.h + $(srcdir)/validator/val_utils.h $(PYTHONMOD_HEADER) $(srcdir)/cachedb/cachedb.h outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h @@ -762,7 +766,8 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/ut $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \ $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h \ $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h + $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h \ + $(PYTHONMOD_HEADER) $(srcdir)/cachedb/cachedb.h locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ @@ -773,12 +778,12 @@ mini_event.lo mini_event.o: $(srcdir)/ut module.lo module.o: $(srcdir)/util/module.c config.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h -netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/netevent.h $(srcdir)/util/log.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ +netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/netevent.h $(srcdir)/util/ub_event.h \ + $(srcdir)/util/log.h $(srcdir)/util/net_help.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h + $(srcdir)/dnstap/dnstap.h net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ @@ -808,7 +813,15 @@ tube.lo tube.o: $(srcdir)/util/tube.c co $(srcdir)/util/netevent.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/services/mesh.h \ - $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h + $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/ub_event.h +ub_event.lo ub_event.o: $(srcdir)/util/ub_event.c config.h $(srcdir)/util/ub_event.h $(srcdir)/util/log.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h +ub_event_pluggable.lo ub_event_pluggable.o: $(srcdir)/util/ub_event_pluggable.c config.h $(srcdir)/util/ub_event.h \ + $(srcdir)/libunbound/unbound-event.h $(srcdir)/util/netevent.h $(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h winsock_event.lo winsock_event.o: $(srcdir)/util/winsock_event.c config.h autotrust.lo autotrust.o: $(srcdir)/validator/autotrust.c config.h $(srcdir)/validator/autotrust.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ @@ -822,8 +835,8 @@ autotrust.lo autotrust.o: $(srcdir)/vali val_anchor.lo val_anchor.o: $(srcdir)/validator/val_anchor.c config.h $(srcdir)/validator/val_anchor.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_sigcrypt.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/validator/autotrust.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h $(srcdir)/util/as112.h + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/util/as112.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h validator.lo validator.o: $(srcdir)/validator/validator.c config.h $(srcdir)/validator/validator.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ @@ -880,7 +893,7 @@ val_utils.lo val_utils.o: $(srcdir)/vali $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h \ $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/regional.h + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h dns64.lo dns64.o: $(srcdir)/dns64/dns64.c config.h $(srcdir)/dns64/dns64.h $(srcdir)/util/module.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ @@ -888,6 +901,14 @@ dns64.lo dns64.o: $(srcdir)/dns64/dns64. $(srcdir)/util/storage/slabhash.h $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h +cachedb.lo cachedb.o: $(srcdir)/cachedb/cachedb.c config.h $(srcdir)/cachedb/cachedb.h $(srcdir)/util/module.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/services/cache/dns.h $(srcdir)/validator/val_neg.h \ + $(srcdir)/util/rbtree.h $(srcdir)/validator/val_secalgo.h $(srcdir)/iterator/iter_utils.h \ + $(srcdir)/iterator/iter_resptype.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h \ + $(srcdir)/sldns/sbuffer.h checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/testcode/checklocks.h unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ @@ -994,7 +1015,7 @@ unbound.lo unbound.o: $(srcdir)/daemon/u $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h + $(srcdir)/util/ub_event.h worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ @@ -1020,7 +1041,7 @@ testbound.lo testbound.o: $(srcdir)/test $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rtt.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h + $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcode/testpkts.h \ $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h @@ -1101,7 +1122,7 @@ unbound-checkconf.lo unbound-checkconf.o $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/services/localzone.h \ - $(srcdir)/sldns/sbuffer.h + $(srcdir)/sldns/sbuffer.h $(PYTHONMOD_HEADER) worker_cb.lo worker_cb.o: $(srcdir)/smallapp/worker_cb.c config.h $(srcdir)/libunbound/context.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ @@ -1121,9 +1142,10 @@ libunbound.lo libunbound.o: $(srcdir)/li $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/libunbound/libworker.h \ $(srcdir)/util/config_file.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h \ - $(srcdir)/util/random.h $(srcdir)/util/net_help.h $(srcdir)/util/tube.h $(srcdir)/services/localzone.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/random.h $(srcdir)/util/net_help.h $(srcdir)/util/tube.h $(srcdir)/util/ub_event.h \ + $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/sldns/sbuffer.h libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/libunbound/libworker.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1163,14 +1185,15 @@ pythonmod_utils.lo pythonmod_utils.o: $( $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h $(srcdir)/services/cache/dns.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/regional.h \ - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/sldns/sbuffer.h \ + win_svc.lo win_svc.o: $(srcdir)/winrc/win_svc.c config.h $(srcdir)/winrc/win_svc.h $(srcdir)/winrc/w_inst.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h $(srcdir)/util/config_file.h $(srcdir)/util/winsock_event.h + $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h $(srcdir)/util/config_file.h $(srcdir)/util/ub_event.h w_inst.lo w_inst.o: $(srcdir)/winrc/w_inst.c config.h $(srcdir)/winrc/w_inst.h $(srcdir)/winrc/win_svc.h unbound-service-install.lo unbound-service-install.o: $(srcdir)/winrc/unbound-service-install.c config.h \ $(srcdir)/winrc/w_inst.h @@ -1202,6 +1225,7 @@ snprintf.lo snprintf.o: $(srcdir)/compat strlcat.lo strlcat.o: $(srcdir)/compat/strlcat.c config.h strlcpy.lo strlcpy.o: $(srcdir)/compat/strlcpy.c config.h strptime.lo strptime.o: $(srcdir)/compat/strptime.c config.h +strsep.lo strsep.o: $(srcdir)/compat/strsep.c config.h getentropy_linux.lo getentropy_linux.o: $(srcdir)/compat/getentropy_linux.c config.h getentropy_osx.lo getentropy_osx.o: $(srcdir)/compat/getentropy_osx.c config.h getentropy_solaris.lo getentropy_solaris.o: $(srcdir)/compat/getentropy_solaris.c config.h Modified: vendor/unbound/dist/acx_nlnetlabs.m4 ============================================================================== --- vendor/unbound/dist/acx_nlnetlabs.m4 Sat Sep 3 13:57:47 2016 (r305346) +++ vendor/unbound/dist/acx_nlnetlabs.m4 Sat Sep 3 15:08:13 2016 (r305347) @@ -2,7 +2,9 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 32 +# Version 34 +# 2016-03-21 Check -ldl -pthread for libcrypto for ldns and openssl 1.1.0. +# 2016-03-21 Use HMAC_Update instead of HMAC_CTX_Init (for openssl-1.1.0). # 2016-01-04 -D_DEFAULT_SOURCE defined with -D_BSD_SOURCE for Linux glibc 2.20 # 2015-12-11 FLTO check for new OSX, clang. # 2015-11-18 spelling check fix. @@ -671,16 +673,16 @@ AC_DEFUN([ACX_SSL_CHECKS], [ ACX_RUNTIME_PATH_ADD([$ssldir/lib]) fi - AC_MSG_CHECKING([for HMAC_CTX_init in -lcrypto]) + AC_MSG_CHECKING([for HMAC_Update in -lcrypto]) LIBS="$LIBS -lcrypto" LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto" AC_TRY_LINK(, [ - int HMAC_CTX_init(void); - (void)HMAC_CTX_init(); + int HMAC_Update(void); + (void)HMAC_Update(); ], [ AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_HMAC_CTX_INIT], 1, - [If you have HMAC_CTX_init]) + AC_DEFINE([HAVE_HMAC_UPDATE], 1, + [If you have HMAC_Update]) ], [ AC_MSG_RESULT(no) # check if -lwsock32 or -lgdi32 are needed. @@ -690,11 +692,11 @@ AC_DEFUN([ACX_SSL_CHECKS], [ LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32" AC_MSG_CHECKING([if -lcrypto needs -lgdi32]) AC_TRY_LINK([], [ - int HMAC_CTX_init(void); - (void)HMAC_CTX_init(); + int HMAC_Update(void); + (void)HMAC_Update(); ],[ - AC_DEFINE([HAVE_HMAC_CTX_INIT], 1, - [If you have HMAC_CTX_init]) + AC_DEFINE([HAVE_HMAC_UPDATE], 1, + [If you have HMAC_Update]) AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) @@ -704,15 +706,30 @@ AC_DEFUN([ACX_SSL_CHECKS], [ LIBSSL_LIBS="$LIBSSL_LIBS -ldl" AC_MSG_CHECKING([if -lcrypto needs -ldl]) AC_TRY_LINK([], [ - int HMAC_CTX_init(void); - (void)HMAC_CTX_init(); + int HMAC_Update(void); + (void)HMAC_Update(); ],[ - AC_DEFINE([HAVE_HMAC_CTX_INIT], 1, - [If you have HMAC_CTX_init]) + AC_DEFINE([HAVE_HMAC_UPDATE], 1, + [If you have HMAC_Update]) AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) - AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + LIBS="$LIBS -ldl -pthread" + LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" + AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread]) + AC_TRY_LINK([], [ + int HMAC_Update(void); + (void)HMAC_Update(); + ],[ + AC_DEFINE([HAVE_HMAC_UPDATE], 1, + [If you have HMAC_Update]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) + ]) ]) ]) ]) Added: vendor/unbound/dist/cachedb/cachedb.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/unbound/dist/cachedb/cachedb.c Sat Sep 3 15:08:13 2016 (r305347) @@ -0,0 +1,702 @@ +/* + * cachedb/cachedb.c - cache from a database external to the program module + * + * Copyright (c) 2016, NLnet Labs. All rights reserved. + * + * This software is open source. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the NLNET LABS nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * \file + * + * This file contains a module that uses an external database to cache + * dns responses. + */ + +#include "config.h" +#ifdef USE_CACHEDB +#include "cachedb/cachedb.h" +#include "util/regional.h" +#include "util/net_help.h" +#include "util/config_file.h" +#include "util/data/msgreply.h" +#include "util/data/msgencode.h" +#include "services/cache/dns.h" +#include "validator/val_neg.h" +#include "validator/val_secalgo.h" +#include "iterator/iter_utils.h" +#include "sldns/parseutil.h" +#include "sldns/wire2str.h" +#include "sldns/sbuffer.h" + +#define CACHEDB_HASHSIZE 256 /* bit hash */ + +/** the unit test testframe for cachedb, its module state contains + * a cache for a couple queries (in memory). */ +struct testframe_moddata { + /** key for single stored data element, NULL if none */ + char* stored_key; + /** data for single stored data element, NULL if none */ + uint8_t* stored_data; + /** length of stored data */ + size_t stored_datalen; +}; + +static int +testframe_init(struct module_env* env, struct cachedb_env* cachedb_env) +{ + (void)env; + verbose(VERB_ALGO, "testframe_init"); + cachedb_env->backend_data = (void*)calloc(1, + sizeof(struct testframe_moddata)); + if(!cachedb_env->backend_data) { + log_err("out of memory"); + return 0; + } + return 1; +} + +static void +testframe_deinit(struct module_env* env, struct cachedb_env* cachedb_env) +{ + struct testframe_moddata* d = (struct testframe_moddata*) + cachedb_env->backend_data; + (void)env; + verbose(VERB_ALGO, "testframe_deinit"); + if(!d) + return; + free(d->stored_key); + free(d->stored_data); + free(d); +} + +static int +testframe_lookup(struct module_env* env, struct cachedb_env* cachedb_env, + char* key, struct sldns_buffer* result_buffer) +{ + struct testframe_moddata* d = (struct testframe_moddata*) + cachedb_env->backend_data; + (void)env; + verbose(VERB_ALGO, "testframe_lookup of %s", key); + if(d->stored_key && strcmp(d->stored_key, key) == 0) { + if(d->stored_datalen > sldns_buffer_capacity(result_buffer)) + return 0; /* too large */ + verbose(VERB_ALGO, "testframe_lookup found %d bytes", + (int)d->stored_datalen); + sldns_buffer_clear(result_buffer); + sldns_buffer_write(result_buffer, d->stored_data, + d->stored_datalen); + sldns_buffer_flip(result_buffer); + return 1; + } + return 0; +} + +static void +testframe_store(struct module_env* env, struct cachedb_env* cachedb_env, + char* key, uint8_t* data, size_t data_len) +{ + struct testframe_moddata* d = (struct testframe_moddata*) + cachedb_env->backend_data; + (void)env; + verbose(VERB_ALGO, "testframe_store %s (%d bytes)", key, (int)data_len); + + /* free old data element (if any) */ + free(d->stored_key); + d->stored_key = NULL; + free(d->stored_data); + d->stored_data = NULL; + d->stored_datalen = 0; + + d->stored_data = memdup(data, data_len); + if(!d->stored_data) { + log_err("out of memory"); + return; + } + d->stored_datalen = data_len; + d->stored_key = strdup(key); + if(!d->stored_key) { + free(d->stored_data); + d->stored_data = NULL; + d->stored_datalen = 0; + return; + } + /* (key,data) successfully stored */ +} + +/** The testframe backend is for unit tests */ +static struct cachedb_backend testframe_backend = { "testframe", + testframe_init, testframe_deinit, testframe_lookup, testframe_store +}; + +/** find a particular backend from possible backends */ +static struct cachedb_backend* +cachedb_find_backend(const char* str) +{ + if(strcmp(str, testframe_backend.name) == 0) + return &testframe_backend; + /* TODO add more backends here */ + return NULL; +} + +/** apply configuration to cachedb module 'global' state */ +static int +cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg) +{ + const char* backend_str = "testframe"; /* TODO get from cfg */ + if(backend_str && backend_str[0]) { + cachedb_env->backend = cachedb_find_backend(backend_str); + if(!cachedb_env->backend) { + log_err("cachedb: cannot find backend name '%s", + backend_str); + return NULL; + } + } + /* TODO see if more configuration needs to be applied or not */ + return 1; +} + +int +cachedb_init(struct module_env* env, int id) +{ + struct cachedb_env* cachedb_env = (struct cachedb_env*)calloc(1, + sizeof(struct cachedb_env)); + if(!cachedb_env) { + log_err("malloc failure"); + return 0; + } + env->modinfo[id] = (void*)cachedb_env; + if(!cachedb_apply_cfg(cachedb_env, env->cfg)) { + log_err("cachedb: could not apply configuration settings."); + return 0; + } + /* see if a backend is selected */ + if(!cachedb_env->backend || !cachedb_env->backend->name) + return 1; + if(!(*cachedb_env->backend->init)(env, cachedb_env)) { + log_err("cachedb: could not init %s backend", + cachedb_env->backend->name); + return 0; + } + cachedb_env->enabled = 1; + return 1; +} + +void +cachedb_deinit(struct module_env* env, int id) +{ + struct cachedb_env* cachedb_env; + if(!env || !env->modinfo[id]) + return; + cachedb_env = (struct cachedb_env*)env->modinfo[id]; + /* free contents */ + /* TODO */ + if(cachedb_env->enabled) { + (*cachedb_env->backend->deinit)(env, cachedb_env); + } + + free(cachedb_env); + env->modinfo[id] = NULL; +} + +/** new query for cachedb */ +static int +cachedb_new(struct module_qstate* qstate, int id) +{ + struct cachedb_qstate* iq = (struct cachedb_qstate*)regional_alloc( + qstate->region, sizeof(struct cachedb_qstate)); + qstate->minfo[id] = iq; + if(!iq) + return 0; + memset(iq, 0, sizeof(*iq)); + /* initialise it */ + /* TODO */ + + return 1; +} + +/** + * Return an error + * @param qstate: our query state + * @param id: module id + * @param rcode: error code (DNS errcode). + * @return: 0 for use by caller, to make notation easy, like: + * return error_response(..). + */ +static int +error_response(struct module_qstate* qstate, int id, int rcode) +{ + verbose(VERB_QUERY, "return error response %s", + sldns_lookup_by_id(sldns_rcodes, rcode)? + sldns_lookup_by_id(sldns_rcodes, rcode)->name:"??"); + qstate->return_rcode = rcode; + qstate->return_msg = NULL; + qstate->ext_state[id] = module_finished; + return 0; +} + +/** + * Hash the query name, type, class and dbacess-secret into lookup buffer. + * @param qstate: query state with query info + * and env->cfg with secret. + * @param buf: returned buffer with hash to lookup + * @param len: length of the buffer. + */ +static void +calc_hash(struct module_qstate* qstate, char* buf, size_t len) +{ + uint8_t clear[1024]; + size_t clen = 0; + uint8_t hash[CACHEDB_HASHSIZE/8]; + const char* hex = "0123456789ABCDEF"; + const char* secret = "default"; /* TODO: from qstate->env->cfg */ + size_t i; + + /* copy the hash info into the clear buffer */ + if(clen + qstate->qinfo.qname_len < sizeof(clear)) { + memmove(clear+clen, qstate->qinfo.qname, + qstate->qinfo.qname_len); + clen += qstate->qinfo.qname_len; + } + if(clen + 4 < sizeof(clear)) { + uint16_t t = htons(qstate->qinfo.qtype); + uint16_t c = htons(qstate->qinfo.qclass); + memmove(clear+clen, &t, 2); + memmove(clear+clen+2, &c, 2); + clen += 4; + } + if(secret && secret[0] && clen + strlen(secret) < sizeof(clear)) { + memmove(clear+clen, secret, strlen(secret)); + clen += strlen(secret); + } + + /* hash the buffer */ + secalgo_hash_sha256(clear, clen, hash); + memset(clear, 0, clen); + + /* hex encode output for portability (some online dbs need + * no nulls, no control characters, and so on) */ + log_assert(len >= sizeof(hash)*2 + 1); + (void)len; + for(i=0; i>4]; + buf[i*2+1] = hex[hash[i]&0x0f]; + } + buf[sizeof(hash)*2] = 0; +} + +/** convert data from return_msg into the data buffer */ +static int +prep_data(struct module_qstate* qstate, struct sldns_buffer* buf) +{ + uint64_t timestamp, expiry; + size_t oldlim; + struct edns_data edns; + memset(&edns, 0, sizeof(edns)); + edns.edns_present = 1; + edns.bits = EDNS_DO; + edns.ext_rcode = 0; + edns.edns_version = EDNS_ADVERTISED_VERSION; + edns.udp_size = EDNS_ADVERTISED_SIZE; + + if(!qstate->return_msg || !qstate->return_msg->rep) + return 0; + if(verbosity >= VERB_ALGO) + log_dns_msg("cachedb encoding", &qstate->return_msg->qinfo, + qstate->return_msg->rep); + if(!reply_info_answer_encode(&qstate->return_msg->qinfo, + qstate->return_msg->rep, 0, qstate->query_flags, + buf, 0, 1, qstate->env->scratch, 65535, &edns, 1, 0)) + return 0; + + /* TTLs in the return_msg are relative to time(0) so we have to + * store that, we also store the smallest ttl in the packet+time(0) + * as the packet expiry time */ + /* qstate->return_msg->rep->ttl contains that relative shortest ttl */ + timestamp = (uint64_t)*qstate->env->now; + expiry = timestamp + (uint64_t)qstate->return_msg->rep->ttl; + timestamp = htobe64(timestamp); + expiry = htobe64(expiry); + oldlim = sldns_buffer_limit(buf); + if(oldlim + sizeof(timestamp)+sizeof(expiry) >= + sldns_buffer_capacity(buf)) + return 0; /* doesn't fit. */ + sldns_buffer_set_limit(buf, oldlim + sizeof(timestamp)+sizeof(expiry)); + sldns_buffer_write_at(buf, oldlim, ×tamp, sizeof(timestamp)); + sldns_buffer_write_at(buf, oldlim+sizeof(timestamp), &expiry, + sizeof(expiry)); + + return 1; +} + +/** check expiry, return true if matches OK */ +static int +good_expiry_and_qinfo(struct module_qstate* qstate, struct sldns_buffer* buf) +{ + uint64_t expiry; + /* the expiry time is the last bytes of the buffer */ + if(sldns_buffer_limit(buf) < sizeof(expiry)) + return 0; + sldns_buffer_read_at(buf, sldns_buffer_limit(buf)-sizeof(expiry), + &expiry, sizeof(expiry)); + expiry = be64toh(expiry); + + if((time_t)expiry < *qstate->env->now) + return 0; + + return 1; +} + +/** convert dns message in buffer to return_msg */ +static int +parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) +{ + struct msg_parse* prs; + struct edns_data edns; + uint64_t timestamp, expiry; + time_t adjust; + size_t lim = sldns_buffer_limit(buf); + if(lim < LDNS_HEADER_SIZE+sizeof(timestamp)+sizeof(expiry)) + return 0; /* too short */ + + /* remove timestamp and expiry from end */ + sldns_buffer_read_at(buf, lim-sizeof(expiry), &expiry, sizeof(expiry)); + sldns_buffer_read_at(buf, lim-sizeof(expiry)-sizeof(timestamp), + ×tamp, sizeof(timestamp)); + expiry = be64toh(expiry); + timestamp = be64toh(timestamp); + + /* parse DNS packet */ + regional_free_all(qstate->env->scratch); + prs = (struct msg_parse*)regional_alloc(qstate->env->scratch, + sizeof(struct msg_parse)); + if(!prs) + return 0; /* out of memory */ + memset(prs, 0, sizeof(*prs)); + memset(&edns, 0, sizeof(edns)); + sldns_buffer_set_limit(buf, lim - sizeof(expiry)-sizeof(timestamp)); + if(parse_packet(buf, prs, qstate->env->scratch) != LDNS_RCODE_NOERROR) { + sldns_buffer_set_limit(buf, lim); + return 0; + } + if(parse_extract_edns(prs, &edns, qstate->env->scratch) != + LDNS_RCODE_NOERROR) { + sldns_buffer_set_limit(buf, lim); + return 0; + } + + qstate->return_msg = dns_alloc_msg(buf, prs, qstate->region); + sldns_buffer_set_limit(buf, lim); + if(!qstate->return_msg) + return 0; + + qstate->return_rcode = LDNS_RCODE_NOERROR; + + /* see how much of the TTL expired, and remove it */ + adjust = *qstate->env->now - (time_t)timestamp; + verbose(VERB_ALGO, "cachedb msg adjusted down by %d", (int)adjust); + /*adjust_msg(qstate->return_msg, adjust);*/ + /* TODO: + msg->rep->ttl = r->ttl - adjust; + msg->rep->prefetch_ttl = PREFETCH_TTL_CALC(msg->rep->ttl); + for(i=0; icount + d->rrsig_count; i++) { + if(d->rr_ttl[i] < adjust) + d->rr_ttl[i] = 0; + else d->rr_ttl[i] -= adjust; + } + if(d->ttl < adjust) + d->ttl = 0; + else d->ttl -= adjust; + */ + /* TODO */ + + return 0; +} + +/** + * Lookup the qstate.qinfo in extcache, store in qstate.return_msg. + * return true if lookup was successful. + */ +static int +cachedb_extcache_lookup(struct module_qstate* qstate, struct cachedb_env* ie) +{ + char key[(CACHEDB_HASHSIZE/8)*2+1]; + calc_hash(qstate, key, sizeof(key)); + + /* call backend to fetch data for key into scratch buffer */ + if( !(*ie->backend->lookup)(qstate->env, ie, key, + qstate->env->scratch_buffer)) { + return 0; + } + + /* check expiry date and check if query-data matches */ + if( !good_expiry_and_qinfo(qstate, qstate->env->scratch_buffer) ) { + return 0; + } + + /* parse dns message into return_msg */ + if( !parse_data(qstate, qstate->env->scratch_buffer) ) { + return 0; + } + return 1; +} + +/** + * Store the qstate.return_msg in extcache for key qstate.info + */ +static void +cachedb_extcache_store(struct module_qstate* qstate, struct cachedb_env* ie) +{ + char key[(CACHEDB_HASHSIZE/8)*2+1]; + calc_hash(qstate, key, sizeof(key)); + + /* prepare data in scratch buffer */ + if(!prep_data(qstate, qstate->env->scratch_buffer)) + return; + + /* call backend */ + (*ie->backend->store)(qstate->env, ie, key, + sldns_buffer_begin(qstate->env->scratch_buffer), + sldns_buffer_limit(qstate->env->scratch_buffer)); +} + +/** + * See if unbound's internal cache can answer the query + */ +static int +cachedb_intcache_lookup(struct module_qstate* qstate) +{ + struct dns_msg* msg; + msg = dns_cache_lookup(qstate->env, qstate->qinfo.qname, + qstate->qinfo.qname_len, qstate->qinfo.qtype, + qstate->qinfo.qclass, qstate->query_flags, + qstate->region, qstate->env->scratch); + if(!msg && qstate->env->neg_cache) { + /* lookup in negative cache; may result in + * NOERROR/NODATA or NXDOMAIN answers that need validation */ + msg = val_neg_getmsg(qstate->env->neg_cache, &qstate->qinfo, + qstate->region, qstate->env->rrset_cache, + qstate->env->scratch_buffer, + *qstate->env->now, 1/*add SOA*/, NULL); + } + if(!msg) + return 0; + /* this is the returned msg */ + qstate->return_rcode = LDNS_RCODE_NOERROR; + qstate->return_msg = msg; + return 1; +} + +/** + * Store query into the internal cache of unbound. + */ +static void +cachedb_intcache_store(struct module_qstate* qstate) +{ + if(!qstate->return_msg) + return; + (void)dns_cache_store(qstate->env, &qstate->qinfo, + qstate->return_msg->rep, 0, qstate->prefetch_leeway, 0, + qstate->region, qstate->query_flags); +} + +/** + * Handle a cachedb module event with a query + * @param qstate: query state (from the mesh), passed between modules. + * contains qstate->env module environment with global caches and so on. + * @param iq: query state specific for this module. per-query. + * @param ie: environment specific for this module. global. + * @param id: module id. + */ +static void +cachedb_handle_query(struct module_qstate* qstate, + struct cachedb_qstate* ATTR_UNUSED(iq), + struct cachedb_env* ie, int id) +{ + /* check if we are enabled, and skip if so */ + if(!ie->enabled) { + /* pass request to next module */ + qstate->ext_state[id] = module_wait_module; + return; + } + + if(qstate->blacklist) { + /* cache is blacklisted */ + /* pass request to next module */ + qstate->ext_state[id] = module_wait_module; + return; + } + + /* lookup inside unbound's internal cache */ + if(cachedb_intcache_lookup(qstate)) { + if(verbosity >= VERB_ALGO) + log_dns_msg("cachedb internal cache lookup", + &qstate->return_msg->qinfo, + qstate->return_msg->rep); + /* we are done with the query */ + qstate->ext_state[id] = module_finished; + return; + } + + /* ask backend cache to see if we have data */ + if(cachedb_extcache_lookup(qstate, ie)) { + if(verbosity >= VERB_ALGO) + log_dns_msg(ie->backend->name, + &qstate->return_msg->qinfo, + qstate->return_msg->rep); + /* store this result in internal cache */ + cachedb_intcache_store(qstate); + /* we are done with the query */ + qstate->ext_state[id] = module_finished; + return; + } + + /* no cache fetches */ + /* pass request to next module */ + qstate->ext_state[id] = module_wait_module; +} + +/** + * Handle a cachedb module event with a response from the iterator. + * @param qstate: query state (from the mesh), passed between modules. + * contains qstate->env module environment with global caches and so on. + * @param iq: query state specific for this module. per-query. + * @param ie: environment specific for this module. global. + * @param id: module id. + */ +static void +cachedb_handle_response(struct module_qstate* qstate, + struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id) +{ + /* check if we are enabled, and skip if not */ + if(!ie->enabled) { + /* we are done with the query */ + qstate->ext_state[id] = module_finished; + return; + } + + /* store the item into the backend cache */ + cachedb_extcache_store(qstate, ie); + + /* we are done with the query */ + qstate->ext_state[id] = module_finished; +} + +void +cachedb_operate(struct module_qstate* qstate, enum module_ev event, int id, + struct outbound_entry* outbound) +{ + struct cachedb_env* ie = (struct cachedb_env*)qstate->env->modinfo[id]; + struct cachedb_qstate* iq = (struct cachedb_qstate*)qstate->minfo[id]; + verbose(VERB_QUERY, "cachedb[module %d] operate: extstate:%s event:%s", + id, strextstate(qstate->ext_state[id]), strmodulevent(event)); + if(iq) log_query_info(VERB_QUERY, "cachedb operate: query", + &qstate->qinfo); + + /* perform cachedb state machine */ + if((event == module_event_new || event == module_event_pass) && + iq == NULL) { + if(!cachedb_new(qstate, id)) { + (void)error_response(qstate, id, LDNS_RCODE_SERVFAIL); + return; + } + iq = (struct cachedb_qstate*)qstate->minfo[id]; + } + if(iq && (event == module_event_pass || event == module_event_new)) { + cachedb_handle_query(qstate, iq, ie, id); + return; + } + if(iq && (event == module_event_moddone)) { + cachedb_handle_response(qstate, iq, ie, id); + return; + } + if(iq && outbound) { + /* cachedb does not need to process responses at this time + * ignore it. + cachedb_process_response(qstate, iq, ie, id, outbound, event); + */ + return; + } + if(event == module_event_error) { + verbose(VERB_ALGO, "got called with event error, giving up"); + (void)error_response(qstate, id, LDNS_RCODE_SERVFAIL); + return; + } + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Sep 3 15:08:47 2016 Return-Path: Delivered-To: svn-src-vendor@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 4B370BCE136; Sat, 3 Sep 2016 15:08:47 +0000 (UTC) (envelope-from des@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 027E0156; Sat, 3 Sep 2016 15:08:46 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u83F8kdG009606; Sat, 3 Sep 2016 15:08:46 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u83F8kGn009605; Sat, 3 Sep 2016 15:08:46 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609031508.u83F8kGn009605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sat, 3 Sep 2016 15:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r305348 - vendor/unbound/1.5.9 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2016 15:08:47 -0000 Author: des Date: Sat Sep 3 15:08:46 2016 New Revision: 305348 URL: https://svnweb.freebsd.org/changeset/base/305348 Log: tag unbound 1.5.9 Added: vendor/unbound/1.5.9/ - copied from r305347, vendor/unbound/dist/