From owner-svn-src-vendor@freebsd.org Mon Jun 15 11:30:09 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A4DC3307B6; Mon, 15 Jun 2020 11:30:09 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lpz535JFz4SMs; Mon, 15 Jun 2020 11:30:09 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 644F71CF00; Mon, 15 Jun 2020 11:30:09 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05FBU90V080510; Mon, 15 Jun 2020 11:30:09 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05FBU5jK080489; Mon, 15 Jun 2020 11:30:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202006151130.05FBU5jK080489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 15 Jun 2020 11:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362193 - in vendor/opencsd/dist: . decoder/build/linux decoder/build/linux/ref_trace_decode_lib decoder/build/win-vs2015/ref_trace_decode_lib decoder/docs decoder/docs/prog_guide decod... X-SVN-Group: vendor X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in vendor/opencsd/dist: . decoder/build/linux decoder/build/linux/ref_trace_decode_lib decoder/build/win-vs2015/ref_trace_decode_lib decoder/docs decoder/docs/prog_guide decoder/include/common decoder... X-SVN-Commit-Revision: 362193 X-SVN-Commit-Repository: base 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.33 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: Mon, 15 Jun 2020 11:30:09 -0000 Author: andrew Date: Mon Jun 15 11:30:04 2020 New Revision: 362193 URL: https://svnweb.freebsd.org/changeset/base/362193 Log: Import OpenCSD v0.14.2 Sponsored by: Innovate UK Added: vendor/opencsd/dist/decoder/include/common/ocsd_gen_elem_stack.h (contents, props changed) vendor/opencsd/dist/decoder/include/common/trc_raw_buffer.h (contents, props changed) vendor/opencsd/dist/decoder/include/opencsd/etmv4/trc_pkt_proc_etmv4i.h (contents, props changed) vendor/opencsd/dist/decoder/source/etmv4/trc_pkt_proc_etmv4i.cpp (contents, props changed) vendor/opencsd/dist/decoder/source/ocsd_gen_elem_stack.cpp (contents, props changed) vendor/opencsd/dist/decoder/tests/auto-fdo/set_strobing.sh (contents, props changed) vendor/opencsd/dist/decoder/tests/auto-fdo/show_strobing.sh (contents, props changed) vendor/opencsd/dist/decoder/tests/run_capi_test.bash (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/ vendor/opencsd/dist/decoder/tests/snapshots/Snowball/ vendor/opencsd/dist/decoder/tests/snapshots/Snowball/cpu_0.ini vendor/opencsd/dist/decoder/tests/snapshots/Snowball/cpu_1.ini vendor/opencsd/dist/decoder/tests/snapshots/Snowball/cstrace.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/Snowball/device_2.ini vendor/opencsd/dist/decoder/tests/snapshots/Snowball/device_3.ini vendor/opencsd/dist/decoder/tests/snapshots/Snowball/kernel_dump.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/Snowball/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/Snowball/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/ vendor/opencsd/dist/decoder/tests/snapshots/TC2/cpu_0.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/cpu_1.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/cpu_2.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/cpu_3.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/cpu_4.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/cstrace.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/TC2/device_10.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/device_5.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/device_6.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/device_7.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/device_8.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/device_9.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/ds5-dumps/ vendor/opencsd/dist/decoder/tests/snapshots/TC2/ds5-dumps/etmv3_0x10.txt (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/TC2/ds5-dumps/etmv3_0x11.txt (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/TC2/ds5-dumps/etmv3_0x12.txt (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/TC2/ds5-dumps/ptmv1_0x13.txt (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/TC2/kernel_dump.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/TC2/pkt_proc_logs/ vendor/opencsd/dist/decoder/tests/snapshots/TC2/pkt_proc_logs/trc_pkt_lister-dcd-0x13.ppl vendor/opencsd/dist/decoder/tests/snapshots/TC2/pkt_proc_logs/trc_pkt_lister_0x13.ppl vendor/opencsd/dist/decoder/tests/snapshots/TC2/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/TC2/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/a55-test-tpiu/ vendor/opencsd/dist/decoder/tests/snapshots/a55-test-tpiu/DSTREAM_0.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/a55-test-tpiu/README.txt (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/a55-test-tpiu/contents.ini vendor/opencsd/dist/decoder/tests/snapshots/a55-test-tpiu/device1.ini vendor/opencsd/dist/decoder/tests/snapshots/a55-test-tpiu/device2.ini vendor/opencsd/dist/decoder/tests/snapshots/a55-test-tpiu/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/a55-test-tpiu/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/a57_single_step/ vendor/opencsd/dist/decoder/tests/snapshots/a57_single_step/CSTMC_TRACE_FIFO.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/a57_single_step/device1.ini vendor/opencsd/dist/decoder/tests/snapshots/a57_single_step/device2.ini vendor/opencsd/dist/decoder/tests/snapshots/a57_single_step/mem_Cortex-A57_0.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/a57_single_step/pkt_proc_logs/ vendor/opencsd/dist/decoder/tests/snapshots/a57_single_step/pkt_proc_logs/trc_pkt_lister_a57ss-1.ppl vendor/opencsd/dist/decoder/tests/snapshots/a57_single_step/pkt_proc_logs/trc_pkt_lister_a57ss-2.ppl vendor/opencsd/dist/decoder/tests/snapshots/a57_single_step/pkt_proc_logs/trc_pkt_lister_a57ss.ppl vendor/opencsd/dist/decoder/tests/snapshots/a57_single_step/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/a57_single_step/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/ vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/cc1.fini_dump.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/cc1.init_dump.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/cc1.text_dump.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/cc1__libc_freeres_fn_dump.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/cc1__libc_thread_freeres_fn_dump.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/cpu_0.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/cpu_1.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/cpu_2.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/cpu_3.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/cpu_4.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/cpu_5.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/cstrace.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/etm_0.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/etm_1.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/etm_2.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/etm_3.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/etm_4.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/etm_5.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/bugfix-exact-match/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/init-short-addr/ vendor/opencsd/dist/decoder/tests/snapshots/init-short-addr/device1.ini vendor/opencsd/dist/decoder/tests/snapshots/init-short-addr/device2.ini vendor/opencsd/dist/decoder/tests/snapshots/init-short-addr/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/init-short-addr/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/init-short-addr/tracebuffer.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/ vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/cpu_0.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/cpu_1.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/cpu_2.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/cpu_3.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/cpu_4.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/cpu_5.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/cstrace.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/device_10.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/device_11.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/device_6.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/device_7.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/device_8.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/device_9.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/kernel_dump.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-ret-stck/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-001/ vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-001/cpu_0.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-001/device_6.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-001/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-001/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-001/uname.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-001/uname_trace.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-001/vdso.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/ vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/cpu_0.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/cpu_1.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/cpu_2.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/cpu_3.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/cpu_4.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/cpu_5.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/device_10.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/device_11.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/device_6.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/device_7.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/device_8.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/device_9.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/ld-2.21.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/libc-2.21.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/trace.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/uname.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno-uname-002/vdso.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/ vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/cpu_0.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/cpu_1.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/cpu_2.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/cpu_3.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/cpu_4.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/cpu_5.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/cstrace.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/cstraceitm.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/device_10.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/device_11.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/device_12.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/device_6.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/device_7.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/device_8.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/device_9.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/ds-5-dumps/ vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/ds-5-dumps/Trace_Report_0x10_cpu_0_2015Sep17_104900.txt (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/ds-5-dumps/Trace_Report_0x11_cpu_1_2015Sep17_104748.txt (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/ds-5-dumps/Trace_Report_0x13_cpu_3_2015Sep17_104147.txt (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/ds-5-dumps/Trace_Report_0x15_cpu_5_2015Sep17_105126.txt (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/kernel_dump.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/pkt_proc_logs/ vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/pkt_proc_logs/trc_pkt_lister_0x10.ppl vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/pkt_proc_logs/trc_pkt_lister_0x11.ppl vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/pkt_proc_logs/trc_pkt_lister_0x12.ppl vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/pkt_proc_logs/trc_pkt_lister_0x13.ppl vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/pkt_proc_logs/trc_pkt_lister_0x14.ppl vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/pkt_proc_logs/trc_pkt_lister_0x15.ppl vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/pkt_proc_logs/trc_pkt_lister_all.ppl vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/juno_r1_1/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/stm_only/ vendor/opencsd/dist/decoder/tests/snapshots/stm_only-2/ vendor/opencsd/dist/decoder/tests/snapshots/stm_only-2/cstraceitm.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/stm_only-2/device_0.ini vendor/opencsd/dist/decoder/tests/snapshots/stm_only-2/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/stm_only-2/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/stm_only-juno/ vendor/opencsd/dist/decoder/tests/snapshots/stm_only-juno/cstraceitm.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/stm_only-juno/device_0.ini vendor/opencsd/dist/decoder/tests/snapshots/stm_only-juno/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/stm_only-juno/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/stm_only/cstraceitm.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/stm_only/device_0.ini vendor/opencsd/dist/decoder/tests/snapshots/stm_only/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/stm_only/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/ vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/PTM_0_2.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/README.txt (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/device1.ini vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/device2.ini vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/device3.ini vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/device4.ini vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/device5.ini vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/device6.ini vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/ds-5_trace_dump/ vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/ds-5_trace_dump/a15_rs.txt (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/mem_Cortex-A15_0_0_VECTORS.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/mem_Cortex-A15_0_1_RO_CODE.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/mem_Cortex-A15_0_2_RO_DATA.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/mem_Cortex-A15_0_3_RW_DATA.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/mem_Cortex-A15_0_4_ZI_DATA.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/mem_Cortex-A15_0_5_ARM_LIB_HEAP.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/mem_Cortex-A15_0_6_ARM_LIB_STACK.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/mem_Cortex-A15_0_7_IRQ_STACK.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/mem_Cortex-A15_0_8_TTB.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/tc2-ptm-rstk-t32/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/test-file-mem-offsets/ vendor/opencsd/dist/decoder/tests/snapshots/test-file-mem-offsets/cpu_3.ini vendor/opencsd/dist/decoder/tests/snapshots/test-file-mem-offsets/device_9.ini vendor/opencsd/dist/decoder/tests/snapshots/test-file-mem-offsets/ld-2.21.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/test-file-mem-offsets/libc-2.21.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/test-file-mem-offsets/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/test-file-mem-offsets/trace.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/test-file-mem-offsets/trace.ini vendor/opencsd/dist/decoder/tests/snapshots/test-file-mem-offsets/uname.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/test-file-mem-offsets/vdso.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/ vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/PTM_0_2.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/README.txt (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/device1.ini vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/device2.ini vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/device3.ini vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/device4.ini vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/device5.ini vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/device6.ini vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/mem_Cortex-A15_0_0_VECTORS.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/mem_Cortex-A15_0_1_RO_CODE.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/mem_Cortex-A15_0_2_RO_DATA.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/mem_Cortex-A15_0_3_RW_DATA.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/mem_Cortex-A15_0_4_ZI_DATA.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/mem_Cortex-A15_0_5_ARM_LIB_HEAP.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/mem_Cortex-A15_0_6_ARM_LIB_STACK.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/mem_Cortex-A15_0_7_IRQ_STACK.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/mem_Cortex-A15_0_8_TTB.bin (contents, props changed) vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/snapshot.ini vendor/opencsd/dist/decoder/tests/snapshots/trace_cov_a15/trace.ini Deleted: vendor/opencsd/dist/decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4d.h vendor/opencsd/dist/decoder/source/etmv4/trc_pkt_elem_etmv4d.cpp vendor/opencsd/dist/decoder/source/etmv4/trc_pkt_proc_etmv4.cpp vendor/opencsd/dist/decoder/source/etmv4/trc_pkt_proc_etmv4d_impl.h vendor/opencsd/dist/decoder/source/etmv4/trc_pkt_proc_etmv4i_impl.cpp vendor/opencsd/dist/decoder/source/etmv4/trc_pkt_proc_etmv4i_impl.h vendor/opencsd/dist/decoder/tests/auto-fdo/record.sh Modified: vendor/opencsd/dist/HOWTO.md vendor/opencsd/dist/README.md vendor/opencsd/dist/decoder/build/linux/makefile vendor/opencsd/dist/decoder/build/linux/makefile.dev vendor/opencsd/dist/decoder/build/linux/ref_trace_decode_lib/makefile vendor/opencsd/dist/decoder/build/win-vs2015/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj vendor/opencsd/dist/decoder/build/win-vs2015/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj.filters vendor/opencsd/dist/decoder/docs/doxygen_config.dox vendor/opencsd/dist/decoder/docs/prog_guide/prog_guide_generic_pkts.md vendor/opencsd/dist/decoder/docs/test_progs.md vendor/opencsd/dist/decoder/include/common/ocsd_dcd_mngr.h vendor/opencsd/dist/decoder/include/common/ocsd_gen_elem_list.h vendor/opencsd/dist/decoder/include/common/trc_core_arch_map.h vendor/opencsd/dist/decoder/include/common/trc_gen_elem.h vendor/opencsd/dist/decoder/include/common/trc_pkt_decode_base.h vendor/opencsd/dist/decoder/include/i_dec/trc_i_decode.h vendor/opencsd/dist/decoder/include/i_dec/trc_idec_arminst.h vendor/opencsd/dist/decoder/include/mem_acc/trc_mem_acc_bufptr.h vendor/opencsd/dist/decoder/include/opencsd/etmv3/trc_pkt_decode_etmv3.h vendor/opencsd/dist/decoder/include/opencsd/etmv4/etmv4_decoder.h vendor/opencsd/dist/decoder/include/opencsd/etmv4/trc_etmv4_stack_elem.h vendor/opencsd/dist/decoder/include/opencsd/etmv4/trc_pkt_decode_etmv4i.h vendor/opencsd/dist/decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h vendor/opencsd/dist/decoder/include/opencsd/etmv4/trc_pkt_proc_etmv4.h vendor/opencsd/dist/decoder/include/opencsd/etmv4/trc_pkt_types_etmv4.h vendor/opencsd/dist/decoder/include/opencsd/ocsd_if_types.h vendor/opencsd/dist/decoder/include/opencsd/ocsd_if_version.h vendor/opencsd/dist/decoder/include/opencsd/ptm/trc_pkt_decode_ptm.h vendor/opencsd/dist/decoder/include/opencsd/stm/trc_pkt_decode_stm.h vendor/opencsd/dist/decoder/include/opencsd/trc_gen_elem_types.h vendor/opencsd/dist/decoder/include/pkt_printers/pkt_printer_t.h vendor/opencsd/dist/decoder/source/etmv3/trc_pkt_decode_etmv3.cpp vendor/opencsd/dist/decoder/source/etmv4/trc_etmv4_stack_elem.cpp vendor/opencsd/dist/decoder/source/etmv4/trc_pkt_decode_etmv4i.cpp vendor/opencsd/dist/decoder/source/etmv4/trc_pkt_elem_etmv4i.cpp vendor/opencsd/dist/decoder/source/i_dec/trc_i_decode.cpp vendor/opencsd/dist/decoder/source/i_dec/trc_idec_arminst.cpp vendor/opencsd/dist/decoder/source/mem_acc/trc_mem_acc_bufptr.cpp vendor/opencsd/dist/decoder/source/ocsd_dcd_tree.cpp vendor/opencsd/dist/decoder/source/ocsd_error.cpp vendor/opencsd/dist/decoder/source/ptm/trc_pkt_decode_ptm.cpp vendor/opencsd/dist/decoder/source/stm/trc_pkt_decode_stm.cpp vendor/opencsd/dist/decoder/source/trc_component.cpp vendor/opencsd/dist/decoder/source/trc_core_arch_map.cpp vendor/opencsd/dist/decoder/source/trc_gen_elem.cpp vendor/opencsd/dist/decoder/tests/auto-fdo/autofdo.md vendor/opencsd/dist/decoder/tests/perf-test-scripts/perf-setup-env.bash vendor/opencsd/dist/decoder/tests/run_pkt_decode_tests.bash Modified: vendor/opencsd/dist/HOWTO.md ============================================================================== --- vendor/opencsd/dist/HOWTO.md Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/HOWTO.md Mon Jun 15 11:30:04 2020 (r362193) @@ -4,37 +4,39 @@ HOWTO - using the library with perf {#howto_perf} @brief Using command line perf and OpenCSD to collect and decode trace. This HOWTO explains how to use the perf cmd line tools and the openCSD -library to collect and extract program flow traces generated by the +library to collect and extract program flow traces generated by the CoreSight IP blocks on a Linux system. The examples have been generated using -an aarch64 Juno-r0 platform. All information is considered accurate and tested -using the latest version of the library and the `master` branch on the -[perf-opencsd github repository][1]. +an aarch64 Juno-r0 platform. On Target Trace Acquisition - Perf Record ----------------------------------------- -All the enhancement to the Perf tools that support the new `cs_etm` pmu have -not been upstreamed yet. To get the required functionality branch -`perf-opencsd-master` needs to be downloaded to the target system where -traces are to be collected. This branch is a vanilla upstream kernel -supplemented with modifications to the CoreSight framework and drivers to be -usable by the Perf core. The remaining out of tree patches are being -upstreamed incrementally. -From there compiling the perf tools with `make -C tools/perf CORESIGHT=1` will -yield a `perf` executable that will support CoreSight trace collection. Note -that if traces are to be decompressed *off* target, there is no need to download +Compile the perf tool from the same kernel source code version you are using with: + + make -C tools/perf + +This will yield a `perf` executable that will support CoreSight trace collection. + +*Note:* If traces are to be decompressed **off** target, there is no need to download and compile the openCSD library (on the target). +If you are instead planning to use perf to record and decode the trace on the target, +compile the perf tool linking against the openCSD library, in the following way: + + make -C tools/perf VF=1 CORESIGHT=1 + +Further information on the needed build environments and options are detailed later +in the section **Off Target Perf Tools Compilation**. + Before launching a trace run a sink that will collect trace data needs to be identified. All CoreSight blocks identified by the framework are registed in sysFS: linaro@linaro-nano:~$ ls /sys/bus/coresight/devices/ - 20010000.etf 20040000.main_funnel 22040000.etm 22140000.etm - 230c0000.A53_funnel 23240000.etm replicator@20020000 20030000.tpiu - 20070000.etr 220c0000.A57_funnel 23040000.etm 23140000.etm 23340000.etm + etm0 etm2 etm4 etm6 funnel0 funnel2 funnel4 stm0 tmc_etr0 + etm1 etm3 etm5 etm7 funnel1 funnel3 replicator0 tmc_etf0 CoreSight blocks are listed in the device tree for a specific system and @@ -43,7 +45,7 @@ the sink that will recieve trace data needs to be iden option on the perf command line. Once a sink has been identify trace collection can start. An easy and yet interesting example is the `uname` command: - linaro@linaro-nano:~/kernel$ ./tools/perf/perf record -e cs_etm/@20070000.etr/ --per-thread uname + linaro@linaro-nano:~/kernel$ ./tools/perf/perf record -e cs_etm/@tmc_etr0/ --per-thread uname This will generate a `perf.data` file where execution has been traced for both user and kernel space. To narrow the field to either user or kernel space the @@ -51,7 +53,7 @@ user and kernel space. To narrow the field to either traces to user space: - linaro@linaro-nano:~/kernel$ ./tools/perf/perf record -vvv -e cs_etm/@20070000.etr/u --per-thread uname + linaro@linaro-nano:~/kernel$ ./tools/perf/perf record -vvv -e cs_etm/@tmc_etr0/u --per-thread uname Problems setting modules path maps, continuing anyway... ----------------------------------------------------------- perf_event_attr: @@ -131,9 +133,9 @@ falls within the specified range. Any work done by th range will not be traced. Address range filters can be specified for both user and kernel space session: - perf record -e cs_etm/@20070000.etr/k --filter 'filter 0xffffff8008562d0c/0x48' --per-thread uname + perf record -e cs_etm/@tmc_etr0/k --filter 'filter 0xffffff8008562d0c/0x48' --per-thread uname - perf record -e cs_etm/@20070000.etr/u --filter 'filter 0x72c/0x40@/opt/lib/libcstest.so.1.0' --per-thread ./main + perf record -e cs_etm/@tmc_etr0/u --filter 'filter 0x72c/0x40@/opt/lib/libcstest.so.1.0' --per-thread ./main When dealing with kernel space trace addresses are typically taken in the 'System.map' file. In user space addresses are relocatable and can be @@ -171,20 +173,20 @@ equal to the start address. Incidentally traces stop insruction pointer is equal to the stop address. Anything that happens between there to events is traced: - perf record -e cs_etm/@20070000.etr/k --filter 'start 0xffffff800856bc50,stop 0xffffff800856bcb0' --per-thread uname + perf record -e cs_etm/@tmc_etr0/k --filter 'start 0xffffff800856bc50,stop 0xffffff800856bcb0' --per-thread uname - perf record -vvv -e cs_etm/@20070000.etr/u --filter 'start 0x72c@/opt/lib/libcstest.so.1.0, \ + perf record -vvv -e cs_etm/@tmc_etr0/u --filter 'start 0x72c@/opt/lib/libcstest.so.1.0, \ stop 0x40082c@/home/linaro/main' \ - --per-thread ./main + --per-thread ./main **Limitation on address filters:** The only limitation on address filters is the amount of address comparator found on an implementation and the mutual exclusion between range and start stop filters. As such the following example would _not_ work: - perf record -e cs_etm/@20070000.etr/k --filter 'start 0xffffff800856bc50,stop 0xffffff800856bcb0, \ // start/stop + perf record -e cs_etm/@tmc_etr0/k --filter 'start 0xffffff800856bc50,stop 0xffffff800856bcb0, \ // start/stop filter 0x72c/0x40@/opt/lib/libcstest.so.1.0' \ // address range - --per-thread uname + --per-thread uname Additional Trace Options ------------------------ @@ -198,10 +200,32 @@ Presently this threshold is fixed at 256 cycles for `p Command line options in `perf record` to use these features are part of the options for the `cs_etm` event: - perf record -e cs_etm/timestamp,cycacc,@20070000.etr/ --per-thread uname + perf record -e cs_etm/timestamp,cycacc,@tmc_etr0/ --per-thread uname At current version, `perf record` and `perf script` do not use this additional information. +The cs_etm perf event +--------------------- + +System information for this perf pmu event can be found at: + + /sys/devices/cs_etm + +This contains internal format of the parameters described above: + + root@linaro-developer:~# ls /sys/devices/cs_etm/format + contextid cycacc retstack sinkid timestamp + +and names of registered sinks: + + root@linaro-developer:~# ls /sys/devices/cs_etm/sinks + tmc_etf0 tmc_etr0 tpiu0 + +Note: The `sinkid` parameter is there to document the usage of a 32-bit internal parameter to +pass the sink name used in the cs_etm/@sink/ command to the kernel drivers. It can be used +directly as cs_etm/sinkid=/ but this is not recommended as the values used are +considered opaque and subject to changes. + On Target Trace Collection -------------------------- The entire program flow will have been recorded in the `perf.data` file. @@ -248,7 +272,7 @@ The openCSD library is not part of the perf tools. It [github][1] and needs to be compiled before the perf tools. Checkout the required branch/tag version into a local directory. - linaro@t430:~/linaro/coresight$ git clone -b v0.8 https://github.com/Linaro/OpenCSD.git my-opencsd + linaro@t430:~/linaro/coresight$ git clone https://github.com/Linaro/OpenCSD.git my-opencsd Cloning into 'OpenCSD'... remote: Counting objects: 2063, done. remote: Total 2063 (delta 0), reused 0 (delta 0), pack-reused 2063 @@ -301,7 +325,8 @@ distribution without having to be compiled. Off Target Perf Tools Compilation --------------------------------- -As mentionned above the openCSD library is not part of the perf tools' code base + +As mentioned above the openCSD library is not part of the perf tools' code base and needs to be installed on a system prior to compilation. Information about the status of the openCSD library on a system is given at compile time by the perf tools build script: @@ -366,8 +391,8 @@ output as follows:- Set to any other value will remove the RAW_PACKED lines. -Working with a debug version of the openCSD library ---------------------------------------------------- +Working with an alternate version of the openCSD library +-------------------------------------------------------- When compiling the perf tools it is possible to reference another version of the openCSD library than the one installed on the system. This is useful when working with multiple development trees or having the desire to keep system @@ -407,10 +432,14 @@ where the perf tools and openCSD library have been com -rw------- 1 linaro linaro 78016 Feb 24 12:21 perf.data -rw-rw-r-- 1 linaro linaro 1245881 Feb 24 12:25 uname.v4.user.sept20.tgz -Perf is expecting files related to the trace capture (`perf.data`) to be located -under `~/.debug` [3]. This example will remove the current `~/.debug` directory -to be sure everything is clean. +Perf is expecting files related to the trace capture (`perf.data`) to be located in the `buildid` directory. +By default this is under `~/.debug`. Alternatively the default `buildid` directory can be changed +using the command: + perf config --system buildid.dir=/my/own/buildid/dir + +This example will remove the current `~/.debug` directory to be sure everything is clean. + linaro@t430:~/linaro/coresight/sept20$ rm -rf ~/.debug linaro@t430:~/linaro/coresight/sept20$ cp -dpR .debug ~/ linaro@t430:~/linaro/coresight/sept20$ ../perf-opencsd-master/tools/perf/perf report --stdio @@ -586,12 +615,18 @@ Use as follows:- 1. Prior to building perf, edit `perf-setup-env.bash` to conform to your environment. There are four lines at the top of the file that will require editing. -2. Execute the script using the command +2. Execute the script using the command: source perf-setup-env.bash - This will set up all the environment variables mentioned in the sections on building and running - perf above, and these are used by the `perf-test...` scripts to run the tests. + This will set up a perf execute environment for using the perf report and script commands. + + Alternatively use the command: + + source perf-setup-env.base buildenv + + This will add in the build environment variables mentioned in the sections on building above alongside the + environment for using the used by the `perf-test...` scripts to run the tests. 3. Build perf as described above. 4. Follow the instructions for downloading the test capture, or create a capture from your target. @@ -629,8 +664,6 @@ Best regards, *The Linaro CoreSight Team* -------------------------------------- -[1]: https://github.com/Linaro/perf-opencsd "perf-opencsd Github" +[1]: https://github.com/Linaro/OpenCSD [2]: http://people.linaro.org/~mathieu.poirier/openCSD/uname.v4.user.sept20.tgz - -[3]: Get in touch with us if you know a way to change this. Modified: vendor/opencsd/dist/README.md ============================================================================== --- vendor/opencsd/dist/README.md Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/README.md Mon Jun 15 11:30:04 2020 (r362193) @@ -27,11 +27,11 @@ Releases will appear on the master branch in the git r CoreSight Trace Component Support. ---------------------------------- -_Current Version 0.12.0_ +_Current Version 0.14.2_ ### Current support: -- ETMv4 (v4.4) instruction trace - packet processing and packet decode. +- ETMv4 (v4.5 [A/R profile] v4.4 [M profile]) instruction trace - packet processing and packet decode. - PTM (v1.1) instruction trace - packet processing and packet decode. - ETMv3 (v3.5) instruction trace - packet processing and packet decode. - ETMv3 (v3.5) data trace - packet processing. @@ -55,13 +55,12 @@ Note on the Git Repository. This git repository for OpenCSD contains only source for the OpenCSD decoder library. From version 0.4, releases appear as versioned tags on the master branch. -From version 0.7.4, the required updates to CoreSight drivers and perf, that are not -currently upstream in the linux kernel tree, are now contained in a separate -repository to be found at: +CoreSight kernel drivers and perf suport for CoreSight trace is maintained in the latest +upstream kernel versions. -https://github.com/Linaro/perf-opencsd +One exception is a minor patch required for autoFDO support. +See [autofdo.md](@ref AutoFDO). - Documentation ------------- @@ -142,29 +141,75 @@ Version and Modification Information AutoFDO: update documentation for AutoFDO usage and add in "record.sh" script - _Version 0.9.3_: Bugfix: Test snapshot library not handling 'offset' parameters in dump file sections. Install: ocsd_if_version.h moved to opencsd/include to allow installation on OS & use in compiling client apps. -- _Version 0.10.0_: __Updates__: Add additional information about the last instruction to the generic output packet. - __Docs__: update docs for updated output packet. - __Bugfix__: typecast removed from OCSD_VER_NUM in ocsd_if_version.h to allow use in C pre-processor. - __Bugfix__: ETMV4: Interworking ISA change between A32-T32 occasionally missed during instruction decode. -- _Version 0.10.1_: __Updates__: Build update - allow multi-thread make (make -j). - __Docs__: Minor update to AutoFDO documentation. -- _Version 0.11.0_: __Update__: ETM v4 decoder updated to support ETM version up to v4.4 - __Update__: Memory access callback function - added new callback signature to provide TraceID to client when requesting memory. - __Update__: Created new example program to demonstrate using memory buffer in APIs. - __Bugfix__: Typos in docs and source. - __Bugfix__: Memory accessor - validate callback return values. -- _Version 0.11.1_: __Update__: build:- change -fpic to -fPIC to allow Debian build on sparc. - __Bugfix__: build:- remove unused variable -- _Version 0.11.2_: __Update__: docs:- HOWTO.md update to match new perf build requirements. - __Bugfix__: Minor spelling typos fixed. -- _Version 0.12.0_: __Update__: Frame deformatter - TPIU FSYNC and HSYNC support added. - __Update__: ETM v4: Bugfix & clarification on Exception trace handling. Where exception occurs at a branch target before any instructions - have been executed, the preferred return address is also the target address of the branch instruction. This case now includes as specific flag in - the packet. Additionally any context change associated with this target address was being applied incorrectly. - __Update__: Core / Architecture mapping to core names as used by test programs / snapshots updated to include additional recent ARM cores. - __Update__: Docs: Update to reflect new exception flag. Update test program example to reflect latest output. - __Bugfix__: ETM v4: Valid trace info packet was not handled correctly (0x01, 0x00). - __Bugfix__: ETM v4: Error messaging on commit stack overflow. +- _Version 0.10.0_: + - __Updates__: Add additional information about the last instruction to the generic output packet. + - __Docs__: update docs for updated output packet. + - __Bugfix__: typecast removed from OCSD_VER_NUM in ocsd_if_version.h to allow use in C pre-processor. + - __Bugfix__: ETMV4: Interworking ISA change between A32-T32 occasionally missed during instruction decode. + +- _Version 0.10.1_: + - __Updates__: Build update - allow multi-thread make (make -j). + - __Docs__: Minor update to AutoFDO documentation. + +- _Version 0.11.0_: + - __Update__: ETM v4 decoder updated to support ETM version up to v4.4 + - __Update__: Memory access callback function - added new callback signature to provide TraceID to client when requesting memory. + - __Update__: Created new example program to demonstrate using memory buffer in APIs. + - __Bugfix__: Typos in docs and source. + - __Bugfix__: Memory accessor - validate callback return values. + +- _Version 0.11.1_: + - __Update__: build:- change -fpic to -fPIC to allow Debian build on sparc. + - __Bugfix__: build:- remove unused variable + +- _Version 0.11.2_: + - __Update__: docs:- HOWTO.md update to match new perf build requirements. + - __Bugfix__: Minor spelling typos fixed. + +- _Version 0.12.0_: + - __Update__: Frame deformatter - TPIU FSYNC and HSYNC support added. + - __Update__: ETM v4: Bugfix & clarification on Exception trace handling. Where exception occurs at a branch target before any instructions + have been executed, the preferred return address is also the target address of the branch instruction. This case now includes as specific flag in + the packet. Additionally any context change associated with this target address was being applied incorrectly. + - _Update__: Core / Architecture mapping to core names as used by test programs / snapshots updated to include additional recent ARM cores. + - __Update__: Docs: Update to reflect new exception flag. Update test program example to reflect latest output. + - __Bugfix__: ETM v4: Valid trace info packet was not handled correctly (0x01, 0x00). + - __Bugfix__: ETM v4: Error messaging on commit stack overflow. + +- _Version 0.12.1_: + - __Update__: build: remove -g option from release build. + - __Update__: tests: Snapshots can now use generic arch+profile names rather than core names, e.g. ARMv8-A + - __Bugfix__: Instruction decode - v8.3 B[L]A{A|B}[Z] instructions mis-identified. + -__Bugfix__: Transition from A64 to A32 can be mis-decoded if the trace implementation represents the transition + as an individual address packet followed by a context packet. + +- _Version 0.12.2_: + - __Bugfix__: Clean up memory leaks. + - __Bugfix__: ETMv4: Ensure addressing history zeroed after TINFO. + - __Update__: Allow GCC version to be included in build output path. + - __Bugfix__: Packet printing update when WFI/WFE is P0 element. + +- _Version 0.13.x_ : Intermediate development version. + +- _Version 0.14.0_: + - __Update__: ETMv4 - decoder update & simplification to handle advanced trace features. + - __Update__: ETMv4 - decoder support for speculative trace. + - __Update__: Generic Elements: Additional information in EOT, UNSYNC, ON packets to give reason. + - __Update__: Memaccess: Add EL2 secure memory space flag. + - __Update__: Documentation: Updated for release changes and to reflect latest kernel version support for CoreSight. + - __Update__: Perf helper scripts updated to reflect latest build flow. + - __Bugfix__: Fix for component operational flag inputs. + +- _Version 0.14.1_: + - __Update__: ETMv4 - Add support for Q elements. + - __Bugfix__: build: fix logic issue for && operator. (github issue #23, sumitted by yabinc) + +- _Version 0.14.2_: + - __Update__: Architecture versioning. Set enum tag values to make conversion to numeric version easier. + - __Update__: I-decode: remove global temporary decode state data and replace with local instance data + to make library more easily usable in multi-threaded programs. + - __Bugfix__: I-decode: Some Thumb instructions not correctly reported as implied returns. + (github issue #24, submitted by kongy). Licence Information Modified: vendor/opencsd/dist/decoder/build/linux/makefile ============================================================================== --- vendor/opencsd/dist/decoder/build/linux/makefile Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/build/linux/makefile Mon Jun 15 11:30:04 2020 (r362193) @@ -70,8 +70,8 @@ INSTALL_BIN_DIR=$(PREFIX)/bin export INSTALL_INCLUDE_DIR=$(PREFIX)/include/ # compile flags -CFLAGS += $(CPPFLAGS) -c -Wall -DLINUX -Wno-switch -fPIC -CXXFLAGS += $(CPPFLAGS) -c -Wall -DLINUX -Wno-switch -fPIC -std=c++11 +CFLAGS += $(CPPFLAGS) -c -Wall -DLINUX -Wno-switch -Wlogical-op -fPIC +CXXFLAGS += $(CPPFLAGS) -c -Wall -DLINUX -Wno-switch -Wlogical-op -fPIC -std=c++11 LDFLAGS += -Wl,-z,defs ARFLAGS ?= rcs @@ -81,8 +81,8 @@ CFLAGS += -g -O0 -DDEBUG CXXFLAGS += -g -O0 -DDEBUG BUILD_VARIANT=dbg else -CFLAGS += -g -O2 -DNDEBUG -CXXFLAGS += -g -O2 -DNDEBUG +CFLAGS += -O2 -DNDEBUG +CXXFLAGS += -O2 -DNDEBUG BUILD_VARIANT=rel endif Modified: vendor/opencsd/dist/decoder/build/linux/makefile.dev ============================================================================== --- vendor/opencsd/dist/decoder/build/linux/makefile.dev Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/build/linux/makefile.dev Mon Jun 15 11:30:04 2020 (r362193) @@ -56,7 +56,12 @@ CXXFLAGS += $(MFLAG) CFLAGS += $(MFLAG) LDFLAGS += $(MFLAG) +ifdef GCCDIR +GCCVER:= $(shell $(CROSS_COMPILE)gcc -dumpversion | cut -c 1-3) +PLAT_DIR=builddir/linux$(BIT_VARIANT)/GCC_$(GCCVER) +else PLAT_DIR=linux$(BIT_VARIANT)/$(BUILD_VARIANT) +endif # include the main makefile include makefile Modified: vendor/opencsd/dist/decoder/build/linux/ref_trace_decode_lib/makefile ============================================================================== --- vendor/opencsd/dist/decoder/build/linux/ref_trace_decode_lib/makefile Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/build/linux/ref_trace_decode_lib/makefile Mon Jun 15 11:30:04 2020 (r362193) @@ -59,11 +59,9 @@ ETMV3OBJ= $(BUILD_DIR)/trc_cmp_cfg_etmv3.o \ $(BUILD_DIR)/trc_pkt_proc_etmv3_impl.o ETMV4OBJ= $(BUILD_DIR)/trc_cmp_cfg_etmv4.o \ - $(BUILD_DIR)/trc_pkt_proc_etmv4.o \ - $(BUILD_DIR)/trc_pkt_proc_etmv4i_impl.o \ + $(BUILD_DIR)/trc_pkt_proc_etmv4i.o \ $(BUILD_DIR)/trc_pkt_decode_etmv4i.o \ $(BUILD_DIR)/trc_pkt_elem_etmv4i.o \ - $(BUILD_DIR)/trc_pkt_elem_etmv4d.o \ $(BUILD_DIR)/trc_etmv4_stack_elem.o PTMOBJ= $(BUILD_DIR)/trc_cmp_cfg_ptm.o \ @@ -94,6 +92,7 @@ OBJECTS=$(BUILD_DIR)/ocsd_code_follower.o \ $(BUILD_DIR)/ocsd_error.o \ $(BUILD_DIR)/ocsd_error_logger.o \ $(BUILD_DIR)/ocsd_gen_elem_list.o \ + $(BUILD_DIR)/ocsd_gen_elem_stack.o \ $(BUILD_DIR)/ocsd_lib_dcd_register.o \ $(BUILD_DIR)/ocsd_msg_logger.o \ $(BUILD_DIR)/ocsd_version.o \ Modified: vendor/opencsd/dist/decoder/build/win-vs2015/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj ============================================================================== --- vendor/opencsd/dist/decoder/build/win-vs2015/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/build/win-vs2015/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj Mon Jun 15 11:30:04 2020 (r362193) @@ -323,6 +323,7 @@ + @@ -400,8 +401,6 @@ - - @@ -413,10 +412,8 @@ - - - + @@ -430,6 +427,7 @@ + Modified: vendor/opencsd/dist/decoder/build/win-vs2015/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj.filters ============================================================================== --- vendor/opencsd/dist/decoder/build/win-vs2015/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj.filters Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/build/win-vs2015/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj.filters Mon Jun 15 11:30:04 2020 (r362193) @@ -221,12 +221,6 @@ Header Files\ptm - - Source Files\etmv4 - - - Source Files\etmv4 - Source Files\etmv3 @@ -359,6 +353,9 @@ Header Files + + Header Files\common + @@ -385,18 +382,9 @@ Source Files\ptm - - Source Files\etmv4 - Source Files\etmv4 - - Source Files\etmv4 - - - Source Files\etmv4 - Source Files\etmv4 @@ -489,6 +477,12 @@ Source Files\mem_acc + + + Source Files\etmv4 + + + Source Files \ No newline at end of file Modified: vendor/opencsd/dist/decoder/docs/doxygen_config.dox ============================================================================== --- vendor/opencsd/dist/decoder/docs/doxygen_config.dox Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/docs/doxygen_config.dox Mon Jun 15 11:30:04 2020 (r362193) @@ -38,7 +38,7 @@ PROJECT_NAME = "OpenCSD - CoreSight Trace De # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.10.0 +PROJECT_NUMBER = 0.14.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a Modified: vendor/opencsd/dist/decoder/docs/prog_guide/prog_guide_generic_pkts.md ============================================================================== --- vendor/opencsd/dist/decoder/docs/prog_guide/prog_guide_generic_pkts.md Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/docs/prog_guide/prog_guide_generic_pkts.md Mon Jun 15 11:30:04 2020 (r362193) @@ -83,7 +83,7 @@ typedef struct _ocsd_generic_trace_elem { trace_on_reason_t trace_on_reason; /* reason for the trace on packet */ ocsd_swt_info_t sw_trace_info; /* software trace packet info */ uint32_t num_instr_range; /* number of instructions covered by range packet (for T32 this cannot be calculated from en-st/i_size) */ - + unsync_info_t unsync_eot_info; /* additional information for unsync / end-of-trace packets. */ }; const void *ptr_extended_data; /* pointer to extended data buffer (data trace, sw trace payload) / custom structure */ @@ -140,6 +140,19 @@ instruction by subtraction from `en_addr`. This value __ETMv3, PTM__ : These protocols can output a cycle count directly as part of the trace packet that generates the trace range. In this case `has_cc` will be 1 and `cycle_count` will be valid. + + +### OCSD_GEN_TRC_ELEM_I_RANGE_NOPATH ### +__packet fields valid__: `isa, st_addr, en_addr, num_instr_range` + +`num_instr_range` represents the number of instructions executed in this range, but there is incomplete information +as to program execution path from start to end of range. +If `num_instr` is 0, then an unknown number of instructions were executed between the start and end of the range. +`st_addr` represents the start of execution represented by this packet. +`en_addr` represents the address where execution will continue from after the instructions represented by this packet. +`isa` represents the ISA for the instruction at `en_addr`. + +Used when ETMv4 Q elements are being traced. ### OCSD_GEN_TRC_ELEM_ADDR_NACC ### Modified: vendor/opencsd/dist/decoder/docs/test_progs.md ============================================================================== --- vendor/opencsd/dist/decoder/docs/test_progs.md Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/docs/test_progs.md Mon Jun 15 11:30:04 2020 (r362193) @@ -20,6 +20,9 @@ See [external_custom.md](@ref custom_decoders) for det These programs are both built at the same time as the library for the same set of platforms. See [build_libs.md](@ref build_lib) for build details. +_Note:_ The programs above use the library's [core name mapper helper class] (@ref CoreArchProfileMap) to map +the name of the core into a profile / architecture pair that the library can use. +The snapshot definition must use one of the names recognised by this class or an error will occur. Trace "Snapshot" directory. ---------------------------- Modified: vendor/opencsd/dist/decoder/include/common/ocsd_dcd_mngr.h ============================================================================== --- vendor/opencsd/dist/decoder/include/common/ocsd_dcd_mngr.h Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/include/common/ocsd_dcd_mngr.h Mon Jun 15 11:30:04 2020 (r362193) @@ -115,6 +115,9 @@ ocsd_err_t DecoderMngrBase::createDecoder(co if(!pkt_proc) return OCSD_ERR_MEM; + // set the op mode flags + pkt_proc->setComponentOpMode(create_flags & (OCSD_OPFLG_COMP_MODE_MASK | OCSD_OPFLG_PKTPROC_COMMON)); + // set the configuration TrcPktProcBase *pProcBase = dynamic_cast< TrcPktProcBase *>(pkt_proc); if(pProcBase == 0) @@ -132,6 +135,9 @@ ocsd_err_t DecoderMngrBase::createDecoder(co pkt_dcd = createPktDecode(bUseInstID, instID); if(!pkt_dcd) return OCSD_ERR_MEM; + + // set the op mode flags + pkt_dcd->setComponentOpMode(create_flags & (OCSD_OPFLG_COMP_MODE_MASK | OCSD_OPFLG_PKTDEC_COMMON)); // get the decoder base TrcPktDecodeBase *pBase = dynamic_cast< TrcPktDecodeBase *>(pkt_dcd); Modified: vendor/opencsd/dist/decoder/include/common/ocsd_gen_elem_list.h ============================================================================== --- vendor/opencsd/dist/decoder/include/common/ocsd_gen_elem_list.h Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/include/common/ocsd_gen_elem_list.h Mon Jun 15 11:30:04 2020 (r362193) @@ -1,6 +1,6 @@ /* - * \file ocsd_gen_elem_stack.h - * \brief OpenCSD : Generic element output stack. + * \file ocsd_gen_elem_list.h + * \brief OpenCSD : Generic element output list. * * \copyright Copyright (c) 2016, ARM Limited. All Rights Reserved. */ @@ -47,7 +47,7 @@ * This should remove some of the requirement on the packet processing to be re-enterant, * simplifying this code. * - * Last element(s) on this stack can be marked pending to allow for later cancellation. + * Last element(s) on this list can be marked pending to allow for later cancellation. * (This required for cancel element in ETMv3 exeception branch). * * The "list" is actually a ring buffer - maintaining pointers to indicate current valid elements. @@ -150,4 +150,4 @@ inline void OcsdGenElemList::initSendIf(componentAttac m_sendIf = pGenElemIf; } -/* End of File ocsd_gen_elem_stack.h */ +/* End of File ocsd_gen_elem_list.h */ Added: vendor/opencsd/dist/decoder/include/common/ocsd_gen_elem_stack.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/opencsd/dist/decoder/include/common/ocsd_gen_elem_stack.h Mon Jun 15 11:30:04 2020 (r362193) @@ -0,0 +1,109 @@ +/* +* \file ocsd_gen_elem_stack.h +* \brief OpenCSD : Generic element output stack. +* +* \copyright Copyright (c) 2020, ARM Limited. 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. +* +* 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. Neither the name of the copyright holder 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. +*/ + +#include "trc_gen_elem.h" +#include "comp_attach_pt_t.h" +#include "interfaces/trc_gen_elem_in_i.h" + +/* element stack to handle cases where a trace element can generate multiple output packets + + maintains the "current" element, which might be sent independently of this stack, and also + ensures that persistent data in the output elements is maintained between elements. +*/ +class OcsdGenElemStack +{ +public: + OcsdGenElemStack(); + ~OcsdGenElemStack(); + + void initSendIf(componentAttachPt *pGenElemIf); + void initCSID(const uint8_t CSID) { m_CSID = CSID; }; + + OcsdTraceElement &getCurrElem(); //!< get the current element. + ocsd_err_t resetElemStack(); //!< set pointers to base of stack + ocsd_err_t addElem(const ocsd_trc_index_t trc_pkt_idx); //!< add elem to stack and set current. + void setCurrElemIdx(const ocsd_trc_index_t trc_pkt_idx); //!< packet index for this element + ocsd_err_t addElemType(const ocsd_trc_index_t trc_pkt_idx, ocsd_gen_trc_elem_t elem_type); + + ocsd_datapath_resp_t sendElements(); //!< send elements on the stack + const int numElemToSend() const; + +private: + typedef struct _elemPtr { + OcsdTraceElement *pElem; //!< pointer to the listed trace element + ocsd_trc_index_t trc_pkt_idx; //!< packet index in the trace stream + } elemPtr_t; + + const bool isInit(); //!< check correctly initialised. + + ocsd_err_t growArray(); + void copyPersistentData(int src, int dst); //!< copy across persistent state data between elements + void resetIndexes(); //!< clear down all indexes - reset or send complete. + + elemPtr_t *m_pElemArray; //!< an array of pointers to elements. + int m_elemArraySize; //!< number of element pointers in the array + + int m_elem_to_send; //!< number of live elements in the stack - init to 1. + int m_curr_elem_idx; //!< index into the element array. + int m_send_elem_idx; //!< next element to send. + + //!< send packet info + uint8_t m_CSID; + componentAttachPt *m_sendIf; //!< element send interface. + + bool m_is_init; +}; + +inline const int OcsdGenElemStack::numElemToSend() const +{ + return m_elem_to_send; +} + +inline void OcsdGenElemStack::initSendIf(componentAttachPt *pGenElemIf) +{ + m_sendIf = pGenElemIf; +} + +inline void OcsdGenElemStack::setCurrElemIdx(const ocsd_trc_index_t trc_pkt_idx) +{ + m_pElemArray[m_curr_elem_idx].trc_pkt_idx = trc_pkt_idx; +} + +inline OcsdTraceElement &OcsdGenElemStack::getCurrElem() +{ + return *(m_pElemArray[m_curr_elem_idx].pElem); +} + + +/* End of File ocsd_gen_elem_stack.h */ Modified: vendor/opencsd/dist/decoder/include/common/trc_core_arch_map.h ============================================================================== --- vendor/opencsd/dist/decoder/include/common/trc_core_arch_map.h Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/include/common/trc_core_arch_map.h Mon Jun 15 11:30:04 2020 (r362193) @@ -39,6 +39,23 @@ #include #include "opencsd/ocsd_if_types.h" +/** @class CoreArchProfileMap + * + * @brief Map core / arch name to profile for decoder. + * + * Helper class for library clients to map core or architecture version names onto + * a profile / arch version pair suitable for use with the decode library. + * + * Valid core names are:- + * - Cortex-Axx : where xx = 5,7,12,15,17,32,35,53,55,57,65,72,73,75,76,77; + * - Cortex-Rxx : where xx = 5,7,8,52; + * - Cortex-Mxx : where xx = 0,0+,3,4,23,33; + * + * Valid architecture profile names are:- + * - ARMv7-A, ARMv7-R, ARMv7-M; + * - ARMv8-A, ARMv8.3A, ARMv8-R, ARMv8-M; + * + */ class CoreArchProfileMap { public: @@ -50,16 +67,31 @@ class CoreArchProfileMap (public) private: std::map core_profiles; + std::map arch_profiles; }; inline ocsd_arch_profile_t CoreArchProfileMap::getArchProfile(const std::string &coreName) { ocsd_arch_profile_t ap = { ARCH_UNKNOWN, profile_Unknown }; + bool bFound = false; std::map::const_iterator it; + + /* match against the core name map. */ it = core_profiles.find(coreName); - if(it != core_profiles.end()) + if (it != core_profiles.end()) + { ap = it->second; + bFound = true; + } + + /* scan architecture profiles on no core name match */ + if (!bFound) + { + it = arch_profiles.find(coreName); + if (it != arch_profiles.end()) + ap = it->second; + } return ap; } Modified: vendor/opencsd/dist/decoder/include/common/trc_gen_elem.h ============================================================================== --- vendor/opencsd/dist/decoder/include/common/trc_gen_elem.h Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/include/common/trc_gen_elem.h Mon Jun 15 11:30:04 2020 (r362193) @@ -72,6 +72,7 @@ class OcsdTraceElement : public trcPrintableElem, publ void setTraceOnReason(const trace_on_reason_t reason); + void setUnSyncEOTReason(const unsync_info_t reason); void setAddrRange(const ocsd_vaddr_t st_addr, const ocsd_vaddr_t en_addr, const int num_instr = 1); void setLastInstrInfo(const bool exec, const ocsd_instr_type last_i_type, const ocsd_instr_subtype last_i_subtype, const uint8_t size); @@ -94,7 +95,8 @@ class OcsdTraceElement : public trcPrintableElem, publ // return current context const ocsd_pe_context &getContext() const { return context; }; - + void copyPersistentData(const OcsdTraceElement &src); + private: void printSWInfoPkt(std::ostringstream &oss) const; void clearPerPktData(); //!< clear flags that indicate validity / have values on a per packet basis @@ -171,8 +173,8 @@ inline void OcsdTraceElement::init() inline void OcsdTraceElement::clearPerPktData() { - flag_bits = 0; // union with trace_on_reason / trace_event - + flag_bits = 0; // bit-field with various flags. + exception_number = 0; // union with trace_on_reason / trace_event ptr_extended_data = 0; // extended data pointer } @@ -181,6 +183,11 @@ inline void OcsdTraceElement::setTraceOnReason(const t trace_on_reason = reason; } +inline void OcsdTraceElement::setUnSyncEOTReason(const unsync_info_t reason) +{ + unsync_eot_info = reason; +} + inline void OcsdTraceElement::setISA(const ocsd_isa isa_update) { isa = isa_update; @@ -201,6 +208,12 @@ inline void OcsdTraceElement::setExtendedDataPtr(const ptr_extended_data = data_ptr; } +// set persistent data between output packets. +inline void OcsdTraceElement::copyPersistentData(const OcsdTraceElement &src) +{ + isa = src.isa; + context = src.context; +} /** @}*/ Modified: vendor/opencsd/dist/decoder/include/common/trc_pkt_decode_base.h ============================================================================== --- vendor/opencsd/dist/decoder/include/common/trc_pkt_decode_base.h Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/include/common/trc_pkt_decode_base.h Mon Jun 15 11:30:04 2020 (r362193) @@ -85,7 +85,10 @@ class TrcPktDecodeI : public TraceComponent (protected virtual ocsd_err_t onProtocolConfig() = 0; virtual const uint8_t getCoreSightTraceID() = 0; + /* init handling */ const bool checkInit(); + /* Called on first init confirmation */ + virtual void onFirstInitOK() {}; /* data output */ ocsd_datapath_resp_t outputTraceElement(const OcsdTraceElement &elem); // use current index @@ -147,6 +150,8 @@ inline const bool TrcPktDecodeI::checkInit() init_err_msg = "No instruction decoder interface attached and enabled"; else m_decode_init_ok = true; + if (m_decode_init_ok) + onFirstInitOK(); } return m_decode_init_ok; } Added: vendor/opencsd/dist/decoder/include/common/trc_raw_buffer.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/opencsd/dist/decoder/include/common/trc_raw_buffer.h Mon Jun 15 11:30:04 2020 (r362193) @@ -0,0 +1,96 @@ +/* +* \file trc_raw_buffer.h +* \brief OpenCSD : Trace raw data byte buffer +* +* \copyright Copyright (c) 2019, ARM Limited. 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. +* +* 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. Neither the name of the copyright holder 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. +*/ + +#ifndef ARM_TRC_RAW_BUFFER_H_INCLUDED +#define ARM_TRC_RAW_BUFFER_H_INCLUDED + +#include + +class TraceRawBuffer +{ +public: + TraceRawBuffer() : + m_bufSize(0), + m_bufProcessed(0), + m_pBuffer(0), + pkt(0) + {}; + ~TraceRawBuffer() {}; + + // init the buffer + void init(const uint32_t size, const uint8_t *rawtrace, std::vector *out_packet); + void copyByteToPkt(); // move a byte to the packet buffer + uint8_t peekNextByte(); // value of next byte in buffer. + + bool empty() { return m_bufProcessed == m_bufSize; }; + // bytes processed. + uint32_t processed() { return m_bufProcessed; }; + // buffer size; + uint32_t size() { return m_bufSize; } + +private: + uint32_t m_bufSize; + uint32_t m_bufProcessed; + const uint8_t *m_pBuffer; + std::vector *pkt; + +}; + +// init the buffer +inline void TraceRawBuffer::init(const uint32_t size, const uint8_t *rawtrace, std::vector *out_packet) +{ + m_bufSize = size; + m_bufProcessed = 0; + m_pBuffer = rawtrace; + pkt = out_packet; +} + +inline void TraceRawBuffer::copyByteToPkt() +{ + if (!empty()) { + pkt->push_back(m_pBuffer[m_bufProcessed]); + m_bufProcessed++; + } +} + +inline uint8_t TraceRawBuffer::peekNextByte() +{ + uint8_t val = 0; + if (!empty()) + val = m_pBuffer[m_bufProcessed]; + return val; +} + +#endif // ARM_TRC_RAW_BUFFER_H_INCLUDED + Modified: vendor/opencsd/dist/decoder/include/i_dec/trc_i_decode.h ============================================================================== --- vendor/opencsd/dist/decoder/include/i_dec/trc_i_decode.h Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/include/i_dec/trc_i_decode.h Mon Jun 15 11:30:04 2020 (r362193) @@ -46,10 +46,9 @@ class TrcIDecode : public IInstrDecode (public) virtual ocsd_err_t DecodeInstruction(ocsd_instr_info *instr_info); private: - ocsd_err_t DecodeA32(ocsd_instr_info *instr_info); - ocsd_err_t DecodeA64(ocsd_instr_info *instr_info); - ocsd_err_t DecodeT32(ocsd_instr_info *instr_info); - void SetArchVersion(ocsd_instr_info *instr_info); + ocsd_err_t DecodeA32(ocsd_instr_info *instr_info, struct decode_info *info); + ocsd_err_t DecodeA64(ocsd_instr_info *instr_info, struct decode_info *info); + ocsd_err_t DecodeT32(ocsd_instr_info *instr_info, struct decode_info *info); }; #endif // ARM_TRC_I_DECODE_H_INCLUDED Modified: vendor/opencsd/dist/decoder/include/i_dec/trc_idec_arminst.h ============================================================================== --- vendor/opencsd/dist/decoder/include/i_dec/trc_idec_arminst.h Mon Jun 15 11:29:31 2020 (r362192) +++ vendor/opencsd/dist/decoder/include/i_dec/trc_idec_arminst.h Mon Jun 15 11:30:04 2020 (r362193) @@ -42,6 +42,12 @@ #include "opencsd/ocsd_if_types.h" #include +/* supplementary decode information */ +struct decode_info { + uint16_t arch_version; + ocsd_instr_subtype instr_sub_type; +}; + /* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jun 15 11:31:26 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 351FC3305F6; Mon, 15 Jun 2020 11:31:26 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lq0Z0klQz4SfL; Mon, 15 Jun 2020 11:31:26 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE9AE1CEAB; Mon, 15 Jun 2020 11:31:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05FBVPgx083872; Mon, 15 Jun 2020 11:31:25 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05FBVPrU083871; Mon, 15 Jun 2020 11:31:25 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202006151131.05FBVPrU083871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 15 Jun 2020 11:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362194 - vendor/opencsd/v0.14.2 X-SVN-Group: vendor X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: vendor/opencsd/v0.14.2 X-SVN-Commit-Revision: 362194 X-SVN-Commit-Repository: base 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.33 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: Mon, 15 Jun 2020 11:31:26 -0000 Author: andrew Date: Mon Jun 15 11:31:25 2020 New Revision: 362194 URL: https://svnweb.freebsd.org/changeset/base/362194 Log: Tag OpenCSD v0.14.2 Added: vendor/opencsd/v0.14.2/ - copied from r362193, vendor/opencsd/dist/ From owner-svn-src-vendor@freebsd.org Mon Jun 15 13:17:23 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF92D333D0F; Mon, 15 Jun 2020 13:17:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lsLq4zwCz4ZDH; Mon, 15 Jun 2020 13:17:23 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A63BE1E39C; Mon, 15 Jun 2020 13:17:23 +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 05FDHNFl048678; Mon, 15 Jun 2020 13:17:23 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05FDHMrG048673; Mon, 15 Jun 2020 13:17:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202006151317.05FDHMrG048673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 Jun 2020 13:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362196 - in vendor: NetBSD/blacklist blocklist blocklist/dist/bin blocklist/dist/etc blocklist/dist/etc/rc.d blocklist/dist/include blocklist/dist/lib blocklist/dist/libexec X-SVN-Group: vendor X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in vendor: NetBSD/blacklist blocklist blocklist/dist/bin blocklist/dist/etc blocklist/dist/etc/rc.d blocklist/dist/include blocklist/dist/lib blocklist/dist/libexec X-SVN-Commit-Revision: 362196 X-SVN-Commit-Repository: base 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.33 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: Mon, 15 Jun 2020 13:17:23 -0000 Author: emaste Date: Mon Jun 15 13:17:22 2020 New Revision: 362196 URL: https://svnweb.freebsd.org/changeset/base/362196 Log: Following upstream, rename blacklist to blocklist Also move up one level from vendor/NetBSD/blacklist to vendor/blocklist, as this is now has a standalone home at https://github.com/zoulasc/blocklist I also renamed the individual files under dist/ so that the subsequent update from upstream will drop in. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Added: vendor/blocklist/ - copied from r362195, vendor/NetBSD/blacklist/ vendor/blocklist/dist/bin/blocklistctl.8 - copied unchanged from r362194, vendor/NetBSD/blacklist/dist/bin/blacklistctl.8 vendor/blocklist/dist/bin/blocklistctl.c - copied unchanged from r362194, vendor/NetBSD/blacklist/dist/bin/blacklistctl.c vendor/blocklist/dist/bin/blocklistd.8 - copied unchanged from r362194, vendor/NetBSD/blacklist/dist/bin/blacklistd.8 vendor/blocklist/dist/bin/blocklistd.c - copied unchanged from r362194, vendor/NetBSD/blacklist/dist/bin/blacklistd.c vendor/blocklist/dist/bin/blocklistd.conf.5 - copied unchanged from r362194, vendor/NetBSD/blacklist/dist/bin/blacklistd.conf.5 vendor/blocklist/dist/etc/blocklistd.conf - copied unchanged from r362194, vendor/NetBSD/blacklist/dist/etc/blacklistd.conf vendor/blocklist/dist/etc/rc.d/blocklistd - copied unchanged from r362194, vendor/NetBSD/blacklist/dist/etc/rc.d/blacklistd vendor/blocklist/dist/include/blocklist.h - copied unchanged from r362194, vendor/NetBSD/blacklist/dist/include/blacklist.h vendor/blocklist/dist/lib/blocklist.c - copied unchanged from r362194, vendor/NetBSD/blacklist/dist/lib/blacklist.c vendor/blocklist/dist/lib/libblocklist.3 - copied unchanged from r362194, vendor/NetBSD/blacklist/dist/lib/libblacklist.3 vendor/blocklist/dist/libexec/blocklistd-helper - copied unchanged from r362194, vendor/NetBSD/blacklist/dist/libexec/blacklistd-helper Deleted: vendor/NetBSD/blacklist/ vendor/blocklist/dist/bin/blacklistctl.8 vendor/blocklist/dist/bin/blacklistctl.c vendor/blocklist/dist/bin/blacklistd.8 vendor/blocklist/dist/bin/blacklistd.c vendor/blocklist/dist/bin/blacklistd.conf.5 vendor/blocklist/dist/etc/blacklistd.conf vendor/blocklist/dist/etc/rc.d/blacklistd vendor/blocklist/dist/include/blacklist.h vendor/blocklist/dist/lib/blacklist.c vendor/blocklist/dist/lib/libblacklist.3 vendor/blocklist/dist/libexec/blacklistd-helper Copied: vendor/blocklist/dist/bin/blocklistctl.8 (from r362194, vendor/NetBSD/blacklist/dist/bin/blacklistctl.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/dist/bin/blocklistctl.8 Mon Jun 15 13:17:22 2020 (r362196, copy of r362194, vendor/NetBSD/blacklist/dist/bin/blacklistctl.8) @@ -0,0 +1,86 @@ +.\" $NetBSD: blacklistctl.8,v 1.9 2016/06/08 12:48:37 wiz Exp $ +.\" +.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Christos Zoulas. +.\" +.\" 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. +.\" +.Dd June 7, 2016 +.Dt BLACKLISTCTL 8 +.Os +.Sh NAME +.Nm blacklistctl +.Nd display and change the state of blacklistd +.Sh SYNOPSIS +.Nm +.Cm dump +.Op Fl abdnrw +.Sh DESCRIPTION +.Nm +is a program used to display the state of +.Xr blacklistd 8 +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl a +Show all database entries, by default it shows only the embryonic ones. +.It Fl b +Show only the blocked entries. +.It Fl d +Increase debugging level. +.It Fl n +Don't display a header. +.It Fl r +Show the remaining blocked time instead of the last activity time. +.It Fl w +Normally the width of addresses is good for IPv4, the +.Fl w +flag, makes the display wide enough for IPv6 addresses. +.El +.Sh SEE ALSO +.Xr blacklistd 8 +.Sh NOTES +Sometimes the reported number of failed attempts can exceed the number +of attempts that +.Xr blacklistd 8 +is configured to block. +This can happen either because the rule has been removed manually, or +because there were more attempts in flight while the rule block was being +added. +This condition is normal; in that case +.Xr blacklistd 8 +will first attempt to remove the existing rule, and then it will re-add +it to make sure that there is only one rule active. +.Sh HISTORY +.Nm +first appeared in +.Nx 7 . +.Fx +support for +.Nm +was implemented in +.Fx 11 . +.Sh AUTHORS +.An Christos Zoulas Copied: vendor/blocklist/dist/bin/blocklistctl.c (from r362194, vendor/NetBSD/blacklist/dist/bin/blacklistctl.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/dist/bin/blocklistctl.c Mon Jun 15 13:17:22 2020 (r362196, copy of r362194, vendor/NetBSD/blacklist/dist/bin/blacklistctl.c) @@ -0,0 +1,168 @@ +/* $NetBSD: blacklistctl.c,v 1.23 2018/05/24 19:21:01 christos Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +__RCSID("$NetBSD: blacklistctl.c,v 1.23 2018/05/24 19:21:01 christos Exp $"); + +#include +#include +#ifdef HAVE_LIBUTIL_H +#include +#endif +#ifdef HAVE_UTIL_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include + +#include "conf.h" +#include "state.h" +#include "internal.h" +#include "support.h" + +static __dead void +usage(int c) +{ + if (c == 0) + warnx("Missing/unknown command"); + else + warnx("Unknown option `%c'", (char)c); + fprintf(stderr, "Usage: %s dump [-abdnrw]\n", getprogname()); + exit(EXIT_FAILURE); +} + +static const char * +star(char *buf, size_t len, int val) +{ + if (val == -1) + return "*"; + snprintf(buf, len, "%d", val); + return buf; +} + +int +main(int argc, char *argv[]) +{ + const char *dbname = _PATH_BLSTATE; + DB *db; + struct conf c; + struct dbinfo dbi; + unsigned int i; + struct timespec ts; + int all, blocked, remain, wide, noheader; + int o; + + noheader = wide = blocked = all = remain = 0; + lfun = dlog; + + if (argc == 1 || strcmp(argv[1], "dump") != 0) + usage(0); + + argc--; + argv++; + + while ((o = getopt(argc, argv, "abD:dnrw")) != -1) + switch (o) { + case 'a': + all = 1; + blocked = 0; + break; + case 'b': + blocked = 1; + break; + case 'D': + dbname = optarg; + break; + case 'd': + debug++; + break; + case 'n': + noheader = 1; + break; + case 'r': + remain = 1; + break; + case 'w': + wide = 1; + break; + default: + usage(o); + break; + } + + db = state_open(dbname, O_RDONLY, 0); + if (db == NULL) + err(EXIT_FAILURE, "Can't open `%s'", dbname); + + clock_gettime(CLOCK_REALTIME, &ts); + wide = wide ? 8 * 4 + 7 : 4 * 3 + 3; + if (!noheader) + printf("%*.*s/ma:port\tid\tnfail\t%s\n", wide, wide, + "address", remain ? "remaining time" : "last access"); + for (i = 1; state_iterate(db, &c, &dbi, i) != 0; i = 0) { + char buf[BUFSIZ]; + char mbuf[64], pbuf[64]; + if (!all) { + if (blocked) { + if (c.c_nfail == -1 || dbi.count < c.c_nfail) + continue; + } else { + if (dbi.count >= c.c_nfail) + continue; + } + } + sockaddr_snprintf(buf, sizeof(buf), "%a", (void *)&c.c_ss); + printf("%*.*s/%s:%s\t", wide, wide, buf, + star(mbuf, sizeof(mbuf), c.c_lmask), + star(pbuf, sizeof(pbuf), c.c_port)); + if (c.c_duration == -1) { + strlcpy(buf, "never", sizeof(buf)); + } else { + if (remain) + fmtydhms(buf, sizeof(buf), + c.c_duration - (ts.tv_sec - dbi.last)); + else + fmttime(buf, sizeof(buf), dbi.last); + } + printf("%s\t%d/%s\t%-s\n", dbi.id, dbi.count, + star(mbuf, sizeof(mbuf), c.c_nfail), buf); + } + state_close(db); + return EXIT_SUCCESS; +} Copied: vendor/blocklist/dist/bin/blocklistd.8 (from r362194, vendor/NetBSD/blacklist/dist/bin/blacklistd.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/dist/bin/blocklistd.8 Mon Jun 15 13:17:22 2020 (r362196, copy of r362194, vendor/NetBSD/blacklist/dist/bin/blacklistd.8) @@ -0,0 +1,227 @@ +.\" $NetBSD: blacklistd.8,v 1.18 2016/07/30 06:09:29 dholland Exp $ +.\" +.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Christos Zoulas. +.\" +.\" 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. +.\" +.Dd June 7, 2016 +.Dt BLACKLISTD 8 +.Os +.Sh NAME +.Nm blacklistd +.Nd block and release ports on demand to avoid DoS abuse +.Sh SYNOPSIS +.Nm +.Op Fl dfrv +.Op Fl C Ar controlprog +.Op Fl c Ar configfile +.Op Fl D Ar dbfile +.Op Fl P Ar sockpathsfile +.Op Fl R Ar rulename +.Op Fl s Ar sockpath +.Op Fl t Ar timeout +.Sh DESCRIPTION +.Nm +is a daemon similar to +.Xr syslogd 8 +that listens to sockets at paths specified in the +.Ar sockpathsfile +for notifications from other daemons about successful or failed connection +attempts. +If no such file is specified, then it only listens to the socket path +specified by +.Ar sockspath +or if that is not specified to +.Pa /var/run/blacklistd.sock . +Each notification contains an (action, port, protocol, address, owner) tuple +that identifies the remote connection and the action. +This tuple is consulted against entries in +.Ar configfile +with syntax specified in +.Xr blacklistd.conf 5 . +If an entry is matched, a state entry is created for that tuple. +Each entry contains a number of tries limit and a duration. +.Pp +If the action is +.Dq add +and the number of tries limit is reached, then a +control script +.Ar controlprog +is invoked with arguments: +.Bd -literal -offset indent +control add
+.Ed +.Pp +and should invoke a packet filter command to block the connection +specified by the arguments. +The +.Ar rulename +argument can be set from the command line (default +.Dv blacklistd ) . +The script could print a numerical id to stdout as a handle for +the rule that can be used later to remove that connection, but +that is not required as all information to remove the rule is +kept. +.Pp +If the action is +.Dq remove +Then the same control script is invoked as: +.Bd -literal -offset indent +control remove
+.Ed +.Pp +where +.Ar id +is the number returned from the +.Dq add +action. +.Pp +.Nm +maintains a database of known connections in +.Ar dbfile . +On startup it reads entries from that file, and updates its internal state. +.Pp +.Nm +checks the list of active entries every +.Ar timeout +seconds (default +.Dv 15 ) +and removes entries and block rules using the control program as necessary. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl C Ar controlprog +Use +.Ar controlprog +to communicate with the packet filter, usually +.Pa /libexec/blacklistd-helper . +The following arguments are passed to the control program: +.Bl -tag -width protocol +.It action +The action to perform: +.Dv add , +.Dv rem , +or +.Dv flush +to add, remove or flush a firewall rule. +.It name +The rule name. +.It protocol +The optional protocol name (can be empty): +.Dv tcp , +.Dv tcp6 , +.Dv udp , +.Dv udp6 . +.It address +The IPv4 or IPv6 numeric address to be blocked or released. +.It mask +The numeric mask to be applied to the blocked or released address +.It port +The optional numeric port to be blocked (can be empty). +.It id +For packet filters that support removal of rules by rule identifier, the +identifier of the rule to be removed. +The add command is expected to return the rule identifier string to stdout. +.El +.It Fl c Ar configuration +The name of the configuration file to read, usually +.Pa /etc/blacklistd.conf . +.It Fl D Ar dbfile +The Berkeley DB file where +.Nm +stores its state, usually +.Pa /var/run/blacklistd.db . +.It Fl d +Normally, +.Nm +disassociates itself from the terminal unless the +.Fl d +flag is specified, in which case it stays in the foreground. +.It Fl f +Truncate the state database and flush all the rules named +.Ar rulename +are deleted by invoking the control script as: +.Bd -literal -offset indent +control flush +.Ed +.It Fl P Ar sockspathsfile +A file containing a list of pathnames, one per line that +.Nm +will create sockets to listen to. +This is useful for chrooted environments. +.It Fl R Ar rulename +Specify the default rule name for the packet filter rules, usually +.Dv blacklistd . +.It Fl r +Re-read the firewall rules from the internal database, then +remove and re-add them. +This helps for packet filters that don't retain state across reboots. +.It Fl s Ar sockpath +Add +.Ar sockpath +to the list of Unix sockets +.Nm +listens to. +.It Fl t Ar timeout +The interval in seconds +.Nm +polls the state file to update the rules. +.It Fl v +Cause +.Nm +to print +diagnostic messages to +.Dv stdout +instead of +.Xr syslogd 8 . +.El +.Sh FILES +.Bl -tag -width /libexec/blacklistd-helper -compact +.It Pa /libexec/blacklistd-helper +Shell script invoked to interface with the packet filter. +.It Pa /etc/blacklistd.conf +Configuration file. +.It Pa /var/db/blacklistd.db +Database of current connection entries. +.It Pa /var/run/blacklistd.sock +Socket to receive connection notifications. +.El +.Sh SEE ALSO +.Xr blacklistd.conf 5 , +.Xr blacklistctl 8 , +.Xr npfctl 8 , +.Xr syslogd 8 +.Sh HISTORY +.Nm +first appeared in +.Nx 7 . +.Fx +support for +.Nm +was implemented in +.Fx 11 . +.Sh AUTHORS +.An Christos Zoulas Copied: vendor/blocklist/dist/bin/blocklistd.c (from r362194, vendor/NetBSD/blacklist/dist/bin/blacklistd.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/dist/bin/blocklistd.c Mon Jun 15 13:17:22 2020 (r362196, copy of r362194, vendor/NetBSD/blacklist/dist/bin/blacklistd.c) @@ -0,0 +1,568 @@ +/* $NetBSD: blacklistd.c,v 1.38 2019/02/27 02:20:18 christos Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include +__RCSID("$NetBSD: blacklistd.c,v 1.38 2019/02/27 02:20:18 christos Exp $"); + +#include +#include +#include + +#ifdef HAVE_LIBUTIL_H +#include +#endif +#ifdef HAVE_UTIL_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "bl.h" +#include "internal.h" +#include "conf.h" +#include "run.h" +#include "state.h" +#include "support.h" + +static const char *configfile = _PATH_BLCONF; +static DB *state; +static const char *dbfile = _PATH_BLSTATE; +static sig_atomic_t readconf; +static sig_atomic_t done; +static int vflag; + +static void +sigusr1(int n __unused) +{ + debug++; +} + +static void +sigusr2(int n __unused) +{ + debug--; +} + +static void +sighup(int n __unused) +{ + readconf++; +} + +static void +sigdone(int n __unused) +{ + done++; +} + +static __dead void +usage(int c) +{ + if (c) + warnx("Unknown option `%c'", (char)c); + fprintf(stderr, "Usage: %s [-vdfr] [-c ] [-R ] " + "[-P ] [-C ] [-D ] " + "[-s ] [-t ]\n", getprogname()); + exit(EXIT_FAILURE); +} + +static int +getremoteaddress(bl_info_t *bi, struct sockaddr_storage *rss, socklen_t *rsl) +{ + *rsl = sizeof(*rss); + memset(rss, 0, *rsl); + + if (getpeername(bi->bi_fd, (void *)rss, rsl) != -1) + return 0; + + if (errno != ENOTCONN) { + (*lfun)(LOG_ERR, "getpeername failed (%m)"); + return -1; + } + + if (bi->bi_slen == 0) { + (*lfun)(LOG_ERR, "unconnected socket with no peer in message"); + return -1; + } + + switch (bi->bi_ss.ss_family) { + case AF_INET: + *rsl = sizeof(struct sockaddr_in); + break; + case AF_INET6: + *rsl = sizeof(struct sockaddr_in6); + break; + default: + (*lfun)(LOG_ERR, "bad client passed socket family %u", + (unsigned)bi->bi_ss.ss_family); + return -1; + } + + if (*rsl != bi->bi_slen) { + (*lfun)(LOG_ERR, "bad client passed socket length %u != %u", + (unsigned)*rsl, (unsigned)bi->bi_slen); + return -1; + } + + memcpy(rss, &bi->bi_ss, *rsl); + +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + if (*rsl != rss->ss_len) { + (*lfun)(LOG_ERR, + "bad client passed socket internal length %u != %u", + (unsigned)*rsl, (unsigned)rss->ss_len); + return -1; + } +#endif + return 0; +} + +static void +process(bl_t bl) +{ + struct sockaddr_storage rss; + socklen_t rsl; + char rbuf[BUFSIZ]; + bl_info_t *bi; + struct conf c; + struct dbinfo dbi; + struct timespec ts; + + if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); + return; + } + + if ((bi = bl_recv(bl)) == NULL) { + (*lfun)(LOG_ERR, "no message (%m)"); + return; + } + + if (getremoteaddress(bi, &rss, &rsl) == -1) + goto out; + + if (debug) { + sockaddr_snprintf(rbuf, sizeof(rbuf), "%a:%p", (void *)&rss); + (*lfun)(LOG_DEBUG, "processing type=%d fd=%d remote=%s msg=%s" + " uid=%lu gid=%lu", bi->bi_type, bi->bi_fd, rbuf, + bi->bi_msg, (unsigned long)bi->bi_uid, + (unsigned long)bi->bi_gid); + } + + if (conf_find(bi->bi_fd, bi->bi_uid, &rss, &c) == NULL) { + (*lfun)(LOG_DEBUG, "no rule matched"); + goto out; + } + + + if (state_get(state, &c, &dbi) == -1) + goto out; + + if (debug) { + char b1[128], b2[128]; + (*lfun)(LOG_DEBUG, "%s: initial db state for %s: count=%d/%d " + "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, + fmttime(b1, sizeof(b1), dbi.last), + fmttime(b2, sizeof(b2), ts.tv_sec)); + } + + switch (bi->bi_type) { + case BL_ADD: + dbi.count++; + dbi.last = ts.tv_sec; + if (dbi.id[0]) { + /* + * We should not be getting this since the rule + * should have blocked the address. A possible + * explanation is that someone removed that rule, + * and another would be that we got another attempt + * before we added the rule. In anycase, we remove + * and re-add the rule because we don't want to add + * it twice, because then we'd lose track of it. + */ + (*lfun)(LOG_DEBUG, "rule exists %s", dbi.id); + (void)run_change("rem", &c, dbi.id, 0); + dbi.id[0] = '\0'; + } + if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { + int res = run_change("add", &c, dbi.id, sizeof(dbi.id)); + if (res == -1) + goto out; + sockaddr_snprintf(rbuf, sizeof(rbuf), "%a", + (void *)&rss); + (*lfun)(LOG_INFO, + "blocked %s/%d:%d for %d seconds", + rbuf, c.c_lmask, c.c_port, c.c_duration); + + } + break; + case BL_DELETE: + if (dbi.last == 0) + goto out; + dbi.count = 0; + dbi.last = 0; + break; + default: + (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); + } + state_put(state, &c, &dbi); + +out: + close(bi->bi_fd); + + if (debug) { + char b1[128], b2[128]; + (*lfun)(LOG_DEBUG, "%s: final db state for %s: count=%d/%d " + "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, + fmttime(b1, sizeof(b1), dbi.last), + fmttime(b2, sizeof(b2), ts.tv_sec)); + } +} + +static void +update_interfaces(void) +{ + struct ifaddrs *oifas, *nifas; + + if (getifaddrs(&nifas) == -1) + return; + + oifas = ifas; + ifas = nifas; + + if (oifas) + freeifaddrs(oifas); +} + +static void +update(void) +{ + struct timespec ts; + struct conf c; + struct dbinfo dbi; + unsigned int f, n; + char buf[128]; + void *ss = &c.c_ss; + + if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); + return; + } + +again: + for (n = 0, f = 1; state_iterate(state, &c, &dbi, f) == 1; + f = 0, n++) + { + time_t when = c.c_duration + dbi.last; + if (debug > 1) { + char b1[64], b2[64]; + sockaddr_snprintf(buf, sizeof(buf), "%a:%p", ss); + (*lfun)(LOG_DEBUG, "%s:[%u] %s count=%d duration=%d " + "last=%s " "now=%s", __func__, n, buf, dbi.count, + c.c_duration, fmttime(b1, sizeof(b1), dbi.last), + fmttime(b2, sizeof(b2), ts.tv_sec)); + } + if (c.c_duration == -1 || when >= ts.tv_sec) + continue; + if (dbi.id[0]) { + run_change("rem", &c, dbi.id, 0); + sockaddr_snprintf(buf, sizeof(buf), "%a", ss); + syslog(LOG_INFO, "released %s/%d:%d after %d seconds", + buf, c.c_lmask, c.c_port, c.c_duration); + } + state_del(state, &c); + goto again; + } +} + +static void +addfd(struct pollfd **pfdp, bl_t **blp, size_t *nfd, size_t *maxfd, + const char *path) +{ + bl_t bl = bl_create(true, path, vflag ? vdlog : vsyslog); + if (bl == NULL || !bl_isconnected(bl)) + exit(EXIT_FAILURE); + if (*nfd >= *maxfd) { + *maxfd += 10; + *blp = realloc(*blp, sizeof(**blp) * *maxfd); + if (*blp == NULL) + err(EXIT_FAILURE, "malloc"); + *pfdp = realloc(*pfdp, sizeof(**pfdp) * *maxfd); + if (*pfdp == NULL) + err(EXIT_FAILURE, "malloc"); + } + + (*pfdp)[*nfd].fd = bl_getfd(bl); + (*pfdp)[*nfd].events = POLLIN; + (*blp)[*nfd] = bl; + *nfd += 1; +} + +static void +uniqueadd(struct conf ***listp, size_t *nlist, size_t *mlist, struct conf *c) +{ + struct conf **list = *listp; + + if (c->c_name[0] == '\0') + return; + for (size_t i = 0; i < *nlist; i++) { + if (strcmp(list[i]->c_name, c->c_name) == 0) + return; + } + if (*nlist == *mlist) { + *mlist += 10; + void *p = realloc(*listp, *mlist * sizeof(*list)); + if (p == NULL) + err(EXIT_FAILURE, "Can't allocate for rule list"); + list = *listp = p; + } + list[(*nlist)++] = c; +} + +static void +rules_flush(void) +{ + struct conf **list; + size_t nlist, mlist; + + list = NULL; + mlist = nlist = 0; + for (size_t i = 0; i < rconf.cs_n; i++) + uniqueadd(&list, &nlist, &mlist, &rconf.cs_c[i]); + for (size_t i = 0; i < lconf.cs_n; i++) + uniqueadd(&list, &nlist, &mlist, &lconf.cs_c[i]); + + for (size_t i = 0; i < nlist; i++) + run_flush(list[i]); + free(list); +} + +static void +rules_restore(void) +{ + struct conf c; + struct dbinfo dbi; + unsigned int f; + + for (f = 1; state_iterate(state, &c, &dbi, f) == 1; f = 0) { + if (dbi.id[0] == '\0') + continue; + (void)run_change("add", &c, dbi.id, sizeof(dbi.id)); + } +} + +int +main(int argc, char *argv[]) +{ + int c, tout, flags, flush, restore, ret; + const char *spath, **blsock; + size_t nblsock, maxblsock; + + setprogname(argv[0]); + + spath = NULL; + blsock = NULL; + maxblsock = nblsock = 0; + flush = 0; + restore = 0; + tout = 0; + flags = O_RDWR|O_EXCL|O_CLOEXEC; + while ((c = getopt(argc, argv, "C:c:D:dfP:rR:s:t:v")) != -1) { + switch (c) { + case 'C': + controlprog = optarg; + break; + case 'c': + configfile = optarg; + break; + case 'D': + dbfile = optarg; + break; + case 'd': + debug++; + break; + case 'f': + flush++; + break; + case 'P': + spath = optarg; + break; + case 'R': + rulename = optarg; + break; + case 'r': + restore++; + break; + case 's': + if (nblsock >= maxblsock) { + maxblsock += 10; + void *p = realloc(blsock, + sizeof(*blsock) * maxblsock); + if (p == NULL) + err(EXIT_FAILURE, + "Can't allocate memory for %zu sockets", + maxblsock); + blsock = p; + } + blsock[nblsock++] = optarg; + break; + case 't': + tout = atoi(optarg) * 1000; + break; + case 'v': + vflag++; + break; + default: + usage(c); + } + } + + argc -= optind; + if (argc) + usage(0); + + signal(SIGHUP, sighup); + signal(SIGINT, sigdone); + signal(SIGQUIT, sigdone); + signal(SIGTERM, sigdone); + signal(SIGUSR1, sigusr1); + signal(SIGUSR2, sigusr2); + + openlog(getprogname(), LOG_PID, LOG_DAEMON); + + if (debug) { + lfun = dlog; + if (tout == 0) + tout = 5000; + } else { + if (tout == 0) + tout = 15000; + } + + update_interfaces(); + conf_parse(configfile); + if (flush) { + rules_flush(); + if (!restore) + flags |= O_TRUNC; + } + + struct pollfd *pfd = NULL; + bl_t *bl = NULL; + size_t nfd = 0; + size_t maxfd = 0; + + for (size_t i = 0; i < nblsock; i++) + addfd(&pfd, &bl, &nfd, &maxfd, blsock[i]); + free(blsock); + + if (spath) { + FILE *fp = fopen(spath, "r"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jun 15 13:44:40 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 332EF334463; Mon, 15 Jun 2020 13:44:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lsyJ0yMRz4cSK; Mon, 15 Jun 2020 13:44:40 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BCD71E72D; Mon, 15 Jun 2020 13:44:40 +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 05FDieLX067005; Mon, 15 Jun 2020 13:44:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05FDibMt066990; Mon, 15 Jun 2020 13:44:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202006151344.05FDibMt066990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 Jun 2020 13:44:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362197 - in vendor/blocklist/dist: . bin diff etc etc/rc.d include lib libexec port test X-SVN-Group: vendor X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in vendor/blocklist/dist: . bin diff etc etc/rc.d include lib libexec port test X-SVN-Commit-Revision: 362197 X-SVN-Commit-Repository: base 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.33 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: Mon, 15 Jun 2020 13:44:40 -0000 Author: emaste Date: Mon Jun 15 13:44:37 2020 New Revision: 362197 URL: https://svnweb.freebsd.org/changeset/base/362197 Log: blocklist: update to 2020-06-15 snapshot Upstream hash 7093cd90cc9eae6bf9fa6b66f679ea6b15451c1e Obtained from: https://github.com/zoulasc/blocklist Sponsored by: The FreeBSD Foundation Added: vendor/blocklist/dist/diff/postfix.diff Modified: vendor/blocklist/dist/Makefile vendor/blocklist/dist/Makefile.inc vendor/blocklist/dist/README vendor/blocklist/dist/TODO vendor/blocklist/dist/bin/Makefile vendor/blocklist/dist/bin/blocklistctl.8 vendor/blocklist/dist/bin/blocklistctl.c vendor/blocklist/dist/bin/blocklistd.8 vendor/blocklist/dist/bin/blocklistd.c vendor/blocklist/dist/bin/blocklistd.conf.5 vendor/blocklist/dist/bin/conf.c vendor/blocklist/dist/bin/conf.h vendor/blocklist/dist/bin/internal.c vendor/blocklist/dist/bin/internal.h vendor/blocklist/dist/bin/run.c vendor/blocklist/dist/bin/run.h vendor/blocklist/dist/bin/state.c vendor/blocklist/dist/bin/state.h vendor/blocklist/dist/bin/support.c vendor/blocklist/dist/bin/support.h vendor/blocklist/dist/diff/ftpd.diff vendor/blocklist/dist/diff/named.diff vendor/blocklist/dist/diff/proftpd.diff vendor/blocklist/dist/diff/ssh.diff vendor/blocklist/dist/etc/Makefile vendor/blocklist/dist/etc/npf.conf vendor/blocklist/dist/etc/rc.d/Makefile vendor/blocklist/dist/etc/rc.d/blocklistd vendor/blocklist/dist/include/Makefile vendor/blocklist/dist/include/bl.h vendor/blocklist/dist/include/blocklist.h vendor/blocklist/dist/lib/Makefile vendor/blocklist/dist/lib/bl.c vendor/blocklist/dist/lib/blocklist.c vendor/blocklist/dist/lib/libblocklist.3 vendor/blocklist/dist/libexec/Makefile vendor/blocklist/dist/libexec/blocklistd-helper vendor/blocklist/dist/port/Makefile.am vendor/blocklist/dist/port/_strtoi.h vendor/blocklist/dist/port/configure.ac vendor/blocklist/dist/port/fgetln.c vendor/blocklist/dist/port/fparseln.c vendor/blocklist/dist/port/pidfile.c vendor/blocklist/dist/port/popenve.c vendor/blocklist/dist/port/port.h vendor/blocklist/dist/port/sockaddr_snprintf.c vendor/blocklist/dist/port/strlcat.c vendor/blocklist/dist/port/strlcpy.c vendor/blocklist/dist/port/strtoi.c vendor/blocklist/dist/test/Makefile vendor/blocklist/dist/test/cltest.c vendor/blocklist/dist/test/srvtest.c Modified: vendor/blocklist/dist/Makefile ============================================================================== --- vendor/blocklist/dist/Makefile Mon Jun 15 13:17:22 2020 (r362196) +++ vendor/blocklist/dist/Makefile Mon Jun 15 13:44:37 2020 (r362197) @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2015/01/22 17:49:41 christos Exp $ +# $NetBSD: Makefile,v 1.1 2015/01/21 16:16:00 christos Exp $ SUBDIR = lib .WAIT include bin etc libexec Modified: vendor/blocklist/dist/Makefile.inc ============================================================================== --- vendor/blocklist/dist/Makefile.inc Mon Jun 15 13:17:22 2020 (r362196) +++ vendor/blocklist/dist/Makefile.inc Mon Jun 15 13:44:37 2020 (r362197) @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.inc,v 1.3 2015/01/23 03:57:22 christos Exp $ +# $NetBSD: Makefile.inc,v 1.2 2015/01/22 04:20:50 christos Exp $ WARNS=6 .if !defined(LIB) -LDADD+= -lblacklist -DPADD+= ${LIBBLACKLIST} +LDADD+= -lblocklist +DPADD+= ${LIBBLOCKLIST} .endif CPPFLAGS+= -I${.CURDIR}/../include CPPFLAGS+=-DHAVE_STRUCT_SOCKADDR_SA_LEN -DHAVE_UTIL_H -DHAVE_DB_H Modified: vendor/blocklist/dist/README ============================================================================== --- vendor/blocklist/dist/README Mon Jun 15 13:17:22 2020 (r362196) +++ vendor/blocklist/dist/README Mon Jun 15 13:44:37 2020 (r362197) @@ -1,21 +1,21 @@ -# $NetBSD: README,v 1.8 2017/04/13 17:59:34 christos Exp $ +# $NetBSD: README,v 1.7 2015/01/26 00:34:50 christos Exp $ This package contains library that can be used by network daemons to communicate with a packet filter via a daemon to enforce opening and closing ports dynamically based on policy. -The interface to the packet filter is in libexec/blacklistd-helper +The interface to the packet filter is in libexec/blocklistd-helper (this is currently designed for npf) and the configuration file -(inspired from inetd.conf) is in etc/blacklistd.conf. +(inspired from inetd.conf) is in etc/blocklistd.conf. -On NetBSD you can find an example npf.conf and blacklistd.conf in -/usr/share/examples/blacklistd; you need to adjust the interface +On NetBSD you can find an example npf.conf and blocklistd.conf in +/usr/share/examples/blocklistd; you need to adjust the interface in npf.conf and copy both files to /etc; then you just enable -blacklistd=YES in /etc/rc.conf, start it up, and you are all set. +blocklistd=YES in /etc/rc.conf, start it up, and you are all set. -There is also a startup file in etc/rc.d/blacklistd +There is also a startup file in etc/rc.d/blocklistd -Patches to various daemons to add blacklisting capabilitiers are in the +Patches to various daemons to add blocklisting capabilitiers are in the "diff" directory: - OpenSSH: diff/ssh.diff [tcp socket example] - Bind: diff/named.diff [both tcp and udp] @@ -23,21 +23,21 @@ Patches to various daemons to add blacklisting capabil These patches have been applied to NetBSD-current. -The network daemon (for example sshd) communicates to blacklistd, via +The network daemon (for example sshd) communicates to blocklistd, via a unix socket like syslog. The library calls are simple and everything is handled by the library. In the simplest form the only thing the daemon needs to do is to call: - blacklist(action, acceptedfd, message); + blocklist(action, acceptedfd, message); Where: - action = 0 -> successful login clear blacklist state + action = 0 -> successful login clear blocklist state 1 -> failed login, add to the failed count acceptedfd -> the file descriptor where the server is connected to the remote client. It is used to determine the listening socket, and the remote address. This allows any program to - contact the blacklist daemon, since the verification + contact the blocklist daemon, since the verification if the program has access to the listening socket is done by virtue that the port number is retrieved from the kernel. @@ -46,9 +46,9 @@ Where: Unfortunately there is no way to get information about the "peer" from a udp socket, because there is no connection and that information is kept with the server. In that case the daemon can provide the -peer information to blacklistd via: +peer information to blocklistd via: - blacklist_sa(action, acceptedfd, sockaddr, sockaddr_len, message); + blocklist_sa(action, acceptedfd, sockaddr, sockaddr_len, message); The configuration file contains entries of the form: @@ -70,8 +70,8 @@ will let us have 2 connections before blocking. Finall for an hour; we could block forever too by specifying * in the duration column. -blacklistd and the library use syslog(3) to report errors. The -blacklist filter state is persisted automatically in /var/db/blacklistd.db +blocklistd and the library use syslog(3) to report errors. The +blocklist filter state is persisted automatically in /var/db/blocklistd.db so that if the daemon is restarted, it remembers what connections is currently handling. To start from a fresh state (if you restart npf too for example), you can use -f. To watch the daemon at work, @@ -80,25 +80,25 @@ you can use -d. The current control file is designed for npf, and it uses the dynamic rule feature. You need to create a dynamic rule in your /etc/npf.conf on the group referring to the interface you want to block -called blacklistd as follows: +called blocklistd as follows: ext_if=bge0 int_if=sk0 group "external" on $ext_if { ... - ruleset "blacklistd-ext" - ruleset "blacklistd" + ruleset "blocklistd-ext" + ruleset "blocklistd" ... } group "internal" on $int_if { ... - ruleset "blacklistd-int" + ruleset "blocklistd-int" ... } -You can use 'blacklistctl dump -a' to list all the current entries +You can use 'blocklistctl dump -a' to list all the current entries in the database; the ones that have nfail / where urrent >= otal, should have an id assosiated with them; this means that there is a packet filter rule added for that entry. For npf, you Modified: vendor/blocklist/dist/TODO ============================================================================== --- vendor/blocklist/dist/TODO Mon Jun 15 13:17:22 2020 (r362196) +++ vendor/blocklist/dist/TODO Mon Jun 15 13:44:37 2020 (r362197) @@ -1,4 +1,4 @@ -# $NetBSD: TODO,v 1.7 2015/01/23 21:34:01 christos Exp $ +# $NetBSD: TODO,v 1.6 2015/01/22 18:15:56 christos Exp $ - don't poll periodically, find the next timeout - use the socket also for commands? Or separate socket? @@ -17,5 +17,5 @@ -n block unblock -- do we need an api in blacklistctl to perform maintenance -- fix the blacklistctl output to be more user friendly +- do we need an api in blocklistctl to perform maintenance +- fix the blocklistctl output to be more user friendly Modified: vendor/blocklist/dist/bin/Makefile ============================================================================== --- vendor/blocklist/dist/bin/Makefile Mon Jun 15 13:17:22 2020 (r362196) +++ vendor/blocklist/dist/bin/Makefile Mon Jun 15 13:44:37 2020 (r362197) @@ -1,12 +1,12 @@ -# $NetBSD: Makefile,v 1.11 2015/01/27 19:40:36 christos Exp $ +# $NetBSD: Makefile,v 1.10 2015/01/22 17:49:41 christos Exp $ BINDIR=/sbin -PROGS=blacklistd blacklistctl -MAN.blacklistd=blacklistd.8 blacklistd.conf.5 -MAN.blacklistctl=blacklistctl.8 -SRCS.blacklistd = blacklistd.c conf.c run.c state.c support.c internal.c -SRCS.blacklistctl = blacklistctl.c conf.c state.c support.c internal.c +PROGS=blocklistd blocklistctl +MAN.blocklistd=blocklistd.8 blocklistd.conf.5 +MAN.blocklistctl=blocklistctl.8 +SRCS.blocklistd = blocklistd.c conf.c run.c state.c support.c internal.c +SRCS.blocklistctl = blocklistctl.c conf.c state.c support.c internal.c DBG=-g LDADD+=-lutil Modified: vendor/blocklist/dist/bin/blocklistctl.8 ============================================================================== --- vendor/blocklist/dist/bin/blocklistctl.8 Mon Jun 15 13:17:22 2020 (r362196) +++ vendor/blocklist/dist/bin/blocklistctl.8 Mon Jun 15 13:44:37 2020 (r362197) @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistctl.8,v 1.9 2016/06/08 12:48:37 wiz Exp $ +.\" $NetBSD: blocklistctl.8,v 1.8 2016/06/07 17:31:02 christos Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,11 +28,11 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd June 7, 2016 -.Dt BLACKLISTCTL 8 +.Dt BLOCKLISTCTL 8 .Os .Sh NAME -.Nm blacklistctl -.Nd display and change the state of blacklistd +.Nm blocklistctl +.Nd display and change the state of blocklistd .Sh SYNOPSIS .Nm .Cm dump @@ -40,7 +40,7 @@ .Sh DESCRIPTION .Nm is a program used to display the state of -.Xr blacklistd 8 +.Xr blocklistd 8 .Pp The following options are available: .Bl -tag -width indent @@ -60,17 +60,17 @@ Normally the width of addresses is good for IPv4, the flag, makes the display wide enough for IPv6 addresses. .El .Sh SEE ALSO -.Xr blacklistd 8 +.Xr blocklistd 8 .Sh NOTES Sometimes the reported number of failed attempts can exceed the number of attempts that -.Xr blacklistd 8 +.Xr blocklistd 8 is configured to block. This can happen either because the rule has been removed manually, or because there were more attempts in flight while the rule block was being added. This condition is normal; in that case -.Xr blacklistd 8 +.Xr blocklistd 8 will first attempt to remove the existing rule, and then it will re-add it to make sure that there is only one rule active. .Sh HISTORY Modified: vendor/blocklist/dist/bin/blocklistctl.c ============================================================================== --- vendor/blocklist/dist/bin/blocklistctl.c Mon Jun 15 13:17:22 2020 (r362196) +++ vendor/blocklist/dist/bin/blocklistctl.c Mon Jun 15 13:44:37 2020 (r362197) @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistctl.c,v 1.23 2018/05/24 19:21:01 christos Exp $ */ +/* $NetBSD: blocklistctl.c,v 1.22 2018/05/24 19:19:37 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: blacklistctl.c,v 1.23 2018/05/24 19:21:01 christos Exp $"); +__RCSID("$NetBSD: blocklistctl.c,v 1.22 2018/05/24 19:19:37 christos Exp $"); #include #include Modified: vendor/blocklist/dist/bin/blocklistd.8 ============================================================================== --- vendor/blocklist/dist/bin/blocklistd.8 Mon Jun 15 13:17:22 2020 (r362196) +++ vendor/blocklist/dist/bin/blocklistd.8 Mon Jun 15 13:44:37 2020 (r362197) @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistd.8,v 1.18 2016/07/30 06:09:29 dholland Exp $ +.\" $NetBSD: blocklistd.8,v 1.23 2020/04/21 13:57:12 christos Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,11 +27,11 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 7, 2016 -.Dt BLACKLISTD 8 +.Dd April 21, 2020 +.Dt BLOCKLISTD 8 .Os .Sh NAME -.Nm blacklistd +.Nm blocklistd .Nd block and release ports on demand to avoid DoS abuse .Sh SYNOPSIS .Nm @@ -55,16 +55,52 @@ If no such file is specified, then it only listens to specified by .Ar sockspath or if that is not specified to -.Pa /var/run/blacklistd.sock . +.Pa /var/run/blocklistd.sock . Each notification contains an (action, port, protocol, address, owner) tuple that identifies the remote connection and the action. This tuple is consulted against entries in .Ar configfile with syntax specified in -.Xr blacklistd.conf 5 . +.Xr blocklistd.conf 5 . If an entry is matched, a state entry is created for that tuple. Each entry contains a number of tries limit and a duration. .Pp +The way +.Nm +does configuration entry matching is by having the client side pass the +file descriptor associated with the connection the client wants to blocklist +as well as passing socket credentials. +.Pp +The file descriptor is used to retrieve information (address and port) +about the remote side with +.Xr getpeername 2 +and the local side with +.Xr getsockname 2 . +.Pp +By examining the port of the local side, +.Nm +can determine if the client program +.Dq owns +the port. +By examining the optional address portion on the local side, it can match +interfaces. +By examining the remote address, it can match specific allow or deny rules. +.Pp +Finally +.Nm +can examine the socket credentials to match the user in the configuration file. +.Pp +While this works well for TCP sockets, it cannot be relied on for unbound +UDP sockets. +It is also less meaningful when it comes to connections using non-privileged +ports. +On the other hand, if we receive a request that has a local endpoint indicating +a UDP privileged port, we can presume that the client was privileged to be +able to acquire that port. +.Pp +Once an entry is matched +.Nm +can perform various actions. If the action is .Dq add and the number of tries limit is reached, then a @@ -80,17 +116,17 @@ specified by the arguments. The .Ar rulename argument can be set from the command line (default -.Dv blacklistd ) . +.Dv blocklistd ) . The script could print a numerical id to stdout as a handle for the rule that can be used later to remove that connection, but that is not required as all information to remove the rule is kept. .Pp If the action is -.Dq remove +.Dq rem Then the same control script is invoked as: .Bd -literal -offset indent -control remove
+control rem
.Ed .Pp where @@ -117,7 +153,7 @@ The following options are available: Use .Ar controlprog to communicate with the packet filter, usually -.Pa /libexec/blacklistd-helper . +.Pa /libexec/blocklistd-helper . The following arguments are passed to the control program: .Bl -tag -width protocol .It action @@ -148,12 +184,12 @@ The add command is expected to return the rule identif .El .It Fl c Ar configuration The name of the configuration file to read, usually -.Pa /etc/blacklistd.conf . +.Pa /etc/blocklistd.conf . .It Fl D Ar dbfile The Berkeley DB file where .Nm stores its state, usually -.Pa /var/run/blacklistd.db . +.Pa /var/db/blocklistd.db . .It Fl d Normally, .Nm @@ -174,11 +210,11 @@ will create sockets to listen to. This is useful for chrooted environments. .It Fl R Ar rulename Specify the default rule name for the packet filter rules, usually -.Dv blacklistd . +.Dv blocklistd . .It Fl r Re-read the firewall rules from the internal database, then remove and re-add them. -This helps for packet filters that don't retain state across reboots. +This helps for packet filters that do not retain state across reboots. .It Fl s Ar sockpath Add .Ar sockpath @@ -198,20 +234,41 @@ diagnostic messages to instead of .Xr syslogd 8 . .El +.Sh SIGNAL HANDLING +.Nm +deals with the following signals: +.Bl -tag -width "USR2" +.It Dv HUP +Receipt of this signal causes +.Nm +to re-read the configuration file. +.It Dv INT , Dv TERM & Dv QUIT +These signals tell +.Nm +to exit in an orderly fashion. +.It Dv USR1 +This signal tells +.Nm +to increase the internal debugging level by 1. +.It Dv USR2 +This signal tells +.Nm +to decrease the internal debugging level by 1. +.El .Sh FILES -.Bl -tag -width /libexec/blacklistd-helper -compact -.It Pa /libexec/blacklistd-helper +.Bl -tag -width /libexec/blocklistd-helper -compact +.It Pa /libexec/blocklistd-helper Shell script invoked to interface with the packet filter. -.It Pa /etc/blacklistd.conf +.It Pa /etc/blocklistd.conf Configuration file. -.It Pa /var/db/blacklistd.db +.It Pa /var/db/blocklistd.db Database of current connection entries. -.It Pa /var/run/blacklistd.sock +.It Pa /var/run/blocklistd.sock Socket to receive connection notifications. .El .Sh SEE ALSO -.Xr blacklistd.conf 5 , -.Xr blacklistctl 8 , +.Xr blocklistd.conf 5 , +.Xr blocklistctl 8 , .Xr npfctl 8 , .Xr syslogd 8 .Sh HISTORY Modified: vendor/blocklist/dist/bin/blocklistd.c ============================================================================== --- vendor/blocklist/dist/bin/blocklistd.c Mon Jun 15 13:17:22 2020 (r362196) +++ vendor/blocklist/dist/bin/blocklistd.c Mon Jun 15 13:44:37 2020 (r362197) @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistd.c,v 1.38 2019/02/27 02:20:18 christos Exp $ */ +/* $NetBSD: blocklistd.c,v 1.42 2020/03/11 02:33:18 roy Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "config.h" #endif #include -__RCSID("$NetBSD: blacklistd.c,v 1.38 2019/02/27 02:20:18 christos Exp $"); +__RCSID("$NetBSD: blocklistd.c,v 1.42 2020/03/11 02:33:18 roy Exp $"); #include #include @@ -123,7 +123,7 @@ getremoteaddress(bl_info_t *bi, struct sockaddr_storag return 0; if (errno != ENOTCONN) { - (*lfun)(LOG_ERR, "getpeername failed (%m)"); + (*lfun)(LOG_ERR, "getpeername failed (%m)"); return -1; } @@ -141,13 +141,13 @@ getremoteaddress(bl_info_t *bi, struct sockaddr_storag break; default: (*lfun)(LOG_ERR, "bad client passed socket family %u", - (unsigned)bi->bi_ss.ss_family); + (unsigned)bi->bi_ss.ss_family); return -1; } if (*rsl != bi->bi_slen) { (*lfun)(LOG_ERR, "bad client passed socket length %u != %u", - (unsigned)*rsl, (unsigned)bi->bi_slen); + (unsigned)*rsl, (unsigned)bi->bi_slen); return -1; } @@ -157,7 +157,7 @@ getremoteaddress(bl_info_t *bi, struct sockaddr_storag if (*rsl != rss->ss_len) { (*lfun)(LOG_ERR, "bad client passed socket internal length %u != %u", - (unsigned)*rsl, (unsigned)rss->ss_len); + (unsigned)*rsl, (unsigned)rss->ss_len); return -1; } #endif @@ -176,12 +176,12 @@ process(bl_t bl) struct timespec ts; if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { - (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); return; } if ((bi = bl_recv(bl)) == NULL) { - (*lfun)(LOG_ERR, "no message (%m)"); + (*lfun)(LOG_ERR, "no message (%m)"); return; } @@ -214,33 +214,38 @@ process(bl_t bl) } switch (bi->bi_type) { + case BL_ABUSE: + /* + * If the application has signaled abusive behavior, + * set the number of fails to be one less than the + * configured limit. Fallthrough to the normal BL_ADD + * processing, which will increment the failure count + * to the threshhold, and block the abusive address. + */ + if (c.c_nfail != -1) + dbi.count = c.c_nfail - 1; + /*FALLTHROUGH*/ case BL_ADD: dbi.count++; dbi.last = ts.tv_sec; - if (dbi.id[0]) { + if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { /* - * We should not be getting this since the rule - * should have blocked the address. A possible - * explanation is that someone removed that rule, - * and another would be that we got another attempt - * before we added the rule. In anycase, we remove - * and re-add the rule because we don't want to add - * it twice, because then we'd lose track of it. + * No point in re-adding the rule. + * It might exist already due to latency in processing + * and removing the rule is the wrong thing to do as + * it allows a window to attack again. */ - (*lfun)(LOG_DEBUG, "rule exists %s", dbi.id); - (void)run_change("rem", &c, dbi.id, 0); - dbi.id[0] = '\0'; - } - if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { - int res = run_change("add", &c, dbi.id, sizeof(dbi.id)); - if (res == -1) - goto out; + if (dbi.id[0] == '\0') { + int res = run_change("add", &c, + dbi.id, sizeof(dbi.id)); + if (res == -1) + goto out; + } sockaddr_snprintf(rbuf, sizeof(rbuf), "%a", (void *)&rss); (*lfun)(LOG_INFO, "blocked %s/%d:%d for %d seconds", rbuf, c.c_lmask, c.c_port, c.c_duration); - } break; case BL_DELETE: @@ -249,8 +254,11 @@ process(bl_t bl) dbi.count = 0; dbi.last = 0; break; + case BL_BADUSER: + /* ignore for now */ + break; default: - (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); + (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } state_put(state, &c, &dbi); @@ -292,7 +300,7 @@ update(void) void *ss = &c.c_ss; if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { - (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); return; } Modified: vendor/blocklist/dist/bin/blocklistd.conf.5 ============================================================================== --- vendor/blocklist/dist/bin/blocklistd.conf.5 Mon Jun 15 13:17:22 2020 (r362196) +++ vendor/blocklist/dist/bin/blocklistd.conf.5 Mon Jun 15 13:44:37 2020 (r362197) @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistd.conf.5,v 1.7 2017/06/07 13:50:57 wiz Exp $ +.\" $NetBSD: blocklistd.conf.5,v 1.9 2019/11/06 20:33:30 para Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,17 +27,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 5, 2017 -.Dt BLACKLISTD.CONF 5 +.Dd May 18, 2020 +.Dt BLOCKLISTD.CONF 5 .Os .Sh NAME -.Nm blacklistd.conf -.Nd configuration file format for blacklistd +.Nm blocklistd.conf +.Nd configuration file format for blocklistd .Sh DESCRIPTION The .Nm -files contains configuration entries for -.Xr blacklistd 8 +file contains configuration entries for +.Xr blocklistd 8 in a fashion similar to .Xr inetd.conf 5 . Only one entry per line is permitted. @@ -125,18 +125,18 @@ The second field is the socket .Dv dgram , or numeric. The third field is the -.Va prococol : +.Va protocol : .Dv tcp , .Dv udp , .Dv tcp6 , .Dv udp6 , or numeric. -The fourth file is the effective user +The fourth field is the effective user .Va ( owner ) of the daemon process reporting the event, either as a username or a userid. .Pp -The rest of the fields are controlling the behavior of the filter. +The rest of the fields control the behavior of the filter. .Pp The .Va name @@ -192,12 +192,12 @@ rule that matched. .Pp The .Va remote -rules can be used for whitelisting specific addresses, changing the mask +rules can be used for allowing specific addresses, changing the mask size, the rule that the packet filter uses, the number of failed attempts, or the block duration. .Sh FILES -.Bl -tag -width /etc/blacklistd.conf -compact -.It Pa /etc/blacklistd.conf +.Bl -tag -width /etc/blocklistd.conf -compact +.It Pa /etc/blocklistd.conf Configuration file. .El .Sh EXAMPLES @@ -214,8 +214,8 @@ bnx0:ssh * * * * 3 6h 8.8.0.0/16:ssh * * * /24 = = .Ed .Sh SEE ALSO -.Xr blacklistctl 8 , -.Xr blacklistd 8 +.Xr blocklistctl 8 , +.Xr blocklistd 8 .Sh HISTORY .Nm first appeared in Modified: vendor/blocklist/dist/bin/conf.c ============================================================================== --- vendor/blocklist/dist/bin/conf.c Mon Jun 15 13:17:22 2020 (r362196) +++ vendor/blocklist/dist/bin/conf.c Mon Jun 15 13:44:37 2020 (r362197) @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.24 2016/04/04 15:52:56 christos Exp $ */ +/* $NetBSD: conf.c,v 1.30 2020/03/12 19:47:32 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: conf.c,v 1.24 2016/04/04 15:52:56 christos Exp $"); +__RCSID("$NetBSD: conf.c,v 1.30 2020/03/12 19:47:32 christos Exp $"); #include #ifdef HAVE_LIBUTIL_H @@ -46,6 +46,7 @@ __RCSID("$NetBSD: conf.c,v 1.24 2016/04/04 15:52:56 ch #include #include #include +#include #include #include #include @@ -55,6 +56,7 @@ __RCSID("$NetBSD: conf.c,v 1.24 2016/04/04 15:52:56 ch #include #include #include +#include #include #include "bl.h" @@ -90,7 +92,7 @@ advance(char **p) } static int -getnum(const char *f, size_t l, bool local, void *rp, const char *name, +conf_getnum(const char *f, size_t l, bool local, void *rp, const char *name, const char *p) { int e; @@ -127,13 +129,14 @@ out: } static int -getnfail(const char *f, size_t l, bool local, struct conf *c, const char *p) +conf_getnfail(const char *f, size_t l, bool local, struct conf *c, + const char *p) { - return getnum(f, l, local, &c->c_nfail, "nfail", p); + return conf_getnum(f, l, local, &c->c_nfail, "nfail", p); } static int -getsecs(const char *f, size_t l, bool local, struct conf *c, const char *p) +conf_getsecs(const char *f, size_t l, bool local, struct conf *c, const char *p) { int e; char *ep; @@ -173,9 +176,9 @@ again: } break; } - } else + } else tot = im; - + if (e == 0) { c->c_duration = (int)tot; return 0; @@ -193,7 +196,7 @@ out: } static int -getport(const char *f, size_t l, bool local, void *r, const char *p) +conf_getport(const char *f, size_t l, bool local, void *r, const char *p) { struct servent *sv; @@ -207,14 +210,14 @@ getport(const char *f, size_t l, bool local, void *r, return 0; } - return getnum(f, l, local, r, "service", p); + return conf_getnum(f, l, local, r, "service", p); } static int -getmask(const char *f, size_t l, bool local, const char **p, int *mask) +conf_getmask(const char *f, size_t l, bool local, const char **p, int *mask) { char *d; - const char *s = *p; + const char *s = *p; if ((d = strchr(s, ':')) != NULL) { *d++ = '\0'; @@ -226,11 +229,12 @@ getmask(const char *f, size_t l, bool local, const cha } *d++ = '\0'; - return getnum(f, l, local, mask, "mask", d); + return conf_getnum(f, l, local, mask, "mask", d); } static int -gethostport(const char *f, size_t l, bool local, struct conf *c, const char *p) +conf_gethostport(const char *f, size_t l, bool local, struct conf *c, + const char *p) { char *d; // XXX: Ok to write to string. in_port_t *port = NULL; @@ -249,7 +253,7 @@ gethostport(const char *f, size_t l, bool local, struc } else pstr = p; - if (getmask(f, l, local, &pstr, &c->c_lmask) == -1) + if (conf_getmask(f, l, local, &pstr, &c->c_lmask) == -1) goto out; if (d) { @@ -264,7 +268,7 @@ gethostport(const char *f, size_t l, bool local, struc sin6->sin6_len = sizeof(*sin6); #endif port = &sin6->sin6_port; - } + } } else if (pstr != p || strchr(p, '.') || conf_is_interface(p)) { if (pstr == p) pstr = "*"; @@ -300,7 +304,7 @@ gethostport(const char *f, size_t l, bool local, struc } } - if (getport(f, l, local, &c->c_port, pstr) == -1) + if (conf_getport(f, l, local, &c->c_port, pstr) == -1) return -1; if (port && c->c_port != FSTAR && c->c_port != FEQUAL) @@ -320,7 +324,7 @@ out2: } static int -getproto(const char *f, size_t l, bool local __unused, struct conf *c, +conf_getproto(const char *f, size_t l, bool local __unused, struct conf *c, const char *p) { if (strcmp(p, "stream") == 0) { @@ -331,22 +335,22 @@ getproto(const char *f, size_t l, bool local __unused, c->c_proto = IPPROTO_UDP; return 0; } - return getnum(f, l, local, &c->c_proto, "protocol", p); + return conf_getnum(f, l, local, &c->c_proto, "protocol", p); } static int -getfamily(const char *f, size_t l, bool local __unused, struct conf *c, +conf_getfamily(const char *f, size_t l, bool local __unused, struct conf *c, const char *p) { if (strncmp(p, "tcp", 3) == 0 || strncmp(p, "udp", 3) == 0) { c->c_family = p[3] == '6' ? AF_INET6 : AF_INET; return 0; } - return getnum(f, l, local, &c->c_family, "family", p); + return conf_getnum(f, l, local, &c->c_family, "family", p); } static int -getuid(const char *f, size_t l, bool local __unused, struct conf *c, +conf_getuid(const char *f, size_t l, bool local __unused, struct conf *c, const char *p) { struct passwd *pw; @@ -356,21 +360,22 @@ getuid(const char *f, size_t l, bool local __unused, s return 0; } - return getnum(f, l, local, &c->c_uid, "user", p); + return conf_getnum(f, l, local, &c->c_uid, "user", p); } static int -getname(const char *f, size_t l, bool local, struct conf *c, +conf_getname(const char *f, size_t l, bool local, struct conf *c, const char *p) { - if (getmask(f, l, local, &p, &c->c_rmask) == -1) + if (conf_getmask(f, l, local, &p, &c->c_rmask) == -1) return -1; - + if (strcmp(p, "*") == 0) { strlcpy(c->c_name, rulename, CONFNAMESZ); return 0; } + if (strcmp(p, "=") == 0) { if (local) goto out; @@ -406,19 +411,19 @@ conf_parseline(const char *f, size_t l, char *p, struc p++; memset(c, 0, sizeof(*c)); - e = getvalue(f, l, local, c, &p, gethostport); + e = getvalue(f, l, local, c, &p, conf_gethostport); if (e) return -1; - e = getvalue(f, l, local, c, &p, getproto); + e = getvalue(f, l, local, c, &p, conf_getproto); if (e) return -1; - e = getvalue(f, l, local, c, &p, getfamily); + e = getvalue(f, l, local, c, &p, conf_getfamily); if (e) return -1; - e = getvalue(f, l, local, c, &p, getuid); + e = getvalue(f, l, local, c, &p, conf_getuid); if (e) return -1; - e = getvalue(f, l, local, c, &p, getname); + e = getvalue(f, l, local, c, &p, conf_getname); if (e) return -1; - e = getvalue(f, l, local, c, &p, getnfail); + e = getvalue(f, l, local, c, &p, conf_getnfail); if (e) return -1; - e = getvalue(f, l, local, c, &p, getsecs); + e = getvalue(f, l, local, c, &p, conf_getsecs); if (e) return -1; return 0; @@ -473,7 +478,6 @@ conf_amask_eq(const void *v1, const void *v2, size_t l return 1; goto out; case FEQUAL: - (*lfun)(LOG_CRIT, "%s: Internal error: bad mask %d", __func__, mask); abort(); @@ -687,7 +691,7 @@ conf_addr_eq(const struct sockaddr_storage *s1, static int conf_eq(const struct conf *c1, const struct conf *c2) { - + if (!conf_addr_eq(&c1->c_ss, &c2->c_ss, c2->c_lmask)) return 0; @@ -744,7 +748,7 @@ fmtport(char *b, size_t l, int port) if (port == FSTAR) return; - if (b[0] == '\0' || strcmp(b, "*") == 0) + if (b[0] == '\0' || strcmp(b, "*") == 0) snprintf(b, l, "%d", port); else { snprintf(buf, sizeof(buf), ":%d", port); @@ -820,7 +824,7 @@ conf_print(char *buf, size_t len, const char *pref, co fmtmask(ha, sizeof(ha), c->c_family, c->c_lmask); fmtport(ha, sizeof(ha), c->c_port); - + sp = *delim == '\t' ? 20 : -1; hb[0] = '\0'; if (*delim) @@ -878,7 +882,7 @@ conf_merge(struct conf *c, const struct conf *sc) (*lfun)(LOG_DEBUG, "%s: %s", __func__, conf_print(buf, sizeof(buf), "to:\t", "", c)); } - + if (sc->c_name[0]) memcpy(c->c_name, sc->c_name, CONFNAMESZ); if (sc->c_uid != FEQUAL) @@ -998,32 +1002,73 @@ confset_match(const struct confset *cs, struct conf *c return i; } -const struct conf * -conf_find(int fd, uid_t uid, const struct sockaddr_storage *rss, - struct conf *cr) -{ - int proto; - socklen_t slen; - struct sockaddr_storage lss; - size_t i; - char buf[BUFSIZ]; +#ifdef AF_ROUTE +static int +conf_route_perm(int fd) { +/* Disable for now, the access check in the routing socket uses curlwp */ +#if defined(RTM_IFANNOUNCE) && defined(RT_ROUNDUP) + /* + * Send a routing message that is not supported to check for access + * We expect EOPNOTSUPP for having access, since we are sending a + * request the system does not understand and EACCES if we don't have + * access. + */ + static struct sockaddr_in sin = { +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + .sin_len = sizeof(sin), +#endif + .sin_family = AF_INET, + }; + char buf[4096]; + struct rt_msghdr *rtm = (void *)buf; + char *cp = (char *)(rtm + 1); + size_t l; - memset(cr, 0, sizeof(*cr)); - slen = sizeof(lss); - memset(&lss, 0, slen); - if (getsockname(fd, (void *)&lss, &slen) == -1) { - (*lfun)(LOG_ERR, "getsockname failed (%m)"); - return NULL; +#define NEXTADDR(s) \ + l = RT_ROUNDUP(sizeof(*s)); memmove(cp, s, l); cp += l; + memset(buf, 0, sizeof(buf)); + rtm->rtm_type = RTM_IFANNOUNCE; + rtm->rtm_flags = 0; + rtm->rtm_addrs = RTA_DST|RTA_GATEWAY; + rtm->rtm_version = RTM_VERSION; + rtm->rtm_seq = 666; + NEXTADDR(&sin); + NEXTADDR(&sin); + rtm->rtm_msglen = (u_short)((char *)cp - (char *)rtm); + if (write(fd, rtm, rtm->rtm_msglen) != -1) { + (*lfun)(LOG_ERR, "Writing to routing socket succeeded!"); + return 0; } + switch (errno) { + case EACCES: + return 0; + case EOPNOTSUPP: + return 1; + default: + (*lfun)(LOG_ERR, + "Unexpected error writing to routing socket (%m)"); + return 0; + } +#else + return 0; +#endif +} +#endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jun 15 13:46:42 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E8A7334B12; Mon, 15 Jun 2020 13:46:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lt0f3byKz4cl2; Mon, 15 Jun 2020 13:46: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76B0C1E909; Mon, 15 Jun 2020 13:46:42 +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 05FDkgiE067155; Mon, 15 Jun 2020 13:46:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05FDket7067145; Mon, 15 Jun 2020 13:46:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202006151346.05FDket7067145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 Jun 2020 13:46:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362198 - in vendor/blocklist/20200615: . bin diff etc etc/rc.d include lib libexec port test X-SVN-Group: vendor X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in vendor/blocklist/20200615: . bin diff etc etc/rc.d include lib libexec port test X-SVN-Commit-Revision: 362198 X-SVN-Commit-Repository: base 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.33 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: Mon, 15 Jun 2020 13:46:42 -0000 Author: emaste Date: Mon Jun 15 13:46:40 2020 New Revision: 362198 URL: https://svnweb.freebsd.org/changeset/base/362198 Log: Tag 2020-06-15 blocklist snapshot Upstream git hash 7093cd90cc9eae6bf9fa6b66f679ea6b15451c1e Obtained from: https://github.com/zoulasc/blocklist Sponsored by: The FreeBSD Foundation Added: vendor/blocklist/20200615/ - copied from r362196, vendor/blocklist/dist/ vendor/blocklist/20200615/diff/postfix.diff - copied unchanged from r362197, vendor/blocklist/dist/diff/postfix.diff Replaced: vendor/blocklist/20200615/Makefile - copied unchanged from r362197, vendor/blocklist/dist/Makefile vendor/blocklist/20200615/Makefile.inc - copied unchanged from r362197, vendor/blocklist/dist/Makefile.inc vendor/blocklist/20200615/README - copied unchanged from r362197, vendor/blocklist/dist/README vendor/blocklist/20200615/TODO - copied unchanged from r362197, vendor/blocklist/dist/TODO vendor/blocklist/20200615/bin/Makefile - copied unchanged from r362197, vendor/blocklist/dist/bin/Makefile vendor/blocklist/20200615/bin/blocklistctl.8 - copied unchanged from r362197, vendor/blocklist/dist/bin/blocklistctl.8 vendor/blocklist/20200615/bin/blocklistctl.c - copied unchanged from r362197, vendor/blocklist/dist/bin/blocklistctl.c vendor/blocklist/20200615/bin/blocklistd.8 - copied unchanged from r362197, vendor/blocklist/dist/bin/blocklistd.8 vendor/blocklist/20200615/bin/blocklistd.c - copied unchanged from r362197, vendor/blocklist/dist/bin/blocklistd.c vendor/blocklist/20200615/bin/blocklistd.conf.5 - copied unchanged from r362197, vendor/blocklist/dist/bin/blocklistd.conf.5 vendor/blocklist/20200615/bin/conf.c - copied unchanged from r362197, vendor/blocklist/dist/bin/conf.c vendor/blocklist/20200615/bin/conf.h - copied unchanged from r362197, vendor/blocklist/dist/bin/conf.h vendor/blocklist/20200615/bin/internal.c - copied unchanged from r362197, vendor/blocklist/dist/bin/internal.c vendor/blocklist/20200615/bin/internal.h - copied unchanged from r362197, vendor/blocklist/dist/bin/internal.h vendor/blocklist/20200615/bin/run.c - copied unchanged from r362197, vendor/blocklist/dist/bin/run.c vendor/blocklist/20200615/bin/run.h - copied unchanged from r362197, vendor/blocklist/dist/bin/run.h vendor/blocklist/20200615/bin/state.c - copied unchanged from r362197, vendor/blocklist/dist/bin/state.c vendor/blocklist/20200615/bin/state.h - copied unchanged from r362197, vendor/blocklist/dist/bin/state.h vendor/blocklist/20200615/bin/support.c - copied unchanged from r362197, vendor/blocklist/dist/bin/support.c vendor/blocklist/20200615/bin/support.h - copied unchanged from r362197, vendor/blocklist/dist/bin/support.h vendor/blocklist/20200615/diff/ftpd.diff - copied unchanged from r362197, vendor/blocklist/dist/diff/ftpd.diff vendor/blocklist/20200615/diff/named.diff - copied unchanged from r362197, vendor/blocklist/dist/diff/named.diff vendor/blocklist/20200615/diff/proftpd.diff - copied unchanged from r362197, vendor/blocklist/dist/diff/proftpd.diff vendor/blocklist/20200615/diff/ssh.diff - copied unchanged from r362197, vendor/blocklist/dist/diff/ssh.diff vendor/blocklist/20200615/etc/Makefile - copied unchanged from r362197, vendor/blocklist/dist/etc/Makefile vendor/blocklist/20200615/etc/npf.conf - copied unchanged from r362197, vendor/blocklist/dist/etc/npf.conf vendor/blocklist/20200615/etc/rc.d/Makefile - copied unchanged from r362197, vendor/blocklist/dist/etc/rc.d/Makefile vendor/blocklist/20200615/etc/rc.d/blocklistd - copied unchanged from r362197, vendor/blocklist/dist/etc/rc.d/blocklistd vendor/blocklist/20200615/include/Makefile - copied unchanged from r362197, vendor/blocklist/dist/include/Makefile vendor/blocklist/20200615/include/bl.h - copied unchanged from r362197, vendor/blocklist/dist/include/bl.h vendor/blocklist/20200615/include/blocklist.h - copied unchanged from r362197, vendor/blocklist/dist/include/blocklist.h vendor/blocklist/20200615/lib/Makefile - copied unchanged from r362197, vendor/blocklist/dist/lib/Makefile vendor/blocklist/20200615/lib/bl.c - copied unchanged from r362197, vendor/blocklist/dist/lib/bl.c vendor/blocklist/20200615/lib/blocklist.c - copied unchanged from r362197, vendor/blocklist/dist/lib/blocklist.c vendor/blocklist/20200615/lib/libblocklist.3 - copied unchanged from r362197, vendor/blocklist/dist/lib/libblocklist.3 vendor/blocklist/20200615/libexec/Makefile - copied unchanged from r362197, vendor/blocklist/dist/libexec/Makefile vendor/blocklist/20200615/libexec/blocklistd-helper - copied unchanged from r362197, vendor/blocklist/dist/libexec/blocklistd-helper vendor/blocklist/20200615/port/Makefile.am - copied unchanged from r362197, vendor/blocklist/dist/port/Makefile.am vendor/blocklist/20200615/port/_strtoi.h - copied unchanged from r362197, vendor/blocklist/dist/port/_strtoi.h vendor/blocklist/20200615/port/configure.ac - copied unchanged from r362197, vendor/blocklist/dist/port/configure.ac vendor/blocklist/20200615/port/fgetln.c - copied unchanged from r362197, vendor/blocklist/dist/port/fgetln.c vendor/blocklist/20200615/port/fparseln.c - copied unchanged from r362197, vendor/blocklist/dist/port/fparseln.c vendor/blocklist/20200615/port/pidfile.c - copied unchanged from r362197, vendor/blocklist/dist/port/pidfile.c vendor/blocklist/20200615/port/popenve.c - copied unchanged from r362197, vendor/blocklist/dist/port/popenve.c vendor/blocklist/20200615/port/port.h - copied unchanged from r362197, vendor/blocklist/dist/port/port.h vendor/blocklist/20200615/port/sockaddr_snprintf.c - copied unchanged from r362197, vendor/blocklist/dist/port/sockaddr_snprintf.c vendor/blocklist/20200615/port/strlcat.c - copied unchanged from r362197, vendor/blocklist/dist/port/strlcat.c vendor/blocklist/20200615/port/strlcpy.c - copied unchanged from r362197, vendor/blocklist/dist/port/strlcpy.c vendor/blocklist/20200615/port/strtoi.c - copied unchanged from r362197, vendor/blocklist/dist/port/strtoi.c vendor/blocklist/20200615/test/Makefile - copied unchanged from r362197, vendor/blocklist/dist/test/Makefile vendor/blocklist/20200615/test/cltest.c - copied unchanged from r362197, vendor/blocklist/dist/test/cltest.c vendor/blocklist/20200615/test/srvtest.c - copied unchanged from r362197, vendor/blocklist/dist/test/srvtest.c Copied: vendor/blocklist/20200615/Makefile (from r362197, vendor/blocklist/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/20200615/Makefile Mon Jun 15 13:46:40 2020 (r362198, copy of r362197, vendor/blocklist/dist/Makefile) @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2015/01/21 16:16:00 christos Exp $ + +SUBDIR = lib .WAIT include bin etc libexec + +.include Copied: vendor/blocklist/20200615/Makefile.inc (from r362197, vendor/blocklist/dist/Makefile.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/20200615/Makefile.inc Mon Jun 15 13:46:40 2020 (r362198, copy of r362197, vendor/blocklist/dist/Makefile.inc) @@ -0,0 +1,10 @@ +# $NetBSD: Makefile.inc,v 1.2 2015/01/22 04:20:50 christos Exp $ + +WARNS=6 +.if !defined(LIB) +LDADD+= -lblocklist +DPADD+= ${LIBBLOCKLIST} +.endif +CPPFLAGS+= -I${.CURDIR}/../include +CPPFLAGS+=-DHAVE_STRUCT_SOCKADDR_SA_LEN -DHAVE_UTIL_H -DHAVE_DB_H + Copied: vendor/blocklist/20200615/README (from r362197, vendor/blocklist/dist/README) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/20200615/README Mon Jun 15 13:46:40 2020 (r362198, copy of r362197, vendor/blocklist/dist/README) @@ -0,0 +1,113 @@ +# $NetBSD: README,v 1.7 2015/01/26 00:34:50 christos Exp $ + +This package contains library that can be used by network daemons to +communicate with a packet filter via a daemon to enforce opening and +closing ports dynamically based on policy. + +The interface to the packet filter is in libexec/blocklistd-helper +(this is currently designed for npf) and the configuration file +(inspired from inetd.conf) is in etc/blocklistd.conf. + +On NetBSD you can find an example npf.conf and blocklistd.conf in +/usr/share/examples/blocklistd; you need to adjust the interface +in npf.conf and copy both files to /etc; then you just enable +blocklistd=YES in /etc/rc.conf, start it up, and you are all set. + +There is also a startup file in etc/rc.d/blocklistd + +Patches to various daemons to add blocklisting capabilitiers are in the +"diff" directory: + - OpenSSH: diff/ssh.diff [tcp socket example] + - Bind: diff/named.diff [both tcp and udp] + - ftpd: diff/ftpd.diff [tcp] + +These patches have been applied to NetBSD-current. + +The network daemon (for example sshd) communicates to blocklistd, via +a unix socket like syslog. The library calls are simple and everything +is handled by the library. In the simplest form the only thing the +daemon needs to do is to call: + + blocklist(action, acceptedfd, message); + +Where: + action = 0 -> successful login clear blocklist state + 1 -> failed login, add to the failed count + acceptedfd -> the file descriptor where the server is + connected to the remote client. It is used + to determine the listening socket, and the + remote address. This allows any program to + contact the blocklist daemon, since the verification + if the program has access to the listening + socket is done by virtue that the port + number is retrieved from the kernel. + message -> an optional string that is used in debugging logs. + +Unfortunately there is no way to get information about the "peer" +from a udp socket, because there is no connection and that information +is kept with the server. In that case the daemon can provide the +peer information to blocklistd via: + + blocklist_sa(action, acceptedfd, sockaddr, sockaddr_len, message); + +The configuration file contains entries of the form: + +# Blacklist rule +# host/Port type protocol owner name nfail disable +192.168.1.1:ssh stream tcp * -int 10 1m +8.8.8.8:ssh stream tcp * -ext 6 60m +ssh stream tcp6 * * 6 60m +http stream tcp * * 6 60m + +Here note that owner is * because the connection is done from the +child ssh socket which runs with user privs. We treat ipv4 connections +differently by maintaining two different rules one for the external +interface and one from the internal We also register for both tcp +and tcp6 since those are different listening sockets and addresses; +we don't bother with ipv6 and separate rules. We use nfail = 6, +because ssh allows 3 password attempts per connection, and this +will let us have 2 connections before blocking. Finally we block +for an hour; we could block forever too by specifying * in the +duration column. + +blocklistd and the library use syslog(3) to report errors. The +blocklist filter state is persisted automatically in /var/db/blocklistd.db +so that if the daemon is restarted, it remembers what connections +is currently handling. To start from a fresh state (if you restart +npf too for example), you can use -f. To watch the daemon at work, +you can use -d. + +The current control file is designed for npf, and it uses the +dynamic rule feature. You need to create a dynamic rule in your +/etc/npf.conf on the group referring to the interface you want to block +called blocklistd as follows: + +ext_if=bge0 +int_if=sk0 + +group "external" on $ext_if { + ... + ruleset "blocklistd-ext" + ruleset "blocklistd" + ... +} + +group "internal" on $int_if { + ... + ruleset "blocklistd-int" + ... +} + +You can use 'blocklistctl dump -a' to list all the current entries +in the database; the ones that have nfail / where urrent +>= otal, should have an id assosiated with them; this means that +there is a packet filter rule added for that entry. For npf, you +can examine the packet filter dynamic rule entries using 'npfctl +rule list'. The number of current entries can exceed +the total. This happens because entering packet filter rules is +asynchronous; there could be other connection before the rule +becomes activated. + +Enjoy, + +christos Copied: vendor/blocklist/20200615/TODO (from r362197, vendor/blocklist/dist/TODO) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/20200615/TODO Mon Jun 15 13:46:40 2020 (r362198, copy of r362197, vendor/blocklist/dist/TODO) @@ -0,0 +1,21 @@ +# $NetBSD: TODO,v 1.6 2015/01/22 18:15:56 christos Exp $ + +- don't poll periodically, find the next timeout +- use the socket also for commands? Or separate socket? +- add functionality to the control program. Should it change the database + directly, or talk to the daemon to have it do it? +- perhaps handle interfaces too instead of addresses for dynamic ip? + ? What to do with multiple addresses? +- perhaps rate limit against DoS +- perhaps instead of scanning the list have a sparse map by port? +- do we want to use libnpf directly for efficiency? +- add more daemons ftpd? +- do we care about the db state becoming too large? +- instead of a yes = bump one, no = return to 0 interface, do we want + to have something more flexible like? + +n + -n + block + unblock +- do we need an api in blocklistctl to perform maintenance +- fix the blocklistctl output to be more user friendly Copied: vendor/blocklist/20200615/bin/Makefile (from r362197, vendor/blocklist/dist/bin/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/20200615/bin/Makefile Mon Jun 15 13:46:40 2020 (r362198, copy of r362197, vendor/blocklist/dist/bin/Makefile) @@ -0,0 +1,15 @@ +# $NetBSD: Makefile,v 1.10 2015/01/22 17:49:41 christos Exp $ + +BINDIR=/sbin + +PROGS=blocklistd blocklistctl +MAN.blocklistd=blocklistd.8 blocklistd.conf.5 +MAN.blocklistctl=blocklistctl.8 +SRCS.blocklistd = blocklistd.c conf.c run.c state.c support.c internal.c +SRCS.blocklistctl = blocklistctl.c conf.c state.c support.c internal.c +DBG=-g + +LDADD+=-lutil +DPADD+=${LIBUTIL} + +.include Copied: vendor/blocklist/20200615/bin/blocklistctl.8 (from r362197, vendor/blocklist/dist/bin/blocklistctl.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/20200615/bin/blocklistctl.8 Mon Jun 15 13:46:40 2020 (r362198, copy of r362197, vendor/blocklist/dist/bin/blocklistctl.8) @@ -0,0 +1,86 @@ +.\" $NetBSD: blocklistctl.8,v 1.8 2016/06/07 17:31:02 christos Exp $ +.\" +.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Christos Zoulas. +.\" +.\" 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. +.\" +.Dd June 7, 2016 +.Dt BLOCKLISTCTL 8 +.Os +.Sh NAME +.Nm blocklistctl +.Nd display and change the state of blocklistd +.Sh SYNOPSIS +.Nm +.Cm dump +.Op Fl abdnrw +.Sh DESCRIPTION +.Nm +is a program used to display the state of +.Xr blocklistd 8 +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl a +Show all database entries, by default it shows only the embryonic ones. +.It Fl b +Show only the blocked entries. +.It Fl d +Increase debugging level. +.It Fl n +Don't display a header. +.It Fl r +Show the remaining blocked time instead of the last activity time. +.It Fl w +Normally the width of addresses is good for IPv4, the +.Fl w +flag, makes the display wide enough for IPv6 addresses. +.El +.Sh SEE ALSO +.Xr blocklistd 8 +.Sh NOTES +Sometimes the reported number of failed attempts can exceed the number +of attempts that +.Xr blocklistd 8 +is configured to block. +This can happen either because the rule has been removed manually, or +because there were more attempts in flight while the rule block was being +added. +This condition is normal; in that case +.Xr blocklistd 8 +will first attempt to remove the existing rule, and then it will re-add +it to make sure that there is only one rule active. +.Sh HISTORY +.Nm +first appeared in +.Nx 7 . +.Fx +support for +.Nm +was implemented in +.Fx 11 . +.Sh AUTHORS +.An Christos Zoulas Copied: vendor/blocklist/20200615/bin/blocklistctl.c (from r362197, vendor/blocklist/dist/bin/blocklistctl.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/20200615/bin/blocklistctl.c Mon Jun 15 13:46:40 2020 (r362198, copy of r362197, vendor/blocklist/dist/bin/blocklistctl.c) @@ -0,0 +1,168 @@ +/* $NetBSD: blocklistctl.c,v 1.22 2018/05/24 19:19:37 christos Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +__RCSID("$NetBSD: blocklistctl.c,v 1.22 2018/05/24 19:19:37 christos Exp $"); + +#include +#include +#ifdef HAVE_LIBUTIL_H +#include +#endif +#ifdef HAVE_UTIL_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include + +#include "conf.h" +#include "state.h" +#include "internal.h" +#include "support.h" + +static __dead void +usage(int c) +{ + if (c == 0) + warnx("Missing/unknown command"); + else + warnx("Unknown option `%c'", (char)c); + fprintf(stderr, "Usage: %s dump [-abdnrw]\n", getprogname()); + exit(EXIT_FAILURE); +} + +static const char * +star(char *buf, size_t len, int val) +{ + if (val == -1) + return "*"; + snprintf(buf, len, "%d", val); + return buf; +} + +int +main(int argc, char *argv[]) +{ + const char *dbname = _PATH_BLSTATE; + DB *db; + struct conf c; + struct dbinfo dbi; + unsigned int i; + struct timespec ts; + int all, blocked, remain, wide, noheader; + int o; + + noheader = wide = blocked = all = remain = 0; + lfun = dlog; + + if (argc == 1 || strcmp(argv[1], "dump") != 0) + usage(0); + + argc--; + argv++; + + while ((o = getopt(argc, argv, "abD:dnrw")) != -1) + switch (o) { + case 'a': + all = 1; + blocked = 0; + break; + case 'b': + blocked = 1; + break; + case 'D': + dbname = optarg; + break; + case 'd': + debug++; + break; + case 'n': + noheader = 1; + break; + case 'r': + remain = 1; + break; + case 'w': + wide = 1; + break; + default: + usage(o); + break; + } + + db = state_open(dbname, O_RDONLY, 0); + if (db == NULL) + err(EXIT_FAILURE, "Can't open `%s'", dbname); + + clock_gettime(CLOCK_REALTIME, &ts); + wide = wide ? 8 * 4 + 7 : 4 * 3 + 3; + if (!noheader) + printf("%*.*s/ma:port\tid\tnfail\t%s\n", wide, wide, + "address", remain ? "remaining time" : "last access"); + for (i = 1; state_iterate(db, &c, &dbi, i) != 0; i = 0) { + char buf[BUFSIZ]; + char mbuf[64], pbuf[64]; + if (!all) { + if (blocked) { + if (c.c_nfail == -1 || dbi.count < c.c_nfail) + continue; + } else { + if (dbi.count >= c.c_nfail) + continue; + } + } + sockaddr_snprintf(buf, sizeof(buf), "%a", (void *)&c.c_ss); + printf("%*.*s/%s:%s\t", wide, wide, buf, + star(mbuf, sizeof(mbuf), c.c_lmask), + star(pbuf, sizeof(pbuf), c.c_port)); + if (c.c_duration == -1) { + strlcpy(buf, "never", sizeof(buf)); + } else { + if (remain) + fmtydhms(buf, sizeof(buf), + c.c_duration - (ts.tv_sec - dbi.last)); + else + fmttime(buf, sizeof(buf), dbi.last); + } + printf("%s\t%d/%s\t%-s\n", dbi.id, dbi.count, + star(mbuf, sizeof(mbuf), c.c_nfail), buf); + } + state_close(db); + return EXIT_SUCCESS; +} Copied: vendor/blocklist/20200615/bin/blocklistd.8 (from r362197, vendor/blocklist/dist/bin/blocklistd.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/20200615/bin/blocklistd.8 Mon Jun 15 13:46:40 2020 (r362198, copy of r362197, vendor/blocklist/dist/bin/blocklistd.8) @@ -0,0 +1,284 @@ +.\" $NetBSD: blocklistd.8,v 1.23 2020/04/21 13:57:12 christos Exp $ +.\" +.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Christos Zoulas. +.\" +.\" 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. +.\" +.Dd April 21, 2020 +.Dt BLOCKLISTD 8 +.Os +.Sh NAME +.Nm blocklistd +.Nd block and release ports on demand to avoid DoS abuse +.Sh SYNOPSIS +.Nm +.Op Fl dfrv +.Op Fl C Ar controlprog +.Op Fl c Ar configfile +.Op Fl D Ar dbfile +.Op Fl P Ar sockpathsfile +.Op Fl R Ar rulename +.Op Fl s Ar sockpath +.Op Fl t Ar timeout +.Sh DESCRIPTION +.Nm +is a daemon similar to +.Xr syslogd 8 +that listens to sockets at paths specified in the +.Ar sockpathsfile +for notifications from other daemons about successful or failed connection +attempts. +If no such file is specified, then it only listens to the socket path +specified by +.Ar sockspath +or if that is not specified to +.Pa /var/run/blocklistd.sock . +Each notification contains an (action, port, protocol, address, owner) tuple +that identifies the remote connection and the action. +This tuple is consulted against entries in +.Ar configfile +with syntax specified in +.Xr blocklistd.conf 5 . +If an entry is matched, a state entry is created for that tuple. +Each entry contains a number of tries limit and a duration. +.Pp +The way +.Nm +does configuration entry matching is by having the client side pass the +file descriptor associated with the connection the client wants to blocklist +as well as passing socket credentials. +.Pp +The file descriptor is used to retrieve information (address and port) +about the remote side with +.Xr getpeername 2 +and the local side with +.Xr getsockname 2 . +.Pp +By examining the port of the local side, +.Nm +can determine if the client program +.Dq owns +the port. +By examining the optional address portion on the local side, it can match +interfaces. +By examining the remote address, it can match specific allow or deny rules. +.Pp +Finally +.Nm +can examine the socket credentials to match the user in the configuration file. +.Pp +While this works well for TCP sockets, it cannot be relied on for unbound +UDP sockets. +It is also less meaningful when it comes to connections using non-privileged +ports. +On the other hand, if we receive a request that has a local endpoint indicating +a UDP privileged port, we can presume that the client was privileged to be +able to acquire that port. +.Pp +Once an entry is matched +.Nm +can perform various actions. +If the action is +.Dq add +and the number of tries limit is reached, then a +control script +.Ar controlprog +is invoked with arguments: +.Bd -literal -offset indent +control add
+.Ed +.Pp +and should invoke a packet filter command to block the connection +specified by the arguments. +The +.Ar rulename +argument can be set from the command line (default +.Dv blocklistd ) . +The script could print a numerical id to stdout as a handle for +the rule that can be used later to remove that connection, but +that is not required as all information to remove the rule is +kept. +.Pp +If the action is +.Dq rem +Then the same control script is invoked as: +.Bd -literal -offset indent +control rem
+.Ed +.Pp +where +.Ar id +is the number returned from the +.Dq add +action. +.Pp +.Nm +maintains a database of known connections in +.Ar dbfile . +On startup it reads entries from that file, and updates its internal state. +.Pp +.Nm +checks the list of active entries every +.Ar timeout +seconds (default +.Dv 15 ) +and removes entries and block rules using the control program as necessary. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl C Ar controlprog +Use +.Ar controlprog +to communicate with the packet filter, usually +.Pa /libexec/blocklistd-helper . +The following arguments are passed to the control program: +.Bl -tag -width protocol +.It action +The action to perform: +.Dv add , +.Dv rem , +or +.Dv flush +to add, remove or flush a firewall rule. +.It name +The rule name. +.It protocol +The optional protocol name (can be empty): +.Dv tcp , +.Dv tcp6 , +.Dv udp , +.Dv udp6 . +.It address +The IPv4 or IPv6 numeric address to be blocked or released. +.It mask +The numeric mask to be applied to the blocked or released address +.It port +The optional numeric port to be blocked (can be empty). +.It id +For packet filters that support removal of rules by rule identifier, the +identifier of the rule to be removed. +The add command is expected to return the rule identifier string to stdout. +.El +.It Fl c Ar configuration +The name of the configuration file to read, usually +.Pa /etc/blocklistd.conf . +.It Fl D Ar dbfile +The Berkeley DB file where +.Nm +stores its state, usually +.Pa /var/db/blocklistd.db . +.It Fl d +Normally, +.Nm +disassociates itself from the terminal unless the +.Fl d +flag is specified, in which case it stays in the foreground. +.It Fl f +Truncate the state database and flush all the rules named +.Ar rulename +are deleted by invoking the control script as: +.Bd -literal -offset indent +control flush +.Ed +.It Fl P Ar sockspathsfile +A file containing a list of pathnames, one per line that +.Nm +will create sockets to listen to. +This is useful for chrooted environments. +.It Fl R Ar rulename +Specify the default rule name for the packet filter rules, usually +.Dv blocklistd . +.It Fl r +Re-read the firewall rules from the internal database, then +remove and re-add them. +This helps for packet filters that do not retain state across reboots. +.It Fl s Ar sockpath +Add +.Ar sockpath +to the list of Unix sockets +.Nm +listens to. +.It Fl t Ar timeout +The interval in seconds +.Nm +polls the state file to update the rules. +.It Fl v +Cause +.Nm +to print +diagnostic messages to +.Dv stdout +instead of +.Xr syslogd 8 . +.El +.Sh SIGNAL HANDLING +.Nm +deals with the following signals: +.Bl -tag -width "USR2" +.It Dv HUP +Receipt of this signal causes +.Nm +to re-read the configuration file. +.It Dv INT , Dv TERM & Dv QUIT +These signals tell +.Nm +to exit in an orderly fashion. +.It Dv USR1 +This signal tells +.Nm +to increase the internal debugging level by 1. +.It Dv USR2 +This signal tells +.Nm +to decrease the internal debugging level by 1. +.El +.Sh FILES +.Bl -tag -width /libexec/blocklistd-helper -compact +.It Pa /libexec/blocklistd-helper +Shell script invoked to interface with the packet filter. +.It Pa /etc/blocklistd.conf +Configuration file. +.It Pa /var/db/blocklistd.db +Database of current connection entries. +.It Pa /var/run/blocklistd.sock +Socket to receive connection notifications. +.El +.Sh SEE ALSO +.Xr blocklistd.conf 5 , +.Xr blocklistctl 8 , +.Xr npfctl 8 , +.Xr syslogd 8 +.Sh HISTORY +.Nm +first appeared in +.Nx 7 . +.Fx +support for +.Nm +was implemented in +.Fx 11 . +.Sh AUTHORS +.An Christos Zoulas Copied: vendor/blocklist/20200615/bin/blocklistd.c (from r362197, vendor/blocklist/dist/bin/blocklistd.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/blocklist/20200615/bin/blocklistd.c Mon Jun 15 13:46:40 2020 (r362198, copy of r362197, vendor/blocklist/dist/bin/blocklistd.c) @@ -0,0 +1,576 @@ +/* $NetBSD: blocklistd.c,v 1.42 2020/03/11 02:33:18 roy Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include +__RCSID("$NetBSD: blocklistd.c,v 1.42 2020/03/11 02:33:18 roy Exp $"); + +#include +#include +#include + +#ifdef HAVE_LIBUTIL_H +#include +#endif +#ifdef HAVE_UTIL_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "bl.h" +#include "internal.h" +#include "conf.h" +#include "run.h" +#include "state.h" +#include "support.h" + +static const char *configfile = _PATH_BLCONF; +static DB *state; +static const char *dbfile = _PATH_BLSTATE; +static sig_atomic_t readconf; +static sig_atomic_t done; +static int vflag; + +static void +sigusr1(int n __unused) +{ + debug++; +} + +static void +sigusr2(int n __unused) +{ + debug--; +} + +static void +sighup(int n __unused) +{ + readconf++; +} + +static void +sigdone(int n __unused) +{ + done++; +} + +static __dead void +usage(int c) +{ + if (c) + warnx("Unknown option `%c'", (char)c); + fprintf(stderr, "Usage: %s [-vdfr] [-c ] [-R ] " + "[-P ] [-C ] [-D ] " + "[-s ] [-t ]\n", getprogname()); + exit(EXIT_FAILURE); +} + +static int +getremoteaddress(bl_info_t *bi, struct sockaddr_storage *rss, socklen_t *rsl) +{ + *rsl = sizeof(*rss); + memset(rss, 0, *rsl); + + if (getpeername(bi->bi_fd, (void *)rss, rsl) != -1) + return 0; + + if (errno != ENOTCONN) { + (*lfun)(LOG_ERR, "getpeername failed (%m)"); + return -1; + } + + if (bi->bi_slen == 0) { + (*lfun)(LOG_ERR, "unconnected socket with no peer in message"); + return -1; + } + + switch (bi->bi_ss.ss_family) { + case AF_INET: + *rsl = sizeof(struct sockaddr_in); + break; + case AF_INET6: + *rsl = sizeof(struct sockaddr_in6); + break; + default: + (*lfun)(LOG_ERR, "bad client passed socket family %u", + (unsigned)bi->bi_ss.ss_family); + return -1; + } + + if (*rsl != bi->bi_slen) { + (*lfun)(LOG_ERR, "bad client passed socket length %u != %u", + (unsigned)*rsl, (unsigned)bi->bi_slen); + return -1; + } + + memcpy(rss, &bi->bi_ss, *rsl); + +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + if (*rsl != rss->ss_len) { + (*lfun)(LOG_ERR, + "bad client passed socket internal length %u != %u", + (unsigned)*rsl, (unsigned)rss->ss_len); + return -1; + } +#endif + return 0; +} + +static void +process(bl_t bl) +{ + struct sockaddr_storage rss; + socklen_t rsl; + char rbuf[BUFSIZ]; + bl_info_t *bi; + struct conf c; + struct dbinfo dbi; + struct timespec ts; + + if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); + return; + } + + if ((bi = bl_recv(bl)) == NULL) { + (*lfun)(LOG_ERR, "no message (%m)"); + return; + } + + if (getremoteaddress(bi, &rss, &rsl) == -1) + goto out; + + if (debug) { + sockaddr_snprintf(rbuf, sizeof(rbuf), "%a:%p", (void *)&rss); + (*lfun)(LOG_DEBUG, "processing type=%d fd=%d remote=%s msg=%s" + " uid=%lu gid=%lu", bi->bi_type, bi->bi_fd, rbuf, + bi->bi_msg, (unsigned long)bi->bi_uid, + (unsigned long)bi->bi_gid); + } + + if (conf_find(bi->bi_fd, bi->bi_uid, &rss, &c) == NULL) { + (*lfun)(LOG_DEBUG, "no rule matched"); + goto out; + } + + + if (state_get(state, &c, &dbi) == -1) + goto out; + + if (debug) { + char b1[128], b2[128]; + (*lfun)(LOG_DEBUG, "%s: initial db state for %s: count=%d/%d " + "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, + fmttime(b1, sizeof(b1), dbi.last), + fmttime(b2, sizeof(b2), ts.tv_sec)); + } + + switch (bi->bi_type) { + case BL_ABUSE: + /* + * If the application has signaled abusive behavior, + * set the number of fails to be one less than the + * configured limit. Fallthrough to the normal BL_ADD + * processing, which will increment the failure count + * to the threshhold, and block the abusive address. + */ + if (c.c_nfail != -1) + dbi.count = c.c_nfail - 1; + /*FALLTHROUGH*/ + case BL_ADD: + dbi.count++; + dbi.last = ts.tv_sec; + if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { + /* + * No point in re-adding the rule. + * It might exist already due to latency in processing + * and removing the rule is the wrong thing to do as + * it allows a window to attack again. + */ + if (dbi.id[0] == '\0') { + int res = run_change("add", &c, + dbi.id, sizeof(dbi.id)); + if (res == -1) + goto out; + } + sockaddr_snprintf(rbuf, sizeof(rbuf), "%a", + (void *)&rss); + (*lfun)(LOG_INFO, + "blocked %s/%d:%d for %d seconds", + rbuf, c.c_lmask, c.c_port, c.c_duration); + } + break; + case BL_DELETE: + if (dbi.last == 0) + goto out; + dbi.count = 0; + dbi.last = 0; + break; + case BL_BADUSER: + /* ignore for now */ + break; + default: + (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); + } + state_put(state, &c, &dbi); + +out: + close(bi->bi_fd); + + if (debug) { + char b1[128], b2[128]; + (*lfun)(LOG_DEBUG, "%s: final db state for %s: count=%d/%d " + "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Wed Jun 17 01:11:29 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7F3F33C3A4; Wed, 17 Jun 2020 01:11:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mn8K5kb0z42xx; Wed, 17 Jun 2020 01:11:29 +0000 (UTC) (envelope-from delphij@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BFB6718618; Wed, 17 Jun 2020 01:11:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05H1BTIW030931; Wed, 17 Jun 2020 01:11:29 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05H1BQ9n029244; Wed, 17 Jun 2020 01:11:26 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202006170111.05H1BQ9n029244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 17 Jun 2020 01:11:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362254 - in vendor/file/dist: . doc magic magic/Magdir src X-SVN-Group: vendor X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in vendor/file/dist: . doc magic magic/Magdir src X-SVN-Commit-Revision: 362254 X-SVN-Commit-Repository: base 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.33 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, 17 Jun 2020 01:11:29 -0000 Author: delphij Date: Wed Jun 17 01:11:26 2020 New Revision: 362254 URL: https://svnweb.freebsd.org/changeset/base/362254 Log: Vendor import of file 5.39. Added: vendor/file/dist/libmagic.pc.in (contents, props changed) vendor/file/dist/magic/Magdir/asf vendor/file/dist/magic/Magdir/dif vendor/file/dist/magic/Magdir/sylk vendor/file/dist/magic/Magdir/unisig vendor/file/dist/magic/Magdir/usd vendor/file/dist/magic/Magdir/web Modified: vendor/file/dist/ChangeLog vendor/file/dist/Makefile.am vendor/file/dist/Makefile.in vendor/file/dist/configure vendor/file/dist/configure.ac vendor/file/dist/doc/file.man vendor/file/dist/doc/magic.man vendor/file/dist/magic/Magdir/animation vendor/file/dist/magic/Magdir/archive vendor/file/dist/magic/Magdir/cad vendor/file/dist/magic/Magdir/commands vendor/file/dist/magic/Magdir/compress vendor/file/dist/magic/Magdir/console vendor/file/dist/magic/Magdir/database vendor/file/dist/magic/Magdir/der vendor/file/dist/magic/Magdir/elf vendor/file/dist/magic/Magdir/filesystems vendor/file/dist/magic/Magdir/games vendor/file/dist/magic/Magdir/gnu vendor/file/dist/magic/Magdir/images vendor/file/dist/magic/Magdir/intel vendor/file/dist/magic/Magdir/kicad vendor/file/dist/magic/Magdir/linux vendor/file/dist/magic/Magdir/msdos vendor/file/dist/magic/Magdir/ole2compounddocs vendor/file/dist/magic/Magdir/parix vendor/file/dist/magic/Magdir/pascal vendor/file/dist/magic/Magdir/pdf vendor/file/dist/magic/Magdir/pgp vendor/file/dist/magic/Magdir/python vendor/file/dist/magic/Magdir/riff vendor/file/dist/magic/Magdir/rst vendor/file/dist/magic/Magdir/rtf vendor/file/dist/magic/Magdir/sgml vendor/file/dist/magic/Magdir/sniffer vendor/file/dist/magic/Magdir/ssh vendor/file/dist/magic/Magdir/ti-8x vendor/file/dist/magic/Magdir/tplink vendor/file/dist/magic/Magdir/troff vendor/file/dist/magic/Magdir/virtual vendor/file/dist/magic/Magdir/windows vendor/file/dist/magic/Magdir/wordprocessors vendor/file/dist/magic/Magdir/zip vendor/file/dist/magic/Makefile.am vendor/file/dist/magic/Makefile.in vendor/file/dist/src/apprentice.c vendor/file/dist/src/ascmagic.c vendor/file/dist/src/buffer.c vendor/file/dist/src/compress.c vendor/file/dist/src/der.c vendor/file/dist/src/file.c vendor/file/dist/src/file.h vendor/file/dist/src/file_opts.h vendor/file/dist/src/funcs.c vendor/file/dist/src/is_json.c vendor/file/dist/src/magic.c vendor/file/dist/src/print.c vendor/file/dist/src/readelf.c vendor/file/dist/src/seccomp.c vendor/file/dist/src/softmagic.c Modified: vendor/file/dist/ChangeLog ============================================================================== --- vendor/file/dist/ChangeLog Tue Jun 16 22:53:56 2020 (r362253) +++ vendor/file/dist/ChangeLog Wed Jun 17 01:11:26 2020 (r362254) @@ -1,3 +1,83 @@ +2020-06-14 20:02 Christos Zoulas + + * release 5.39 + +2020-06-07 20:00 Christos Zoulas + + * Remove unused subtype_mime (Steve Grubb) + * Remove unused check in okstat (Steve Grubb) + * Fix mime-type in elf binaries by making sure $x is set + * Fix indirect negative offsets broken by OFFNEGATIVE + * Fix GUID equality check + * PR/165: Handle empty array and strings in JSON + * PR/162: Add --exclude-quiet + +2020-06-06 15:33 Christos Zoulas + + * Fix memory leak in ascmagic (Steve Grubb) + +2020-06-04 00:21 Christos Zoulas + + * Fix string comparison length with ignore whitespace + +2020-05-31 00:11 Christos Zoulas + + * Fix mingwin 64 compilation + +2020-05-30 23:56 Christos Zoulas + + * PR/159: whitelist getpid needed for file_pipe2file() + +2020-05-09 18:57 Christos Zoulas + + * Indicate negative offsets with a flag OFFNEGATIVE + so that -0 works. + * Introduce "offset" magic type that can be used to + detect the file size, and bail on short files. + * document DER better in the magic man page. + +2020-03-11 21:53 Christos Zoulas + + * fix memory leaks (SonarQube) + +2020-03-08 21:33 Christos Zoulas + + * fix memory leaks (SonarQube) + * rewrite confusing loops (SonarQube) + * fix bogus test (SonarQube) + * pass a sized buffer to file_fmttime() (SonarQube) + + * fix memory leaks (SonarQube) + +2020-02-20 15:50 Christos Zoulas + + * Don't allow * in printf formats, or the code itself (Christoph Biedl) + * Introduce a printf output size checker to avoid DoS attacks + +2020-02-17 17:22 Christos Zoulas + + * Avoid memory leak on error (oss-fuzz) + * Check length of string on DER before derefercing and add new types + * Add missing DER string (oss-fuzz) + +2020-02-16 20:45 Christos Zoulas + + * Add missing DER types, and debugging + +2020-02-13 13:10 Christos Zoulas + + * PR/140: Avoid abort with hand-crafted magic file (gockelhahn) + * PR/139 Avoid DoS in printf with hand-crafted magic file (gockelhahn) + * PR/138: Avoid crash with hand-crafted magic file (gockelhahn) + +2020-02-12 17:30 Christos Zoulas + + * PR/136: Fix static build by adding a libmagic.pc (Fabrice Fontaine) + +2019-12-24 14:16 Christos Zoulas + + * add guid support + 2019-12-16 21:11 Christos Zoulas * release 5.38 Modified: vendor/file/dist/Makefile.am ============================================================================== --- vendor/file/dist/Makefile.am Tue Jun 16 22:53:56 2020 (r362253) +++ vendor/file/dist/Makefile.am Wed Jun 17 01:11:26 2020 (r362254) @@ -3,3 +3,8 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = MAINT SUBDIRS = src magic tests doc python + +# This variable must have 'exec' in its name, in order to be installed +# by 'install-exec' target (instead of default 'install-data') +pkgconfigexecdir = $(libdir)/pkgconfig +pkgconfigexec_DATA = libmagic.pc Modified: vendor/file/dist/Makefile.in ============================================================================== --- vendor/file/dist/Makefile.in Tue Jun 16 22:53:56 2020 (r362253) +++ vendor/file/dist/Makefile.in Wed Jun 17 01:11:26 2020 (r362254) @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -100,7 +101,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cach configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = libmagic.pc CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -129,6 +130,35 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pkgconfigexecdir)" +DATA = $(pkgconfigexec_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -159,9 +189,10 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ - COPYING ChangeLog INSTALL NEWS README TODO compile \ - config.guess config.sub install-sh ltmain.sh missing +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/libmagic.pc.in AUTHORS COPYING ChangeLog INSTALL \ + NEWS README TODO compile config.guess config.sub install-sh \ + ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -328,6 +359,11 @@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = MAINT SUBDIRS = src magic tests doc python + +# This variable must have 'exec' in its name, in order to be installed +# by 'install-exec' target (instead of default 'install-data') +pkgconfigexecdir = $(libdir)/pkgconfig +pkgconfigexec_DATA = libmagic.pc all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -380,6 +416,8 @@ $(srcdir)/config.h.in: $(am__configure_deps) distclean-hdr: -rm -f config.h stamp-h1 +libmagic.pc: $(top_builddir)/config.status $(srcdir)/libmagic.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -389,7 +427,28 @@ clean-libtool: distclean-libtool: -rm -f libtool config.lt +install-pkgconfigexecDATA: $(pkgconfigexec_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfigexec_DATA)'; test -n "$(pkgconfigexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigexecdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigexecdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigexecdir)" || exit $$?; \ + done +uninstall-pkgconfigexecDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfigexec_DATA)'; test -n "$(pkgconfigexecdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigexecdir)'; $(am__uninstall_files_from_dir) + # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, @@ -689,9 +748,12 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile config.h +all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: + for dir in "$(DESTDIR)$(pkgconfigexecdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -750,7 +812,7 @@ install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: +install-exec-am: install-pkgconfigexecDATA install-html: install-html-recursive @@ -790,7 +852,7 @@ ps: ps-recursive ps-am: -uninstall-am: +uninstall-am: uninstall-pkgconfigexecDATA .MAKE: $(am__recursive_targets) all install-am install-strip @@ -804,12 +866,13 @@ uninstall-am: info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am + install-man install-pdf install-pdf-am \ + install-pkgconfigexecDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-pkgconfigexecDATA .PRECIOUS: Makefile Modified: vendor/file/dist/configure ============================================================================== --- vendor/file/dist/configure Tue Jun 16 22:53:56 2020 (r362253) +++ vendor/file/dist/configure Wed Jun 17 01:11:26 2020 (r362254) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.38. +# Generated by GNU Autoconf 2.69 for file 5.39. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.38' -PACKAGE_STRING='file 5.38' +PACKAGE_VERSION='5.39' +PACKAGE_STRING='file 5.39' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -1334,7 +1334,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.38 to adapt to many kinds of systems. +\`configure' configures file 5.39 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1404,7 +1404,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.38:";; + short | recursive ) echo "Configuration of file 5.39:";; esac cat <<\_ACEOF @@ -1524,7 +1524,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.38 +file configure 5.39 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2180,7 +2180,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.38, which was +It was created by file $as_me 5.39, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3046,7 +3046,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.38' + VERSION='5.39' cat >>confdefs.h <<_ACEOF @@ -15167,7 +15167,7 @@ $as_echo "#define XZLIBSUPPORT 1" >>confdefs.h fi -ac_config_files="$ac_config_files Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile libmagic.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -15712,7 +15712,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.38, which was +This file was extended by file $as_me 5.39, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15778,7 +15778,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.38 +file config.status 5.39 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -16199,6 +16199,7 @@ do "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; + "libmagic.pc") CONFIG_FILES="$CONFIG_FILES libmagic.pc" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac Modified: vendor/file/dist/configure.ac ============================================================================== --- vendor/file/dist/configure.ac Tue Jun 16 22:53:56 2020 (r362253) +++ vendor/file/dist/configure.ac Wed Jun 17 01:11:26 2020 (r362254) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.38],[christos@astron.com]) +AC_INIT([file],[5.39],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -217,5 +217,5 @@ if test "$ac_cv_header_lzma_h$ac_cv_lib_lzma_lzma_str AC_DEFINE([XZLIBSUPPORT], 1, [Enable xzlib compression support]) fi -AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile libmagic.pc]) AC_OUTPUT Modified: vendor/file/dist/doc/file.man ============================================================================== --- vendor/file/dist/doc/file.man Tue Jun 16 22:53:56 2020 (r362253) +++ vendor/file/dist/doc/file.man Wed Jun 17 01:11:26 2020 (r362254) @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.138 2019/10/15 18:00:40 christos Exp $ -.Dd July 13, 2019 +.\" $File: file.man,v 1.140 2020/06/07 17:41:07 christos Exp $ +.Dd June 7, 2020 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -10,6 +10,7 @@ .Bk -words .Op Fl bcdEhiklLNnprsSvzZ0 .Op Fl Fl apple +.Op Fl Fl exclude-quiet .Op Fl Fl extension .Op Fl Fl mime-encoding .Op Fl Fl mime-type @@ -229,6 +230,14 @@ the soft magic method. A synonym for .Sq ascii . .El +.It Fl Fl exclude-quiet +Like +.Fl Fl exclude +but ignore tests that +.Nm +does not know about. +This is intended for compatilibity with older versions of +.Nm . .It Fl Fl extension Print a slash-separated list of valid extensions for the file type found. .It Fl F , Fl Fl separator Ar separator @@ -326,13 +335,13 @@ never read them. Set various parameter limits. .Bl -column "elf_phnum" "Default" "XXXXXXXXXXXXXXXXXXXXXXXXXXX" -offset indent .It Sy "Name" Ta Sy "Default" Ta Sy "Explanation" -.It Li indir Ta 15 Ta recursion limit for indirect magic -.It Li name Ta 30 Ta use count limit for name/use magic +.It Li bytes Ta 1048576 Ta max number of bytes to read from file .It Li elf_notes Ta 256 Ta max ELF notes processed -.It Li elf_phnum Ta 128 Ta max ELF program sections processed +.It Li elf_phnum Ta 2048 Ta max ELF program sections processed .It Li elf_shnum Ta 32768 Ta max ELF sections processed +.It Li indir Ta 50 Ta recursion limit for indirect magic +.It Li name Ta 50 Ta use count limit for name/use magic .It Li regex Ta 8192 Ta length limit for regex searches -.It Li bytes Ta 1048576 Ta max number of bytes to read from file .El .It Fl r , Fl Fl raw Don't translate unprintable characters to \eooo. Modified: vendor/file/dist/doc/magic.man ============================================================================== --- vendor/file/dist/doc/magic.man Tue Jun 16 22:53:56 2020 (r362253) +++ vendor/file/dist/doc/magic.man Wed Jun 17 01:11:26 2020 (r362254) @@ -1,5 +1,5 @@ -.\" $File: magic.man,v 1.97 2019/11/15 21:03:14 christos Exp $ -.Dd January 21, 2019 +.\" $File: magic.man,v 1.98 2020/05/09 18:55:23 christos Exp $ +.Dd May 9, 2020 .Dt MAGIC __FSECTION__ .Os .\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems. @@ -300,6 +300,62 @@ This test is always true and clears the match flag for It is intended to be used with the .Dv default test. +.It Dv der +Parse the file as a DER Certificate file. +The test field is used as a der type that needs to be matched. +The DER types are: +.Dv eoc , +.Dv bool , +.Dv int , +.Dv bit_str , +.Dv octet_str , +.Dv null , +.Dv obj_id , +.Dv obj_desc , +.Dv ext , +.Dv real , +.Dv enum , +.Dv embed , +.Dv utf8_str , +.Dv rel_oid , +.Dv time , +.Dv res2 , +.Dv seq , +.Dv set , +.Dv num_str , +.Dv prt_str , +.Dv t61_str , +.Dv vid_str , +.Dv ia5_str , +.Dv utc_time , +.Dv gen_time , +.Dv gr_str , +.Dv vis_str , +.Dv gen_str , +.Dv univ_str , +.Dv char_str , +.Dv bmp_str , +.Dv date , +.Dv tod , +.Dv datetime , +.Dv duration , +.Dv oid-iri , +.Dv rel-oid-iri . +These types can be followed by an optional numeric size, which indicates +the field width in bytes. +.It Dv guid +A Globally Unique Identifier, parsed and printed as +XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. +It's format is a string. +.It Dv offset +This is a quad value indicating the current offset of the file. +It can be used to determine the size of the file or the magic buffer. +For example the magic entries: +.Bd -literal -offset indent +-0 offset x this file is %lld bytes +-0 offset <=100 must be more than 100 \e + bytes and is only %lld +.Ed .El .Pp For compatibility with the Single Added: vendor/file/dist/libmagic.pc.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/file/dist/libmagic.pc.in Wed Jun 17 01:11:26 2020 (r362254) @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libmagic +Description: Magic number recognition library +Version: @VERSION@ +Libs: -L${libdir} -lmagic +Libs.private: @LIBS@ Modified: vendor/file/dist/magic/Magdir/animation ============================================================================== --- vendor/file/dist/magic/Magdir/animation Tue Jun 16 22:53:56 2020 (r362253) +++ vendor/file/dist/magic/Magdir/animation Wed Jun 17 01:11:26 2020 (r362254) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: animation,v 1.74 2019/10/29 01:06:20 christos Exp $ +# $File: animation,v 1.77 2020/04/26 15:23:43 christos Exp $ # animation: file(1) magic for animation/movie formats # # animation formats @@ -159,7 +159,7 @@ >8 string mqt \b, Sony / Mobile QuickTime (.MQV) US Pat 7,477,830 !:mime video/quicktime >8 string MSNV \b, MPEG-4 (.MP4) for SonyPSP -!:mime audio/mp4 +!:mime video/mp4 >8 string NDAS \b, MP4 v2 [ISO 14496-14] Nero Digital AAC Audio !:mime audio/mp4 >8 string NDSC \b, MPEG-4 (.MP4) Nero Cinema Profile @@ -854,10 +854,6 @@ >4 byte ^0x01 (DV) movie file >3 byte &0x80 (PAL) >3 byte ^0x80 (NTSC) - -# Microsoft Advanced Streaming Format (ASF) -0 belong 0x3026b275 Microsoft ASF -!:mime video/x-ms-asf # MNG Video Format, 0 string \x8aMNG MNG video data, Modified: vendor/file/dist/magic/Magdir/archive ============================================================================== --- vendor/file/dist/magic/Magdir/archive Tue Jun 16 22:53:56 2020 (r362253) +++ vendor/file/dist/magic/Magdir/archive Wed Jun 17 01:11:26 2020 (r362254) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: archive,v 1.133 2019/11/15 21:03:14 christos Exp $ +# $File: archive,v 1.138 2020/06/07 23:29:26 christos Exp $ # archive: file(1) magic for archive formats (see also "msdos" for self- # extracting compressed archives) # @@ -236,7 +236,8 @@ !:ext deb/udeb >14 string -binary Debian binary package !:mime application/vnd.debian.binary-package -!:ext deb/udeb +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +!:ext deb/udeb/ipk # This should not happen >14 default x Unknown Debian package # NL terminated version; for most Debian cases this is 2.0 or 2.1 for splitted @@ -250,7 +251,16 @@ >>0 search/0x93e4f data.tar. \b, data compression # the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised # for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb ->>>&0 string x %.4s +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c # splitted debian package case >68 string =2.1\n # dpkg-1.18.25/dpkg-split/info.c @@ -1124,71 +1134,120 @@ # OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) # (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML >>50 string vnd.sun.xml. OpenOffice.org 1.x >>>62 string writer Writer >>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +!:ext sxw >>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +!:ext stw >>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +!:ext sxg >>>62 string calc Calc >>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +!:ext sxc >>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +!:ext stc >>>62 string draw Draw >>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +!:ext sxd >>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +!:ext std >>>62 string impress Impress >>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +!:ext sxi >>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +!:ext sti >>>62 string math Math document +!:mime application/vnd.sun.xml.math +!:ext sxm >>>62 string base Database file +!:mime application/vnd.sun.xml.base +!:ext sdb # OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument # https://lists.oasis-open.org/archives/office/200505/msg00006.html # (mimetype contains "application/vnd.oasis.opendocument.") >>50 string vnd.oasis.opendocument. OpenDocument >>>73 string text >>>>77 byte !0x2d Text !:mime application/vnd.oasis.opendocument.text +!:ext odt >>>>77 string -template Text Template !:mime application/vnd.oasis.opendocument.text-template +!:ext ott >>>>77 string -web HTML Document Template !:mime application/vnd.oasis.opendocument.text-web +!:ext oth >>>>77 string -master Master Document !:mime application/vnd.oasis.opendocument.text-master +!:ext odm >>>73 string graphics >>>>81 byte !0x2d Drawing !:mime application/vnd.oasis.opendocument.graphics ->>>>81 string -template Template +!:ext odg +>>>>81 string -template Drawing Template !:mime application/vnd.oasis.opendocument.graphics-template +!:ext otg >>>73 string presentation >>>>85 byte !0x2d Presentation !:mime application/vnd.oasis.opendocument.presentation ->>>>85 string -template Template +!:ext odp +>>>>85 string -template Presentation Template !:mime application/vnd.oasis.opendocument.presentation-template +!:ext otp >>>73 string spreadsheet >>>>84 byte !0x2d Spreadsheet !:mime application/vnd.oasis.opendocument.spreadsheet ->>>>84 string -template Template +!:ext ods +>>>>84 string -template Spreadsheet Template !:mime application/vnd.oasis.opendocument.spreadsheet-template +!:ext ots >>>73 string chart >>>>78 byte !0x2d Chart !:mime application/vnd.oasis.opendocument.chart ->>>>78 string -template Template +!:ext odc +>>>>78 string -template Chart Template !:mime application/vnd.oasis.opendocument.chart-template +!:ext otc >>>73 string formula >>>>80 byte !0x2d Formula !:mime application/vnd.oasis.opendocument.formula ->>>>80 string -template Template +!:ext odf +>>>>80 string -template Formula Template !:mime application/vnd.oasis.opendocument.formula-template +!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml >>>73 string database Database !:mime application/vnd.oasis.opendocument.database +!:ext odb # Valid for LibreOffice Base 6.0.1.1 at least >>>73 string base Database -!:mime application/vnd.oasis.opendocument.base +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +!:ext odb >>>73 string image >>>>78 byte !0x2d Image !:mime application/vnd.oasis.opendocument.image ->>>>78 string -template Template +!:ext odi +>>>>78 string -template Image Template !:mime application/vnd.oasis.opendocument.image-template +!:ext oti # EPUB (OEBPS) books using OCF (OEBPS Container Format) # https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. @@ -1206,12 +1265,33 @@ >>>62 string draw.template+zip Draw template, version 14-16 !:mime application/x-vnd.corel.draw.template+zip !:ext cdrt ->>>62 string zcf.draw.document+zip Draw drawing, version 17-21 +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 !:mime application/x-vnd.corel.zcf.draw.document+zip !:ext cdr ->>>62 string zcf.draw.template+zip Draw template, version 17-21 +>>>62 string zcf.draw.template+zip Draw template, version 17-22 !:mime application/x-vnd.corel.zcf.draw.template+zip !:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +!:ext csl # Catch other ZIP-with-mimetype formats # In a ZIP file, the bytes immediately after a member's contents are @@ -1239,16 +1319,19 @@ >>>>38 search/64 .app/ iOS App !:mime application/x-ios-app +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip # Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) # Next line excludes specialized formats: >(26.s+30) leshort !0xcafe ->>26 string !\x8\0\0\0mimetype Zip archive data +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data !:mime application/zip ->>>4 beshort x \b, at least ->>>4 use zipversion ->>>4 beshort x to extract ->>>0x161 string WINZIP \b, WinZIP self-extracting +>>>>4 beshort x \b, at least +>>>>4 use zipversion +>>>>4 beshort x to extract +>>>>0x161 string WINZIP \b, WinZIP self-extracting # StarView Metafile # From Pierre Ducroquet Added: vendor/file/dist/magic/Magdir/asf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/file/dist/magic/Magdir/asf Wed Jun 17 01:11:26 2020 (r362254) @@ -0,0 +1,132 @@ + +#------------------------------------------------------------------------------ +# $File: asf,v 1.1 2019/12/26 02:07:53 christos Exp $ +# asf: file(1) magic for Microsoft Advanced Systems Format (ASF) files +# http://www.staroceans.org/e-book/ASF_Specification.pdf + +0 name asf-name +# ASF_Data_Object +#>0 guid 75B22636-668E-11CF-A6D9-00AA0062CE6C +#>16 lequad >0 +#>>(16.q) use asf-object +# ASF_Simple_Index_Object +>0 guid 33000890-E5B1-11CF-89F4-00A0C90349CB +>0 guid D6E229D3-35DA-11D1-9034-00A0C90349BE ASF_Index_Object +>0 guid FEB103F8-12AD-4C64-840F-2A1D2F7AD48C ASF_Media_Object_Index_Object +>0 guid 3CB73FD0-0C4A-4803-953D-EDF7B6228F0C ASF_Timecode_Index_Object + +# ASF_File_Properties_Object +>0 guid 8CABDCA1-A947-11CF-8EE4-00C00C205365 + +# ASF_Stream_Properties_Object +>0 guid B7DC0791-A9B7-11CF-8EE6-00C00C205365 +#>>56 lequad x Time Offset %lld +#>>64 lelong x Type-Specicic Data Length %d +#>>68 lelong x Error Correction Data Length %d +#>>72 leshort x Flags 0x%x +#>>74 lelong x Reserved %x +# ASF_Audio_Media +>>24 guid F8699E40-5B4D-11CF-A8FD-00805F5C442B \b, Audio Media ( +>>>78 leshort x \bCodec Id %d +>>>80 leshort x \b, Number of channels %d +>>>82 lelong x \b, Samples Per Second %d +>>>86 lelong x \b, Average Number of Bytes Per Second %d +>>>90 lelong x \b, Block Alignment %d +>>>94 leshort x \b, Bits Per Sample %d +# ASF_Video_Media +>>24 guid BC19EFC0-5B4D-11CF-A8FD-00805F5C442B \b, Video Media ( +>>>78 lelong x \bEncoded Image Width %d +>>>82 lelong x \b, Encoded Image Height %d +#>>>85 leshort x \b, Format Data Size %x +>>>93 lelong x \b, Image Width %d +>>>97 lelong x \b, Image Height %d +#>>>101 leshort x \b, Reserved 0x%x +>>>103 leshort x \b, Bits Per Pixel Count %d +#>>>105 lelong x \b, Compression ID %d +#>>>109 lelong x \b, Image Size %d +#>>>113 lelong x \b, Horizontal Pixels Per Meter %d +#>>>117 lelong x \b, Vertical Pixels Per Meter %d +#>>>121 lelong x \b, Colors Used Count %d +#>>>125 lelong x \b, Important Colors Count %d +>>0 lelong x \b, Error correction type +>>40 use asf-name +>>0 lelong x \b) +#ASF_Header_Extension_Object +>0 guid 5FBF03B5-A92E-11CF-8EE3-00C00C205365 +# ASF_Codec_List_Object +>0 guid 86D15240-311D-11D0-A3A4-00A0C90348F6 +>0 guid 1EFB1A30-0B62-11D0-A39B-00A0C90348F6 ASF_Script_Command_Object +>0 guid F487CD01-A951-11CF-8EE6-00C00C205365 ASF_Marker_Object +>0 guid D6E229DC-35DA-11D1-9034-00A0C90349BE ASF_Bitrate_Mutual_Exclusion_Object +>0 guid 75B22635-668E-11CF-A6D9-00AA0062CE6C ASF_Error_Correction_Object +# ASF_Content_Description_Object +>0 guid 75B22633-668E-11CF-A6D9-00AA0062CE6C +#>>24 leshort title length %d +#>>26 leshort author length %d +#>>28 leshort copyright length %d +#>>30 leshort descriptor length %d +#>>32 leshort rating length %d +>0 guid D2D0A440-E307-11D2-97F0-00A0C95EA850 ASF_Extended_Content_Description_Object +>0 guid 2211B3FA-BD23-11D2-B4B7-00A0C955FC6E ASF_Content_Branding_Object +>0 guid 7BF875CE-468D-11D1-8D82-006097C9A2B2 ASF_Stream_Bitrate_Properties_Object +>0 guid 2211B3FB-BD23-11D2-B4B7-00A0C955FC6E ASF_Content_Encryption_Object +>0 guid 298AE614-2622-4C17-B935-DAE07EE9289C ASF_Extended_Content_Encryption_Object +>0 guid 2211B3FC-BD23-11D2-B4B7-00A0C955FC6E ASF_Digital_Signature_Object +# ASF_Padding_Object +>0 guid 1806D474-CADF-4509-A4BA-9AABCB96AAE8 +>0 guid 14E6A5CB-C672-4332-8399-A96952065B5A ASF_Extended_Stream_Properties_Object +>0 guid A08649CF-4775-4670-8A16-6E35357566CD ASF_Advanced_Mutual_Exclusion_Object +>0 guid D1465A40-5A79-4338-B71B-E36B8FD6C249 ASF_Group_Mutual_Exclusion_Object +>0 guid D4FED15B-88D3-454F-81F0-ED5C45999E24 ASF_Stream_Prioritization_Object +>0 guid A69609E6-517B-11D2-B6AF-00C04FD908E9 ASF_Bandwidth_Sharing_Object +>0 guid 7C4346A9-EFE0-4BFC-B229-393EDE415C85 ASF_Language_List_Object +>0 guid C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA ASF_Metadata_Object +>0 guid 44231C94-9498-49D1-A141-1D134E457054 ASF_Metadata_Library_Object +>0 guid D6E229DF-35DA-11D1-9034-00A0C90349BE ASF_Index_Parameters_Object +>0 guid 6B203BAD-3F11-48E4-ACA8-D7613DE2CFA7 ASF_Media_Object_Index_Parameters_Object +>0 guid F55E496D-9797-4B5D-8C8B-604DFE9BFB24 ASF_Timecode_Index_Parameters_Object +>0 guid 26F18B5D-4584-47EC-9F5F-0E651F0452C9 ASF_Compatibility_Object +>0 guid 43058533-6981-49E6-9B74-AD12CB86D58C ASF_Advanced_Content_Encryption_Object +>0 guid 59DACFC0-59E6-11D0-A3AC-00A0C90348F6 ASF_Command_Media +>0 guid B61BE100-5B4E-11CF-A8FD-00805F5C44 ASF_JFIF_Media +>0 guid 35907DE0-E415-11CF-A917-00805F5C442B ASF_Degradable_JPEG_Media +>0 guid 91BD222C-F21C-497A-8B6D-5AA86BFC0185 ASF_File_Transfer_Media +>0 guid 3AFB65E2-47EF-40F2-AC2C-70A90D71D343 ASF_Binary_Media +>0 guid 776257D4-C627-41CB-8F81-7AC7FF1C40CC ASF_Web_Stream_Media_Subtype +>0 guid DA1E6B13-8359-4050-B398-388E965BF00C ASF_Web_Stream_Format +>0 guid 20FB5700-5B55-11CF-A8FD-00805F5C442B ASF_No_Error_Correction +>0 guid BFC3CD50-618F-11CF-8BB2-00AA00B4E220 ASF_Audio_Spread +>0 guid ABD3D211-A9BA-11cf-8EE6-00C00C205365 ASF_Reserved_1 +>0 guid 7A079BB6-DAA4-4e12-A5CA-91D38DC11A8D ASF_Content_Encryption_System_Windows_Media_DRM +# _Network_Devices +>0 guid 86D15241-311D-11D0-A3A4-00A0C90348F6 ASF_Reserved_2 +>0 guid 4B1ACBE3-100B-11D0-A39B-00A0C90348F6 ASF_Reserved_3 +>0 guid 4CFEDB20-75F6-11CF-9C0F-00A0C90349CB ASF_Reserved_4 +>0 guid D6E22A00-35DA-11D1-9034-00A0C90349BE ASF_Mutex_Language +>0 guid D6E22A01-35DA-11D1-9034-00A0C90349BE ASF_Mutex_Bitrate +>0 guid D6E22A02-35DA-11D1-9034-00A0C90349BE ASF_Mutex_Unknown +>0 guid AF6060AA-5197-11D2-B6AF-00C04FD908E9 ASF_Bandwidth_Sharing_Exclusive +>0 guid AF6060AB-5197-11D2-B6AF-00C04FD908E9 ASF_Bandwidth_Sharing_Partial +>0 guid 399595EC-8667-4E2D-8FDB-98814CE76C1E ASF_Payload_Extension_System_Timecode +>0 guid E165EC0E-19ED-45D7-B4A7-25CBD1E28E9B ASF_Payload_Extension_System_File_Name +>0 guid D590DC20-07BC-436C-9CF7-F3BBFBF1A4DC ASF_Payload_Extension_System_Content_Type +>0 guid 1B1EE554-F9EA-4BC8-821A-376B74E4C4B8 ASF_Payload_Extension_System_Pixel_Aspect_Ratio +>0 guid C6BD9450-867F-4907-83A3-C77921B733AD ASF_Payload_Extension_System_Sample_Duration +>0 guid 6698B84E-0AFA-4330-AEB2-1C0A98D7A44D ASF_Payload_Extension_System_Encryption_Sample_ID +>0 guid 00E1AF06-7BEC-11D1-A582-00C04FC29CFB ASF_Payload_Extension_System_Degradable_JPEG + +0 name asf-object +>0 use asf-name +#>>16 lequad >0 (size %lld) [ +>>16 lequad >0 +>>>(16.q) use asf-object +#>>16 lequad 0 ] + +# Microsoft Advanced Streaming Format (ASF) +0 guid 75B22630-668E-11CF-A6D9-00AA0062CE6C Microsoft ASF +!:mime video/x-ms-asf +#>16 lequad >0 (size %lld +#>>24 lelong x \b, %d header objects) +>16 lequad >0 +>>30 use asf-object +>>(16.q) use asf-object Modified: vendor/file/dist/magic/Magdir/cad ============================================================================== --- vendor/file/dist/magic/Magdir/cad Tue Jun 16 22:53:56 2020 (r362253) +++ vendor/file/dist/magic/Magdir/cad Wed Jun 17 01:11:26 2020 (r362254) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: cad,v 1.20 2019/08/10 13:34:17 christos Exp $ +# $File: cad,v 1.23 2020/05/30 23:58:07 christos Exp $ # autocad: file(1) magic for cad files # @@ -229,9 +229,13 @@ !:mime image/vnd.dwg 0 string AC1024 DWG AutoDesk AutoCAD 2010/2011/2012 !:mime image/vnd.dwg -0 string AC1027 DWG AutoDesk AutoCAD 2013/2014 +0 string AC1027 DWG AutoDesk AutoCAD 2013-2017 !:mime image/vnd.dwg +# From GNU LibreDWG +0 string AC1032 DWG AutoDesk AutoCAD 2018/2019 +!:mime image/vnd.dwg + # KOMPAS 2D drawing from ASCON # This is KOMPAS 2D drawing or fragment of drawing but is not detailed nor # gathered nor specification @@ -315,3 +319,6 @@ 0 string \xff\xfe\xff\x0e\x53\x00\x6b\x00\x65\x00\x74\x00\x63\x00\x68\x00\x55\x00\x70\x00\x20\x00\x4d\x00\x6f\x00\x64\x00\x65\x00\x6c\x00 SketchUp Model !:mime application/vnd.sketchup.skp !:ext skp + +4 regex/b P[0-9][0-9]\\.[0-9][0-9][0-9][0-9]\\.[0-9][0-9][0-9][0-9]\\.[0-9] NAXOS CAD System file from version %s +!:strength +40 Modified: vendor/file/dist/magic/Magdir/commands ============================================================================== --- vendor/file/dist/magic/Magdir/commands Tue Jun 16 22:53:56 2020 (r362253) +++ vendor/file/dist/magic/Magdir/commands Wed Jun 17 01:11:26 2020 (r362254) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: commands,v 1.61 2019/10/30 03:16:43 christos Exp $ +# $File: commands,v 1.63 2020/06/06 15:36:30 christos Exp $ # commands: file(1) magic for various shells and interpreters # #0 string/w : shell archive or script for antique kernel text @@ -83,6 +83,30 @@ !:mime text/x-shellscript 0 string/wt #!\ /usr/bin/env\ bash Bourne-Again shell script text executable !:mime text/x-shellscript + +# Fish shell magic +# From: Benjamin Lowry +0 string/wt #!\ /usr/local/bin/fish fish shell script text executable +!:mime text/x-shellscript +0 string/wt #!\ /usr/bin/fish fish shell script text executable +!:mime text/x-shellscript +0 string/wt #!\ /usr/bin/env\ fish fish shell script text executable +!:mime text/x-shellscript + + +0 search/1/wt #!\ /usr/bin/tclsh Tcl/Tk script text executable +!:mime text/x-tcl + +0 search/1/wt #!\ /usr/bin/texlua LuaTex script text executable +!:mime text/x-luatex + +0 search/1/wt #!\ /usr/bin/luatex LuaTex script text executable +!:mime text/x-luatex + +0 search/1/wt #!\ /usr/bin/stap Systemtap script text executable +!:mime text/x-systemtap + + # PHP scripts # Ulf Harnhammar Modified: vendor/file/dist/magic/Magdir/compress ============================================================================== --- vendor/file/dist/magic/Magdir/compress Tue Jun 16 22:53:56 2020 (r362253) +++ vendor/file/dist/magic/Magdir/compress Wed Jun 17 01:11:26 2020 (r362254) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: compress,v 1.77 2019/10/08 20:25:13 christos Exp $ +# $File: compress,v 1.79 2020/05/30 23:53:04 christos Exp $ # compress: file(1) magic for pure-compression formats (no archives) # # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. @@ -61,7 +61,9 @@ !:mime application/gzip >>>0 use gzip-info # size of the original (uncompressed) input data modulo 2^32 +>>-0 offset >48 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Wed Jun 17 01:11:47 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C407B33BE65; Wed, 17 Jun 2020 01:11:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mn8g4Vf1z43Df; Wed, 17 Jun 2020 01:11:47 +0000 (UTC) (envelope-from delphij@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B88C1861E; Wed, 17 Jun 2020 01:11:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05H1BlEt032507; Wed, 17 Jun 2020 01:11:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05H1BlPM032506; Wed, 17 Jun 2020 01:11:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202006170111.05H1BlPM032506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 17 Jun 2020 01:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362255 - vendor/file/5.39 X-SVN-Group: vendor X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: vendor/file/5.39 X-SVN-Commit-Revision: 362255 X-SVN-Commit-Repository: base 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.33 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, 17 Jun 2020 01:11:47 -0000 Author: delphij Date: Wed Jun 17 01:11:47 2020 New Revision: 362255 URL: https://svnweb.freebsd.org/changeset/base/362255 Log: Tag file 5.39. Added: vendor/file/5.39/ - copied from r362254, vendor/file/dist/ From owner-svn-src-vendor@freebsd.org Wed Jun 17 19:57:20 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44F6E3338CA; Wed, 17 Jun 2020 19:57:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nG7N0cmwz4Pr4; Wed, 17 Jun 2020 19:57:20 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1001C25812; Wed, 17 Jun 2020 19:57:20 +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 05HJvKea032248; Wed, 17 Jun 2020 19:57:20 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05HJvJvM032245; Wed, 17 Jun 2020 19:57:19 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202006171957.05HJvJvM032245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 17 Jun 2020 19:57:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362286 - in vendor/flex: . dist dist/src X-SVN-Group: vendor X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor/flex: . dist dist/src X-SVN-Commit-Revision: 362286 X-SVN-Commit-Repository: base 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.33 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, 17 Jun 2020 19:57:20 -0000 Author: jkim Date: Wed Jun 17 19:57:19 2020 New Revision: 362286 URL: https://svnweb.freebsd.org/changeset/base/362286 Log: Import flex 2.6.4. Added: vendor/flex/dist/README.md vendor/flex/dist/configure.ac vendor/flex/dist/src/ vendor/flex/dist/src/FlexLexer.h - copied, changed from r362285, vendor/flex/dist/FlexLexer.h vendor/flex/dist/src/Makefile.am vendor/flex/dist/src/Makefile.in vendor/flex/dist/src/buf.c - copied, changed from r362285, vendor/flex/dist/buf.c vendor/flex/dist/src/ccl.c - copied, changed from r362285, vendor/flex/dist/ccl.c vendor/flex/dist/src/config.h.in vendor/flex/dist/src/dfa.c - copied, changed from r362285, vendor/flex/dist/dfa.c vendor/flex/dist/src/ecs.c - copied, changed from r362285, vendor/flex/dist/ecs.c vendor/flex/dist/src/filter.c - copied, changed from r362285, vendor/flex/dist/filter.c vendor/flex/dist/src/flex.skl - copied, changed from r362285, vendor/flex/dist/flex.skl vendor/flex/dist/src/flexdef.h - copied, changed from r362285, vendor/flex/dist/flexdef.h vendor/flex/dist/src/flexint.h - copied, changed from r362285, vendor/flex/dist/flexint.h vendor/flex/dist/src/gen.c - copied, changed from r362285, vendor/flex/dist/gen.c vendor/flex/dist/src/gettext.h - copied unchanged from r362285, vendor/flex/dist/gettext.h vendor/flex/dist/src/libmain.c - copied, changed from r362285, vendor/flex/dist/libmain.c vendor/flex/dist/src/libyywrap.c - copied, changed from r362285, vendor/flex/dist/libyywrap.c vendor/flex/dist/src/main.c - copied, changed from r362285, vendor/flex/dist/main.c vendor/flex/dist/src/misc.c - copied, changed from r362285, vendor/flex/dist/misc.c vendor/flex/dist/src/mkskel.sh - copied, changed from r362285, vendor/flex/dist/mkskel.sh vendor/flex/dist/src/nfa.c - copied, changed from r362285, vendor/flex/dist/nfa.c vendor/flex/dist/src/options.c - copied, changed from r362285, vendor/flex/dist/options.c vendor/flex/dist/src/options.h - copied, changed from r362285, vendor/flex/dist/options.h vendor/flex/dist/src/parse.c - copied, changed from r362285, vendor/flex/dist/parse.c vendor/flex/dist/src/parse.h - copied, changed from r362285, vendor/flex/dist/parse.h vendor/flex/dist/src/parse.y - copied, changed from r362285, vendor/flex/dist/parse.y vendor/flex/dist/src/regex.c - copied, changed from r362285, vendor/flex/dist/regex.c vendor/flex/dist/src/scan.c - copied, changed from r362285, vendor/flex/dist/scan.c vendor/flex/dist/src/scan.l - copied, changed from r362285, vendor/flex/dist/scan.l vendor/flex/dist/src/scanflags.c - copied, changed from r362285, vendor/flex/dist/scanflags.c vendor/flex/dist/src/scanopt.c - copied, changed from r362285, vendor/flex/dist/scanopt.c vendor/flex/dist/src/scanopt.h - copied, changed from r362285, vendor/flex/dist/scanopt.h vendor/flex/dist/src/skel.c - copied, changed from r362285, vendor/flex/dist/skel.c vendor/flex/dist/src/sym.c - copied, changed from r362285, vendor/flex/dist/sym.c vendor/flex/dist/src/tables.c - copied, changed from r362285, vendor/flex/dist/tables.c vendor/flex/dist/src/tables.h - copied, changed from r362285, vendor/flex/dist/tables.h vendor/flex/dist/src/tables_shared.c - copied, changed from r362285, vendor/flex/dist/tables_shared.c vendor/flex/dist/src/tables_shared.h - copied unchanged from r362285, vendor/flex/dist/tables_shared.h vendor/flex/dist/src/tblcmp.c - copied, changed from r362285, vendor/flex/dist/tblcmp.c vendor/flex/dist/src/version.h - copied unchanged from r362285, vendor/flex/dist/version.h vendor/flex/dist/src/yylex.c - copied, changed from r362285, vendor/flex/dist/yylex.c Deleted: vendor/flex/dist/FlexLexer.h vendor/flex/dist/INSTALL vendor/flex/dist/README vendor/flex/dist/README-alpha vendor/flex/dist/README.cvs vendor/flex/dist/TODO vendor/flex/dist/buf.c vendor/flex/dist/ccl.c vendor/flex/dist/compile vendor/flex/dist/conf.in vendor/flex/dist/config.guess vendor/flex/dist/config.rpath vendor/flex/dist/config.sub vendor/flex/dist/configure.in vendor/flex/dist/depcomp vendor/flex/dist/dfa.c vendor/flex/dist/ecs.c vendor/flex/dist/filter.c vendor/flex/dist/flex.skl vendor/flex/dist/flexdef.h vendor/flex/dist/flexint.h vendor/flex/dist/gen.c vendor/flex/dist/gettext.h vendor/flex/dist/install-sh vendor/flex/dist/libmain.c vendor/flex/dist/libyywrap.c vendor/flex/dist/main.c vendor/flex/dist/misc.c vendor/flex/dist/missing vendor/flex/dist/mkinstalldirs vendor/flex/dist/mkskel.sh vendor/flex/dist/nfa.c vendor/flex/dist/options.c vendor/flex/dist/options.h vendor/flex/dist/parse.c vendor/flex/dist/parse.h vendor/flex/dist/parse.y vendor/flex/dist/regex.c vendor/flex/dist/scan.c vendor/flex/dist/scan.l vendor/flex/dist/scanflags.c vendor/flex/dist/scanopt.c vendor/flex/dist/scanopt.h vendor/flex/dist/skel.c vendor/flex/dist/sym.c vendor/flex/dist/tables.c vendor/flex/dist/tables.h vendor/flex/dist/tables_shared.c vendor/flex/dist/tables_shared.h vendor/flex/dist/tblcmp.c vendor/flex/dist/version.h vendor/flex/dist/ylwrap vendor/flex/dist/yylex.c Modified: vendor/flex/FREEBSD-Xlist vendor/flex/dist/ABOUT-NLS vendor/flex/dist/ChangeLog vendor/flex/dist/Makefile.am vendor/flex/dist/Makefile.in vendor/flex/dist/NEWS vendor/flex/dist/autogen.sh vendor/flex/dist/configure Modified: vendor/flex/FREEBSD-Xlist ============================================================================== --- vendor/flex/FREEBSD-Xlist Wed Jun 17 19:56:17 2020 (r362285) +++ vendor/flex/FREEBSD-Xlist Wed Jun 17 19:57:19 2020 (r362286) @@ -1,3 +1,4 @@ +*/build-aux */doc */examples */lib Modified: vendor/flex/dist/ABOUT-NLS ============================================================================== --- vendor/flex/dist/ABOUT-NLS Wed Jun 17 19:56:17 2020 (r362285) +++ vendor/flex/dist/ABOUT-NLS Wed Jun 17 19:57:19 2020 (r362286) @@ -1,10 +1,11 @@ -Notes on the Free Translation Project -************************************* +1 Notes on the Free Translation Project +*************************************** - Free software is going international! The Free Translation Project -is a way to get maintainers of free software, translators, and users all -together, so that will gradually become able to speak many languages. -A few packages already provide translations for their messages. +Free software is going international! The Free Translation Project is +a way to get maintainers of free software, translators, and users all +together, so that free software will gradually become able to speak many +languages. A few packages already provide translations for their +messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, @@ -15,17 +16,17 @@ this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and -work at translations should contact the appropriate team. +work on translations can contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. -Quick configuration advice -========================== +1.1 Quick configuration advice +============================== - If you want to exploit the full power of internationalization, you +If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext @@ -45,37 +46,37 @@ to change to GNU `gettext' as soon as possible. you have installed a recent copy of the GNU gettext package with the included `libintl'. -INSTALL Matters -=============== +1.2 INSTALL Matters +=================== - Some packages are "localizable" when properly installed; the -programs they contain can be made to speak your own native language. -Most such packages use GNU `gettext'. Other packages have their own -ways to internationalization, predating GNU `gettext'. +Some packages are "localizable" when properly installed; the programs +they contain can be made to speak your own native language. Most such +packages use GNU `gettext'. Other packages have their own ways to +internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already -provides the GNU `gettext' functions. If not, the GNU `gettext' own -library will be used. This library is wholly contained within this -package, usually in the `intl/' subdirectory, so prior installation of -the GNU `gettext' package is _not_ required. Installers may use -special options at configuration time for changing the default -behaviour. The commands: +provides the GNU `gettext' functions. If not, the included GNU +`gettext' library will be used. This library is wholly contained +within this package, usually in the `intl/' subdirectory, so prior +installation of the GNU `gettext' package is _not_ required. +Installers may use special options at configuration time for changing +the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls -will respectively bypass any pre-existing `gettext' to use the +will, respectively, bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and -will decide to use this. This might be not what is desirable. You -should use the more recent version of the GNU `gettext' library. I.e. -if the file `intl/VERSION' shows that the library which comes with this -package is more recent, you should use +will decide to use this. This might not be desirable. You should use +the more recent version of the GNU `gettext' library. I.e. if the file +`intl/VERSION' shows that the library which comes with this package is +more recent, you should use ./configure --with-included-gettext @@ -86,7 +87,7 @@ and therefore it will not be used. The reason is that emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. - Internationalized packages have usually many `po/LL.po' files, where + Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed @@ -95,13 +96,16 @@ may be set, prior to configuration, to limit the insta `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. -Using This Package -================== +1.3 Using This Package +====================== - As a user, if your language has been installed for this package, you +As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate -`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, -and `CC' is an ISO 3166 two-letter country code. For example, let's +`LL_CC' combination. If you happen to have the `LC_ALL' or some other +`LC_xxx' environment variables set, you should unset them before +setting `LANG', otherwise the setting of `LANG' will not have the +desired effect. Here `LL' is an ISO 639 two-letter language code, and +`CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). @@ -117,8 +121,8 @@ country code serves to distinguish the dialects. language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of -locales supported by your system for your country by running the command -`locale -a | grep '^LL''. +locales supported by your system for your language by running the +command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you @@ -131,22 +135,28 @@ system libraries. For example, some Swedish users who read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from `no' to `nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under `nb' and some older ones under `no', it's recommended +for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and +older translations are used. + In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. -Translating Teams -================= +1.4 Translating Teams +===================== - For the Free Translation Project to be a success, we need interested +For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, -`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" -area. +`http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. @@ -160,434 +170,1126 @@ message to `sv-request@li.org', having this message bo _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to -get started, please write to `translation@iro.umontreal.ca' to reach the -coordinator for all translator teams. +get started, please write to `coordinator@translationproject.org' to +reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing -the terminology in use. Proven linguistic skill are praised more than -programming skill, here. +the terminology in use. Proven linguistic skills are praised more than +programming skills, here. -Available Packages -================== +1.5 Available Packages +====================== - Languages are not equally supported in all packages. The following -matrix shows the current state of internationalization, as of May 2003. +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of May 2010. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. - Ready PO files am az be bg ca cs da de el en en_GB eo es - +-------------------------------------------+ - a2ps | [] [] [] [] | - aegis | () | - anubis | | - ap-utils | | - bash | [] [] [] | - batchelor | | - bfd | [] [] | - binutils | [] [] | - bison | [] [] [] | - bluez-pin | [] [] | - clisp | | - clisp | [] [] [] | - coreutils | [] [] [] [] | - cpio | [] [] [] | - darkstat | () [] | - diffutils | [] [] [] [] [] [] [] | - e2fsprogs | [] [] | - enscript | [] [] [] [] | - error | [] [] [] [] [] | - fetchmail | [] () [] [] [] [] | - fileutils | [] [] [] | - findutils | [] [] [] [] [] [] | - flex | [] [] [] [] | - gas | [] | - gawk | [] [] [] [] | - gcal | [] | - gcc | [] [] | - gettext | [] [] [] [] [] | - gettext-runtime | [] [] [] [] [] | - gettext-tools | [] [] | - gimp-print | [] [] [] [] [] | - gliv | | - glunarclock | [] [] [] | - gnucash | () [] | - gnucash-glossary | [] () [] | - gnupg | [] () [] [] [] [] | - gpe-calendar | [] | - gpe-conf | [] | - gpe-contacts | [] | - gpe-edit | | - gpe-login | [] | - gpe-ownerinfo | [] | - gpe-sketchbook | [] | - gpe-timesheet | | - gpe-today | [] | - gpe-todo | [] | - gphoto2 | [] [] [] [] | - gprof | [] [] | - gpsdrive | () () () | - grep | [] [] [] [] [] | - gretl | [] | - hello | [] [] [] [] [] [] | - id-utils | [] [] | - indent | [] [] [] [] | - jpilot | [] [] [] [] | - jwhois | [] | - kbd | [] [] [] [] [] | - ld | [] [] | - libc | [] [] [] [] [] [] | - libgpewidget | [] | - libiconv | [] [] [] [] [] | - lifelines | [] () | - lilypond | [] | - lingoteach | | - lingoteach_lessons | () () | - lynx | [] [] [] [] | - m4 | [] [] [] [] | - mailutils | [] [] | - make | [] [] [] | - man-db | [] () [] [] () | - mysecretdiary | [] [] [] | - nano | [] () [] [] [] | - nano_1_0 | [] () [] [] [] | - opcodes | [] [] | - parted | [] [] [] [] [] | - ptx | [] [] [] [] [] | - python | | - radius | | - recode | [] [] [] [] [] [] | - screem | | - sed | [] [] [] [] [] | - sh-utils | [] [] [] | - sharutils | [] [] [] [] [] [] | - sketch | [] () [] | - soundtracker | [] [] [] | - sp | [] | - tar | [] [] [] [] | - texinfo | [] [] [] [] | - textutils | [] [] [] [] | - tin | () () | - util-linux | [] [] [] [] [] | - vorbis-tools | [] [] [] | - wastesedge | () | - wdiff | [] [] [] [] | - wget | [] [] [] [] [] [] [] | - xchat | [] [] [] | - xpad | | - +-------------------------------------------+ - am az be bg ca cs da de el en en_GB eo es - 0 1 4 2 31 17 54 60 14 1 4 12 56 - - et fa fi fr ga gl he hr hu id it ja ko - +----------------------------------------+ - a2ps | [] [] [] () () | - aegis | | - anubis | [] | - ap-utils | [] | - bash | [] [] | - batchelor | [] | - bfd | [] [] | - binutils | [] [] | - bison | [] [] [] [] | - bluez-pin | [] [] [] [] | - clisp | | - clisp | [] | - coreutils | [] [] [] [] | - cpio | [] [] [] [] | - darkstat | () [] [] [] | - diffutils | [] [] [] [] [] [] [] | - e2fsprogs | | - enscript | [] [] | - error | [] [] [] [] | - fetchmail | [] | - fileutils | [] [] [] [] [] | - findutils | [] [] [] [] [] [] [] [] [] [] [] | - flex | [] [] | - gas | [] | - gawk | [] [] | - gcal | [] | - gcc | [] | - gettext | [] [] [] | - gettext-runtime | [] [] [] [] | - gettext-tools | [] | - gimp-print | [] [] | - gliv | () | - glunarclock | [] [] [] [] | - gnucash | [] | - gnucash-glossary | [] | - gnupg | [] [] [] [] [] [] [] | - gpe-calendar | [] | - gpe-conf | | - gpe-contacts | [] | - gpe-edit | [] [] | - gpe-login | [] | - gpe-ownerinfo | [] [] [] | - gpe-sketchbook | [] | - gpe-timesheet | [] [] [] | - gpe-today | [] [] | - gpe-todo | [] [] | - gphoto2 | [] [] [] | - gprof | [] [] | - gpsdrive | () [] () () | - grep | [] [] [] [] [] [] [] [] [] [] [] | - gretl | [] | - hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | - id-utils | [] [] [] | - indent | [] [] [] [] [] [] [] [] | - jpilot | [] () | - jwhois | [] [] [] [] | - kbd | [] | - ld | [] | - libc | [] [] [] [] [] [] | - libgpewidget | [] [] [] | - libiconv | [] [] [] [] [] [] [] [] | - lifelines | () | - lilypond | [] | - lingoteach | [] [] | - lingoteach_lessons | | - lynx | [] [] [] [] | - m4 | [] [] [] [] | - mailutils | | - make | [] [] [] [] [] [] | - man-db | [] () () | - mysecretdiary | [] [] | - nano | [] [] [] [] | - nano_1_0 | [] [] [] [] | - opcodes | [] [] | - parted | [] [] [] | - ptx | [] [] [] [] [] [] [] | - python | | - radius | | - recode | [] [] [] [] [] [] | - screem | | - sed | [] [] [] [] [] [] [] [] | - sh-utils | [] [] [] [] [] [] | - sharutils | [] [] [] [] [] | - sketch | [] | - soundtracker | [] [] [] | - sp | [] () | - tar | [] [] [] [] [] [] [] [] [] | - texinfo | [] [] [] [] | - textutils | [] [] [] [] [] | - tin | [] () | - util-linux | [] [] [] [] () [] | - vorbis-tools | [] | - wastesedge | () | - wdiff | [] [] [] [] [] | - wget | [] [] [] [] [] [] [] [] | - xchat | [] [] [] | - xpad | | - +----------------------------------------+ - et fa fi fr ga gl he hr hu id it ja ko - 20 1 15 73 14 24 8 10 30 31 19 31 9 - - lg lt lv ms nb nl nn no pl pt pt_BR ro - +----------------------------------------+ - a2ps | [] [] () () () [] [] | - aegis | () | - anubis | [] [] | - ap-utils | () | - bash | [] | - batchelor | | - bfd | | - binutils | | - bison | [] [] [] [] | - bluez-pin | [] | - clisp | | - clisp | [] | - coreutils | [] | - cpio | [] [] [] | - darkstat | [] [] [] [] | - diffutils | [] [] [] | - e2fsprogs | | - enscript | [] [] | - error | [] [] | - fetchmail | () () | - fileutils | [] | - findutils | [] [] [] [] | - flex | [] | - gas | | - gawk | [] | - gcal | | - gcc | | - gettext | [] | - gettext-runtime | [] | - gettext-tools | | - gimp-print | [] | - gliv | [] | - glunarclock | [] | - gnucash | | - gnucash-glossary | [] [] | - gnupg | | - gpe-calendar | [] [] | - gpe-conf | [] [] | - gpe-contacts | [] | - gpe-edit | [] [] | - gpe-login | [] [] | - gpe-ownerinfo | [] [] | - gpe-sketchbook | [] [] | - gpe-timesheet | [] [] | - gpe-today | [] [] | - gpe-todo | [] [] | - gphoto2 | | - gprof | [] | - gpsdrive | () () () | - grep | [] [] [] [] | - gretl | | - hello | [] [] [] [] [] [] [] [] [] | - id-utils | [] [] [] | - indent | [] [] [] | - jpilot | () () | - jwhois | [] [] [] | - kbd | | - ld | | - libc | [] [] [] [] | - libgpewidget | [] [] | - libiconv | [] [] | - lifelines | | - lilypond | [] | - lingoteach | | - lingoteach_lessons | | - lynx | [] [] | - m4 | [] [] [] [] | - mailutils | | - make | [] [] | - man-db | [] | - mysecretdiary | [] | - nano | [] [] [] [] | - nano_1_0 | [] [] [] [] | - opcodes | [] [] [] | - parted | [] [] [] | - ptx | [] [] [] [] [] [] [] | - python | | - radius | | - recode | [] [] [] | - screem | | - sed | [] [] | - sh-utils | [] | - sharutils | [] | - sketch | [] | - soundtracker | | - sp | | - tar | [] [] [] [] [] [] | - texinfo | [] | - textutils | [] | - tin | | - util-linux | [] [] | - vorbis-tools | [] [] | - wastesedge | | - wdiff | [] [] [] [] | - wget | [] [] [] | - xchat | [] [] | - xpad | [] | - +----------------------------------------+ - lg lt lv ms nb nl nn no pl pt pt_BR ro - 0 0 2 11 7 26 3 4 18 15 34 34 - - ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW - +-------------------------------------------+ - a2ps | [] [] [] [] [] | 16 - aegis | () | 0 - anubis | [] [] | 5 - ap-utils | () | 1 - bash | [] | 7 - batchelor | | 1 - bfd | [] [] [] | 7 - binutils | [] [] [] | 7 - bison | [] [] | 13 - bluez-pin | | 7 - clisp | | 0 - clisp | | 5 - coreutils | [] [] [] [] [] | 14 - cpio | [] [] [] | 13 - darkstat | [] () () | 9 - diffutils | [] [] [] [] | 21 - e2fsprogs | [] | 3 - enscript | [] [] [] | 11 - error | [] [] [] | 14 - fetchmail | [] | 7 - fileutils | [] [] [] [] [] [] | 15 - findutils | [] [] [] [] [] [] | 27 - flex | [] [] [] | 10 - gas | [] | 3 - gawk | [] [] | 9 - gcal | [] [] | 4 - gcc | [] | 4 - gettext | [] [] [] [] [] [] | 15 - gettext-runtime | [] [] [] [] [] [] | 16 - gettext-tools | [] [] | 5 - gimp-print | [] [] | 10 - gliv | | 1 - glunarclock | [] [] [] | 11 - gnucash | [] [] | 4 - gnucash-glossary | [] [] [] | 8 - gnupg | [] [] [] [] | 16 - gpe-calendar | [] | 5 - gpe-conf | | 3 - gpe-contacts | [] | 4 - gpe-edit | [] | 5 - gpe-login | [] | 5 - gpe-ownerinfo | [] | 7 - gpe-sketchbook | [] | 5 - gpe-timesheet | [] | 6 - gpe-today | [] | 6 - gpe-todo | [] | 6 - gphoto2 | [] [] | 9 - gprof | [] [] | 7 - gpsdrive | [] [] | 3 - grep | [] [] [] [] | 24 - gretl | | 2 - hello | [] [] [] [] [] | 33 - id-utils | [] [] [] | 11 - indent | [] [] [] [] | 19 - jpilot | [] [] [] [] [] | 10 - jwhois | () () [] [] | 10 - kbd | [] [] | 8 - ld | [] [] | 5 - libc | [] [] [] [] | 20 - libgpewidget | | 6 - libiconv | [] [] [] [] [] [] | 21 - lifelines | [] | 2 - lilypond | [] | 4 - lingoteach | | 2 - lingoteach_lessons | () | 0 - lynx | [] [] [] [] | 14 - m4 | [] [] [] | 15 - mailutils | | 2 - make | [] [] [] [] | 15 - man-db | [] | 6 - mysecretdiary | [] [] | 8 - nano | [] [] [] | 15 - nano_1_0 | [] [] [] | 15 - opcodes | [] [] | 9 - parted | [] [] | 13 - ptx | [] [] [] | 22 - python | | 0 - radius | | 0 - recode | [] [] [] [] | 19 - screem | [] | 1 - sed | [] [] [] [] [] | 20 - sh-utils | [] [] [] | 13 - sharutils | [] [] [] [] | 16 - sketch | [] | 5 - soundtracker | [] | 7 - sp | [] | 3 - tar | [] [] [] [] [] | 24 - texinfo | [] [] [] [] | 13 - textutils | [] [] [] [] [] | 15 - tin | | 1 - util-linux | [] [] | 14 - vorbis-tools | [] | 7 - wastesedge | | 0 - wdiff | [] [] [] [] | 17 - wget | [] [] [] [] [] [] [] | 25 - xchat | [] [] [] | 11 - xpad | | 1 - +-------------------------------------------+ - 50 teams ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW - 97 domains 32 19 16 0 56 0 48 10 1 1 12 23 913 + Ready PO files af am ar as ast az be be@latin bg bn_IN bs ca crh + +---------------------------------------------------+ + a2ps | [] [] | + aegis | | + ant-phone | | + anubis | | + aspell | [] [] | + bash | | + bfd | | + bibshelf | [] | + binutils | | + bison | | + bison-runtime | [] | + bluez-pin | [] [] | + bombono-dvd | | + buzztard | | + cflow | | + clisp | | + coreutils | [] [] | + cpio | | + cppi | | + cpplib | [] | + cryptsetup | | + dfarc | | + dialog | [] [] | + dico | | + diffutils | [] | + dink | | + doodle | | + e2fsprogs | [] | + enscript | [] | + exif | | + fetchmail | [] | + findutils | [] | + flex | [] | + freedink | | + gas | | + gawk | [] [] | + gcal | [] | + gcc | | + gettext-examples | [] [] [] [] | + gettext-runtime | [] [] [] | + gettext-tools | [] [] | + gip | [] | + gjay | | + gliv | [] | + glunarclock | [] [] | + gnubiff | | + gnucash | [] | + gnuedu | | + gnulib | | + gnunet | | + gnunet-gtk | | + gnutls | | + gold | | + gpe-aerial | | + gpe-beam | | + gpe-bluetooth | | + gpe-calendar | | + gpe-clock | [] | + gpe-conf | | + gpe-contacts | | + gpe-edit | | + gpe-filemanager | | + gpe-go | | + gpe-login | | + gpe-ownerinfo | [] | + gpe-package | | + gpe-sketchbook | | + gpe-su | [] | + gpe-taskmanager | [] | + gpe-timesheet | [] | + gpe-today | [] | + gpe-todo | | + gphoto2 | | + gprof | [] | + gpsdrive | | + gramadoir | | + grep | | + grub | [] [] | + gsasl | | + gss | | + gst-plugins-bad | [] | + gst-plugins-base | [] | + gst-plugins-good | [] | + gst-plugins-ugly | [] | + gstreamer | [] [] [] | + gtick | | + gtkam | [] | + gtkorphan | [] | + gtkspell | [] [] [] | + gutenprint | | + hello | [] | + help2man | | + hylafax | | + idutils | | + indent | [] [] | + iso_15924 | | + iso_3166 | [] [] [] [] [] [] [] [] | + iso_3166_2 | | + iso_4217 | | + iso_639 | [] [] [] [] [] | + iso_639_3 | [] | + jwhois | | + kbd | | + keytouch | [] | + keytouch-editor | | + keytouch-keyboa... | [] | + klavaro | [] | + latrine | | + ld | [] | + leafpad | [] [] | + libc | [] [] | + libexif | () | + libextractor | | + libgnutls | | + libgpewidget | | + libgpg-error | | + libgphoto2 | | + libgphoto2_port | | + libgsasl | | + libiconv | [] | + libidn | | + lifelines | | + liferea | [] [] | + lilypond | | + linkdr | [] | + lordsawar | | + lprng | | + lynx | [] | + m4 | | + mailfromd | | + mailutils | | + make | | + man-db | | + man-db-manpages | | + minicom | | + mkisofs | | + myserver | | + nano | [] [] | + opcodes | | + parted | | + pies | | + popt | | + psmisc | | + pspp | [] | + pwdutils | | + radius | [] | + recode | [] [] | + rosegarden | | + rpm | | + rush | | + sarg | | + screem | | + scrollkeeper | [] [] [] | + sed | [] [] | + sharutils | [] [] | + shishi | | + skencil | | + solfege | | + solfege-manual | | + soundtracker | | + sp | | + sysstat | | + tar | [] | + texinfo | | + tin | | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | [] | + vice | | + vmm | | + vorbis-tools | | + wastesedge | | + wdiff | | + wget | [] [] | + wyslij-po | | + xchat | [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] | + +---------------------------------------------------+ + af am ar as ast az be be@latin bg bn_IN bs ca crh + 6 0 2 3 19 1 11 3 28 3 1 38 5 + cs da de el en en_GB en_ZA eo es et eu fa fi + +-------------------------------------------------+ + a2ps | [] [] [] [] [] [] [] [] | + aegis | [] [] [] | + ant-phone | [] () | + anubis | [] [] [] | + aspell | [] [] [] [] [] | + bash | [] [] [] [] | + bfd | [] [] | + bibshelf | [] [] [] [] | + binutils | [] [] | + bison | [] [] [] | + bison-runtime | [] [] [] [] [] | + bluez-pin | [] [] [] [] [] [] [] | + bombono-dvd | [] [] | + buzztard | [] [] [] | + cflow | [] [] [] | + clisp | [] [] [] [] | + coreutils | [] [] [] [] | + cpio | [] | + cppi | [] | + cpplib | [] [] [] | + cryptsetup | [] | + dfarc | [] [] [] [] | + dialog | [] [] [] [] [] | + dico | | + diffutils | [] [] [] [] [] [] [] | + dink | [] [] [] | + doodle | [] | + e2fsprogs | [] [] [] | + enscript | [] [] [] | + exif | () [] [] [] | + fetchmail | [] [] () [] [] [] | + findutils | [] [] [] [] | + flex | [] [] [] | + freedink | [] [] [] [] | + gas | [] | + gawk | [] [] [] | + gcal | [] | + gcc | [] [] | + gettext-examples | [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] [] | + gip | [] [] [] [] [] | + gjay | [] [] | + gliv | [] [] [] [] | + glunarclock | [] [] [] | + gnubiff | () | + gnucash | [] () () () () () | + gnuedu | [] [] | + gnulib | [] [] [] | + gnunet | | + gnunet-gtk | [] | + gnutls | [] [] | + gold | [] [] | + gpe-aerial | [] [] [] [] [] | + gpe-beam | [] [] [] [] [] | + gpe-bluetooth | [] [] [] | + gpe-calendar | [] [] | + gpe-clock | [] [] [] [] [] | + gpe-conf | [] [] [] [] | + gpe-contacts | [] [] [] [] | + gpe-edit | [] [] [] | + gpe-filemanager | [] [] [] [] | + gpe-go | [] [] [] [] [] | + gpe-login | [] [] [] | + gpe-ownerinfo | [] [] [] [] [] | + gpe-package | [] [] [] [] | + gpe-sketchbook | [] [] [] [] [] | + gpe-su | [] [] [] [] [] | + gpe-taskmanager | [] [] [] [] [] | + gpe-timesheet | [] [] [] [] [] | + gpe-today | [] [] [] [] [] | + gpe-todo | [] [] [] [] | + gphoto2 | [] [] () [] [] [] [] | + gprof | [] [] [] [] | + gpsdrive | [] [] [] | + gramadoir | [] [] [] | + grep | [] [] | + grub | [] [] [] | + gsasl | [] [] | + gss | [] | + gst-plugins-bad | [] [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] [] | + gtick | [] () [] [] | + gtkam | [] [] () [] [] | + gtkorphan | [] [] [] [] | + gtkspell | [] [] [] [] [] [] [] [] | + gutenprint | [] [] [] [] | + hello | [] [] [] [] [] | + help2man | [] [] | + hylafax | [] [] | + idutils | [] [] [] | + indent | [] [] [] [] [] [] [] [] | + iso_15924 | [] () [] [] [] | + iso_3166 | [] [] [] () [] [] [] () [] | + iso_3166_2 | () | + iso_4217 | [] [] [] () [] [] [] | + iso_639 | [] [] [] () [] [] [] | + iso_639_3 | | + jwhois | [] [] | + kbd | [] [] [] [] [] | + keytouch | [] [] [] | + keytouch-editor | [] [] [] | + keytouch-keyboa... | [] [] | + klavaro | [] [] [] [] | + latrine | [] () [] | + ld | [] [] [] | + leafpad | [] [] [] [] [] [] [] | + libc | [] [] [] [] [] | + libexif | [] [] () | + libextractor | | + libgnutls | [] | + libgpewidget | [] [] [] | + libgpg-error | [] [] | + libgphoto2 | [] () | + libgphoto2_port | [] () [] | + libgsasl | [] | + libiconv | [] [] [] [] [] [] | + libidn | [] [] [] [] | + lifelines | [] () | + liferea | [] [] [] [] [] | + lilypond | [] [] [] [] | + linkdr | [] [] [] [] | + lordsawar | [] | + lprng | | + lynx | [] [] [] [] | + m4 | [] [] [] [] [] | + mailfromd | | + mailutils | [] | + make | [] [] [] [] | + man-db | | + man-db-manpages | | + minicom | [] [] [] [] [] | + mkisofs | [] | + myserver | | + nano | [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] | + pies | | + popt | [] [] [] [] [] [] | + psmisc | [] [] [] [] | + pspp | [] | + pwdutils | [] | + radius | [] | + recode | [] [] [] [] [] [] [] | + rosegarden | () () () () | + rpm | [] [] [] | + rush | | + sarg | | + screem | | + scrollkeeper | [] [] [] [] [] [] | + sed | [] [] [] [] [] [] [] | + sharutils | [] [] [] [] [] | + shishi | | + skencil | [] () [] | + solfege | [] [] [] [] | + solfege-manual | [] [] | + soundtracker | [] [] [] | + sp | [] | + sysstat | [] [] [] [] | + tar | [] [] [] [] [] | + texinfo | [] [] [] | + tin | [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | [] [] [] [] [] | + vice | () () | + vmm | [] | + vorbis-tools | [] [] | + wastesedge | [] | + wdiff | [] [] [] | + wget | [] [] [] [] | + wyslij-po | [] | + xchat | [] [] [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] [] [] | + +-------------------------------------------------+ + cs da de el en en_GB en_ZA eo es et eu fa fi + 64 105 117 18 1 8 0 28 89 18 19 0 104 + + fr ga gl gu he hi hr hu hy id is it ja ka kn + +------------------------------------------------+ + a2ps | [] [] [] | + aegis | [] [] | + ant-phone | [] [] | + anubis | [] [] [] | + aspell | [] [] [] [] | + bash | [] [] [] | + bfd | [] [] | + bibshelf | [] [] [] [] | + binutils | [] [] | + bison | [] [] [] | + bison-runtime | [] [] [] [] [] | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Wed Jun 17 19:57:59 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB85C3339DF; Wed, 17 Jun 2020 19:57:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nG875bwbz4QBS; Wed, 17 Jun 2020 19:57:59 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9FA07256B6; Wed, 17 Jun 2020 19:57:59 +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 05HJvxQX032316; Wed, 17 Jun 2020 19:57:59 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05HJvx1R032315; Wed, 17 Jun 2020 19:57:59 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202006171957.05HJvx1R032315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 17 Jun 2020 19:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362287 - vendor/flex/2.6.4 X-SVN-Group: vendor X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor/flex/2.6.4 X-SVN-Commit-Revision: 362287 X-SVN-Commit-Repository: base 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.33 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, 17 Jun 2020 19:57:59 -0000 Author: jkim Date: Wed Jun 17 19:57:59 2020 New Revision: 362287 URL: https://svnweb.freebsd.org/changeset/base/362287 Log: Tag flex 2.6.4. Added: vendor/flex/2.6.4/ - copied from r362286, vendor/flex/dist/ From owner-svn-src-vendor@freebsd.org Sat Jun 20 18:49:22 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8BADE3305F2; Sat, 20 Jun 2020 18:49:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49q4TV5Bbfz4YNc; Sat, 20 Jun 2020 18:49: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF07810C92; Sat, 20 Jun 2020 18:49: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 05KInH1D067522; Sat, 20 Jun 2020 18:49:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05KInDJ1067498; Sat, 20 Jun 2020 18:49:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006201849.05KInDJ1067498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 20 Jun 2020 18:49:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362442 - in vendor/llvm-project/release-10.x: clang/lib/Sema clang/lib/Tooling/Syntax clang/utils/TableGen lld/COFF lld/ELF llvm/include/llvm/Support llvm/lib/CodeGen llvm/lib/Target/A... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm-project/release-10.x: clang/lib/Sema clang/lib/Tooling/Syntax clang/utils/TableGen lld/COFF lld/ELF llvm/include/llvm/Support llvm/lib/CodeGen llvm/lib/Target/AArch64 llvm/lib/Target/X8... X-SVN-Commit-Revision: 362442 X-SVN-Commit-Repository: base 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.33 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, 20 Jun 2020 18:49:22 -0000 Author: dim Date: Sat Jun 20 18:49:12 2020 New Revision: 362442 URL: https://svnweb.freebsd.org/changeset/base/362442 Log: Vendor import of llvm-project branch release/10.x llvmorg-10.0.0-97-g6f71678ecd2. Added: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedThunderX3T110.td Modified: vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplate.cpp vendor/llvm-project/release-10.x/clang/lib/Tooling/Syntax/Tokens.cpp vendor/llvm-project/release-10.x/clang/utils/TableGen/ClangAttrEmitter.cpp vendor/llvm-project/release-10.x/lld/COFF/Chunks.h vendor/llvm-project/release-10.x/lld/COFF/DLL.cpp vendor/llvm-project/release-10.x/lld/ELF/ScriptLexer.cpp vendor/llvm-project/release-10.x/lld/ELF/ScriptParser.cpp vendor/llvm-project/release-10.x/llvm/include/llvm/Support/AArch64TargetParser.def vendor/llvm-project/release-10.x/llvm/lib/CodeGen/BranchFolding.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64.td vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedA53.td vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedA57.td vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedCyclone.td vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedExynosM3.td vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedExynosM5.td vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedFalkor.td vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedKryo.td vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedThunderX.td vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedThunderX2T99.td vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64Subtarget.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64Subtarget.h vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86AsmPrinter.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86ISelLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86InstrInfo.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/Utils/ValueMapper.cpp Modified: vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplate.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplate.cpp Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplate.cpp Sat Jun 20 18:49:12 2020 (r362442) @@ -3817,6 +3817,9 @@ TypeResult Sema::ActOnTagTemplateIdType(TagUseKind TUK SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc) { + if (SS.isInvalid()) + return TypeResult(true); + TemplateName Template = TemplateD.get(); // Translate the parser's template argument list in our AST format. @@ -5925,7 +5928,9 @@ bool UnnamedLocalNoLinkageFinder::VisitDependentNameTy bool UnnamedLocalNoLinkageFinder::VisitDependentTemplateSpecializationType( const DependentTemplateSpecializationType* T) { - return VisitNestedNameSpecifier(T->getQualifier()); + if (auto *Q = T->getQualifier()) + return VisitNestedNameSpecifier(Q); + return false; } bool UnnamedLocalNoLinkageFinder::VisitPackExpansionType( @@ -5979,6 +5984,7 @@ bool UnnamedLocalNoLinkageFinder::VisitTagDecl(const T bool UnnamedLocalNoLinkageFinder::VisitNestedNameSpecifier( NestedNameSpecifier *NNS) { + assert(NNS); if (NNS->getPrefix() && VisitNestedNameSpecifier(NNS->getPrefix())) return true; Modified: vendor/llvm-project/release-10.x/clang/lib/Tooling/Syntax/Tokens.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Tooling/Syntax/Tokens.cpp Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/clang/lib/Tooling/Syntax/Tokens.cpp Sat Jun 20 18:49:12 2020 (r362442) @@ -335,14 +335,38 @@ class TokenCollector::CollectPPExpansions : public PPC SourceRange Range, const MacroArgs *Args) override { if (!Collector) return; - // Only record top-level expansions, not those where: + const auto &SM = Collector->PP.getSourceManager(); + // Only record top-level expansions that directly produce expanded tokens. + // This excludes those where: // - the macro use is inside a macro body, // - the macro appears in an argument to another macro. - if (!MacroNameTok.getLocation().isFileID() || - (LastExpansionEnd.isValid() && - Collector->PP.getSourceManager().isBeforeInTranslationUnit( - Range.getBegin(), LastExpansionEnd))) + // However macro expansion isn't really a tree, it's token rewrite rules, + // so there are other cases, e.g. + // #define B(X) X + // #define A 1 + B + // A(2) + // Both A and B produce expanded tokens, though the macro name 'B' comes + // from an expansion. The best we can do is merge the mappings for both. + + // The *last* token of any top-level macro expansion must be in a file. + // (In the example above, see the closing paren of the expansion of B). + if (!Range.getEnd().isFileID()) return; + // If there's a current expansion that encloses this one, this one can't be + // top-level. + if (LastExpansionEnd.isValid() && + !SM.isBeforeInTranslationUnit(LastExpansionEnd, Range.getEnd())) + return; + + // If the macro invocation (B) starts in a macro (A) but ends in a file, + // we'll create a merged mapping for A + B by overwriting the endpoint for + // A's startpoint. + if (!Range.getBegin().isFileID()) { + Range.setBegin(SM.getExpansionLoc(Range.getBegin())); + assert(Collector->Expansions.count(Range.getBegin().getRawEncoding()) && + "Overlapping macros should have same expansion location"); + } + Collector->Expansions[Range.getBegin().getRawEncoding()] = Range.getEnd(); LastExpansionEnd = Range.getEnd(); } @@ -399,197 +423,167 @@ class TokenCollector::Builder { (public) } TokenBuffer build() && { - buildSpelledTokens(); - - // Walk over expanded tokens and spelled tokens in parallel, building the - // mappings between those using source locations. - // To correctly recover empty macro expansions, we also take locations - // reported to PPCallbacks::MacroExpands into account as we do not have any - // expanded tokens with source locations to guide us. - - // The 'eof' token is special, it is not part of spelled token stream. We - // handle it separately at the end. assert(!Result.ExpandedTokens.empty()); assert(Result.ExpandedTokens.back().kind() == tok::eof); - for (unsigned I = 0; I < Result.ExpandedTokens.size() - 1; ++I) { - // (!) I might be updated by the following call. - processExpandedToken(I); - } - // 'eof' not handled in the loop, do it here. - assert(SM.getMainFileID() == - SM.getFileID(Result.ExpandedTokens.back().location())); - fillGapUntil(Result.Files[SM.getMainFileID()], - Result.ExpandedTokens.back().location(), - Result.ExpandedTokens.size() - 1); - Result.Files[SM.getMainFileID()].EndExpanded = Result.ExpandedTokens.size(); + // Tokenize every file that contributed tokens to the expanded stream. + buildSpelledTokens(); - // Some files might have unaccounted spelled tokens at the end, add an empty - // mapping for those as they did not have expanded counterparts. - fillGapsAtEndOfFiles(); + // The expanded token stream consists of runs of tokens that came from + // the same source (a macro expansion, part of a file etc). + // Between these runs are the logical positions of spelled tokens that + // didn't expand to anything. + while (NextExpanded < Result.ExpandedTokens.size() - 1 /* eof */) { + // Create empty mappings for spelled tokens that expanded to nothing here. + // May advance NextSpelled, but NextExpanded is unchanged. + discard(); + // Create mapping for a contiguous run of expanded tokens. + // Advances NextExpanded past the run, and NextSpelled accordingly. + unsigned OldPosition = NextExpanded; + advance(); + if (NextExpanded == OldPosition) + diagnoseAdvanceFailure(); + } + // If any tokens remain in any of the files, they didn't expand to anything. + // Create empty mappings up until the end of the file. + for (const auto &File : Result.Files) + discard(File.first); return std::move(Result); } private: - /// Process the next token in an expanded stream and move corresponding - /// spelled tokens, record any mapping if needed. - /// (!) \p I will be updated if this had to skip tokens, e.g. for macros. - void processExpandedToken(unsigned &I) { - auto L = Result.ExpandedTokens[I].location(); - if (L.isMacroID()) { - processMacroExpansion(SM.getExpansionRange(L), I); - return; - } - if (L.isFileID()) { - auto FID = SM.getFileID(L); - TokenBuffer::MarkedFile &File = Result.Files[FID]; + // Consume a sequence of spelled tokens that didn't expand to anything. + // In the simplest case, skips spelled tokens until finding one that produced + // the NextExpanded token, and creates an empty mapping for them. + // If Drain is provided, skips remaining tokens from that file instead. + void discard(llvm::Optional Drain = llvm::None) { + SourceLocation Target = + Drain ? SM.getLocForEndOfFile(*Drain) + : SM.getExpansionLoc( + Result.ExpandedTokens[NextExpanded].location()); + FileID File = SM.getFileID(Target); + const auto &SpelledTokens = Result.Files[File].SpelledTokens; + auto &NextSpelled = this->NextSpelled[File]; - fillGapUntil(File, L, I); + TokenBuffer::Mapping Mapping; + Mapping.BeginSpelled = NextSpelled; + // When dropping trailing tokens from a file, the empty mapping should + // be positioned within the file's expanded-token range (at the end). + Mapping.BeginExpanded = Mapping.EndExpanded = + Drain ? Result.Files[*Drain].EndExpanded : NextExpanded; + // We may want to split into several adjacent empty mappings. + // FlushMapping() emits the current mapping and starts a new one. + auto FlushMapping = [&, this] { + Mapping.EndSpelled = NextSpelled; + if (Mapping.BeginSpelled != Mapping.EndSpelled) + Result.Files[File].Mappings.push_back(Mapping); + Mapping.BeginSpelled = NextSpelled; + }; - // Skip the token. - assert(File.SpelledTokens[NextSpelled[FID]].location() == L && - "no corresponding token in the spelled stream"); - ++NextSpelled[FID]; - return; + while (NextSpelled < SpelledTokens.size() && + SpelledTokens[NextSpelled].location() < Target) { + // If we know mapping bounds at [NextSpelled, KnownEnd] (macro expansion) + // then we want to partition our (empty) mapping. + // [Start, NextSpelled) [NextSpelled, KnownEnd] (KnownEnd, Target) + SourceLocation KnownEnd = CollectedExpansions.lookup( + SpelledTokens[NextSpelled].location().getRawEncoding()); + if (KnownEnd.isValid()) { + FlushMapping(); // Emits [Start, NextSpelled) + while (NextSpelled < SpelledTokens.size() && + SpelledTokens[NextSpelled].location() <= KnownEnd) + ++NextSpelled; + FlushMapping(); // Emits [NextSpelled, KnownEnd] + // Now the loop contitues and will emit (KnownEnd, Target). + } else { + ++NextSpelled; + } } + FlushMapping(); } - /// Skipped expanded and spelled tokens of a macro expansion that covers \p - /// SpelledRange. Add a corresponding mapping. - /// (!) \p I will be the index of the last token in an expansion after this - /// function returns. - void processMacroExpansion(CharSourceRange SpelledRange, unsigned &I) { - auto FID = SM.getFileID(SpelledRange.getBegin()); - assert(FID == SM.getFileID(SpelledRange.getEnd())); - TokenBuffer::MarkedFile &File = Result.Files[FID]; + // Consumes the NextExpanded token and others that are part of the same run. + // Increases NextExpanded and NextSpelled by at least one, and adds a mapping + // (unless this is a run of file tokens, which we represent with no mapping). + void advance() { + const syntax::Token &Tok = Result.ExpandedTokens[NextExpanded]; + SourceLocation Expansion = SM.getExpansionLoc(Tok.location()); + FileID File = SM.getFileID(Expansion); + const auto &SpelledTokens = Result.Files[File].SpelledTokens; + auto &NextSpelled = this->NextSpelled[File]; - fillGapUntil(File, SpelledRange.getBegin(), I); + if (Tok.location().isFileID()) { + // A run of file tokens continues while the expanded/spelled tokens match. + while (NextSpelled < SpelledTokens.size() && + NextExpanded < Result.ExpandedTokens.size() && + SpelledTokens[NextSpelled].location() == + Result.ExpandedTokens[NextExpanded].location()) { + ++NextSpelled; + ++NextExpanded; + } + // We need no mapping for file tokens copied to the expanded stream. + } else { + // We found a new macro expansion. We should have its spelling bounds. + auto End = CollectedExpansions.lookup(Expansion.getRawEncoding()); + assert(End.isValid() && "Macro expansion wasn't captured?"); - // Skip all expanded tokens from the same macro expansion. - unsigned BeginExpanded = I; - for (; I + 1 < Result.ExpandedTokens.size(); ++I) { - auto NextL = Result.ExpandedTokens[I + 1].location(); - if (!NextL.isMacroID() || - SM.getExpansionLoc(NextL) != SpelledRange.getBegin()) - break; + // Mapping starts here... + TokenBuffer::Mapping Mapping; + Mapping.BeginExpanded = NextExpanded; + Mapping.BeginSpelled = NextSpelled; + // ... consumes spelled tokens within bounds we captured ... + while (NextSpelled < SpelledTokens.size() && + SpelledTokens[NextSpelled].location() <= End) + ++NextSpelled; + // ... consumes expanded tokens rooted at the same expansion ... + while (NextExpanded < Result.ExpandedTokens.size() && + SM.getExpansionLoc( + Result.ExpandedTokens[NextExpanded].location()) == Expansion) + ++NextExpanded; + // ... and ends here. + Mapping.EndExpanded = NextExpanded; + Mapping.EndSpelled = NextSpelled; + Result.Files[File].Mappings.push_back(Mapping); } - unsigned EndExpanded = I + 1; - consumeMapping(File, SM.getFileOffset(SpelledRange.getEnd()), BeginExpanded, - EndExpanded, NextSpelled[FID]); } + // advance() is supposed to consume at least one token - if not, we crash. + void diagnoseAdvanceFailure() { +#ifndef NDEBUG + // Show the failed-to-map token in context. + for (unsigned I = (NextExpanded < 10) ? 0 : NextExpanded - 10; + I < NextExpanded + 5 && I < Result.ExpandedTokens.size(); ++I) { + const char *L = + (I == NextExpanded) ? "!! " : (I < NextExpanded) ? "ok " : " "; + llvm::errs() << L << Result.ExpandedTokens[I].dumpForTests(SM) << "\n"; + } +#endif + llvm_unreachable("Couldn't map expanded token to spelled tokens!"); + } + /// Initializes TokenBuffer::Files and fills spelled tokens and expanded /// ranges for each of the files. void buildSpelledTokens() { for (unsigned I = 0; I < Result.ExpandedTokens.size(); ++I) { - auto FID = - SM.getFileID(SM.getExpansionLoc(Result.ExpandedTokens[I].location())); + const auto &Tok = Result.ExpandedTokens[I]; + auto FID = SM.getFileID(SM.getExpansionLoc(Tok.location())); auto It = Result.Files.try_emplace(FID); TokenBuffer::MarkedFile &File = It.first->second; - File.EndExpanded = I + 1; + // The eof token should not be considered part of the main-file's range. + File.EndExpanded = Tok.kind() == tok::eof ? I : I + 1; + if (!It.second) continue; // we have seen this file before. - // This is the first time we see this file. File.BeginExpanded = I; File.SpelledTokens = tokenize(FID, SM, LangOpts); } } - void consumeEmptyMapping(TokenBuffer::MarkedFile &File, unsigned EndOffset, - unsigned ExpandedIndex, unsigned &SpelledIndex) { - consumeMapping(File, EndOffset, ExpandedIndex, ExpandedIndex, SpelledIndex); - } - - /// Consumes spelled tokens that form a macro expansion and adds a entry to - /// the resulting token buffer. - /// (!) SpelledIndex is updated in-place. - void consumeMapping(TokenBuffer::MarkedFile &File, unsigned EndOffset, - unsigned BeginExpanded, unsigned EndExpanded, - unsigned &SpelledIndex) { - // We need to record this mapping before continuing. - unsigned MappingBegin = SpelledIndex; - ++SpelledIndex; - - bool HitMapping = - tryConsumeSpelledUntil(File, EndOffset + 1, SpelledIndex).hasValue(); - (void)HitMapping; - assert(!HitMapping && "recursive macro expansion?"); - - TokenBuffer::Mapping M; - M.BeginExpanded = BeginExpanded; - M.EndExpanded = EndExpanded; - M.BeginSpelled = MappingBegin; - M.EndSpelled = SpelledIndex; - - File.Mappings.push_back(M); - } - - /// Consumes spelled tokens until location \p L is reached and adds a mapping - /// covering the consumed tokens. The mapping will point to an empty expanded - /// range at position \p ExpandedIndex. - void fillGapUntil(TokenBuffer::MarkedFile &File, SourceLocation L, - unsigned ExpandedIndex) { - assert(L.isFileID()); - FileID FID; - unsigned Offset; - std::tie(FID, Offset) = SM.getDecomposedLoc(L); - - unsigned &SpelledIndex = NextSpelled[FID]; - unsigned MappingBegin = SpelledIndex; - while (true) { - auto EndLoc = tryConsumeSpelledUntil(File, Offset, SpelledIndex); - if (SpelledIndex != MappingBegin) { - TokenBuffer::Mapping M; - M.BeginSpelled = MappingBegin; - M.EndSpelled = SpelledIndex; - M.BeginExpanded = M.EndExpanded = ExpandedIndex; - File.Mappings.push_back(M); - } - if (!EndLoc) - break; - consumeEmptyMapping(File, SM.getFileOffset(*EndLoc), ExpandedIndex, - SpelledIndex); - - MappingBegin = SpelledIndex; - } - }; - - /// Consumes spelled tokens until it reaches Offset or a mapping boundary, - /// i.e. a name of a macro expansion or the start '#' token of a PP directive. - /// (!) NextSpelled is updated in place. - /// - /// returns None if \p Offset was reached, otherwise returns the end location - /// of a mapping that starts at \p NextSpelled. - llvm::Optional - tryConsumeSpelledUntil(TokenBuffer::MarkedFile &File, unsigned Offset, - unsigned &NextSpelled) { - for (; NextSpelled < File.SpelledTokens.size(); ++NextSpelled) { - auto L = File.SpelledTokens[NextSpelled].location(); - if (Offset <= SM.getFileOffset(L)) - return llvm::None; // reached the offset we are looking for. - auto Mapping = CollectedExpansions.find(L.getRawEncoding()); - if (Mapping != CollectedExpansions.end()) - return Mapping->second; // found a mapping before the offset. - } - return llvm::None; // no more tokens, we "reached" the offset. - } - - /// Adds empty mappings for unconsumed spelled tokens at the end of each file. - void fillGapsAtEndOfFiles() { - for (auto &F : Result.Files) { - if (F.second.SpelledTokens.empty()) - continue; - fillGapUntil(F.second, F.second.SpelledTokens.back().endLocation(), - F.second.EndExpanded); - } - } - TokenBuffer Result; - /// For each file, a position of the next spelled token we will consume. - llvm::DenseMap NextSpelled; + unsigned NextExpanded = 0; // cursor in ExpandedTokens + llvm::DenseMap NextSpelled; // cursor in SpelledTokens PPExpansions CollectedExpansions; const SourceManager &SM; const LangOptions &LangOpts; Modified: vendor/llvm-project/release-10.x/clang/utils/TableGen/ClangAttrEmitter.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/utils/TableGen/ClangAttrEmitter.cpp Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/clang/utils/TableGen/ClangAttrEmitter.cpp Sat Jun 20 18:49:12 2020 (r362442) @@ -2825,6 +2825,7 @@ void EmitClangAttrPCHRead(RecordKeeper &Records, raw_o if (R.isSubClassOf(InhClass)) OS << " bool isInherited = Record.readInt();\n"; OS << " bool isImplicit = Record.readInt();\n"; + OS << " bool isPackExpansion = Record.readInt();\n"; ArgRecords = R.getValueAsListOfDefs("Args"); Args.clear(); for (const auto *Arg : ArgRecords) { @@ -2840,6 +2841,7 @@ void EmitClangAttrPCHRead(RecordKeeper &Records, raw_o if (R.isSubClassOf(InhClass)) OS << " cast(New)->setInherited(isInherited);\n"; OS << " New->setImplicit(isImplicit);\n"; + OS << " New->setPackExpansion(isPackExpansion);\n"; OS << " break;\n"; OS << " }\n"; } @@ -2866,6 +2868,7 @@ void EmitClangAttrPCHWrite(RecordKeeper &Records, raw_ if (R.isSubClassOf(InhClass)) OS << " Record.push_back(SA->isInherited());\n"; OS << " Record.push_back(A->isImplicit());\n"; + OS << " Record.push_back(A->isPackExpansion());\n"; for (const auto *Arg : Args) createArgument(*Arg, R.getName())->writePCHWrite(OS); Modified: vendor/llvm-project/release-10.x/lld/COFF/Chunks.h ============================================================================== --- vendor/llvm-project/release-10.x/lld/COFF/Chunks.h Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/lld/COFF/Chunks.h Sat Jun 20 18:49:12 2020 (r362442) @@ -486,7 +486,9 @@ class ImportThunkChunkX86 : public ImportThunkChunk { class ImportThunkChunkARM : public ImportThunkChunk { public: - explicit ImportThunkChunkARM(Defined *s) : ImportThunkChunk(s) {} + explicit ImportThunkChunkARM(Defined *s) : ImportThunkChunk(s) { + setAlignment(2); + } size_t getSize() const override { return sizeof(importThunkARM); } void getBaserels(std::vector *res) override; void writeTo(uint8_t *buf) const override; @@ -494,14 +496,16 @@ class ImportThunkChunkARM : public ImportThunkChunk { class ImportThunkChunkARM64 : public ImportThunkChunk { public: - explicit ImportThunkChunkARM64(Defined *s) : ImportThunkChunk(s) {} + explicit ImportThunkChunkARM64(Defined *s) : ImportThunkChunk(s) { + setAlignment(4); + } size_t getSize() const override { return sizeof(importThunkARM64); } void writeTo(uint8_t *buf) const override; }; class RangeExtensionThunkARM : public NonSectionChunk { public: - explicit RangeExtensionThunkARM(Defined *t) : target(t) {} + explicit RangeExtensionThunkARM(Defined *t) : target(t) { setAlignment(2); } size_t getSize() const override; void writeTo(uint8_t *buf) const override; Modified: vendor/llvm-project/release-10.x/lld/COFF/DLL.cpp ============================================================================== --- vendor/llvm-project/release-10.x/lld/COFF/DLL.cpp Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/lld/COFF/DLL.cpp Sat Jun 20 18:49:12 2020 (r362442) @@ -365,7 +365,9 @@ class TailMergeChunkX86 : public NonSectionChunk { (pu class ThunkChunkARM : public NonSectionChunk { public: - ThunkChunkARM(Defined *i, Chunk *tm) : imp(i), tailMerge(tm) {} + ThunkChunkARM(Defined *i, Chunk *tm) : imp(i), tailMerge(tm) { + setAlignment(2); + } size_t getSize() const override { return sizeof(thunkARM); } @@ -385,7 +387,9 @@ class ThunkChunkARM : public NonSectionChunk { (public class TailMergeChunkARM : public NonSectionChunk { public: - TailMergeChunkARM(Chunk *d, Defined *h) : desc(d), helper(h) {} + TailMergeChunkARM(Chunk *d, Defined *h) : desc(d), helper(h) { + setAlignment(2); + } size_t getSize() const override { return sizeof(tailMergeARM); } @@ -405,7 +409,9 @@ class TailMergeChunkARM : public NonSectionChunk { (pu class ThunkChunkARM64 : public NonSectionChunk { public: - ThunkChunkARM64(Defined *i, Chunk *tm) : imp(i), tailMerge(tm) {} + ThunkChunkARM64(Defined *i, Chunk *tm) : imp(i), tailMerge(tm) { + setAlignment(4); + } size_t getSize() const override { return sizeof(thunkARM64); } @@ -422,7 +428,9 @@ class ThunkChunkARM64 : public NonSectionChunk { (publ class TailMergeChunkARM64 : public NonSectionChunk { public: - TailMergeChunkARM64(Chunk *d, Defined *h) : desc(d), helper(h) {} + TailMergeChunkARM64(Chunk *d, Defined *h) : desc(d), helper(h) { + setAlignment(4); + } size_t getSize() const override { return sizeof(tailMergeARM64); } Modified: vendor/llvm-project/release-10.x/lld/ELF/ScriptLexer.cpp ============================================================================== --- vendor/llvm-project/release-10.x/lld/ELF/ScriptLexer.cpp Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/lld/ELF/ScriptLexer.cpp Sat Jun 20 18:49:12 2020 (r362442) @@ -52,6 +52,8 @@ StringRef ScriptLexer::getLine() { // Returns 1-based line number of the current token. size_t ScriptLexer::getLineNumber() { + if (pos == 0) + return 1; StringRef s = getCurrentMB().getBuffer(); StringRef tok = tokens[pos - 1]; return s.substr(0, tok.data() - s.data()).count('\n') + 1; @@ -292,7 +294,9 @@ static bool encloses(StringRef s, StringRef t) { MemoryBufferRef ScriptLexer::getCurrentMB() { // Find input buffer containing the current token. - assert(!mbs.empty() && pos > 0); + assert(!mbs.empty()); + if (pos == 0) + return mbs.back(); for (MemoryBufferRef mb : mbs) if (encloses(mb.getBuffer(), tokens[pos - 1])) return mb; Modified: vendor/llvm-project/release-10.x/lld/ELF/ScriptParser.cpp ============================================================================== --- vendor/llvm-project/release-10.x/lld/ELF/ScriptParser.cpp Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/lld/ELF/ScriptParser.cpp Sat Jun 20 18:49:12 2020 (r362442) @@ -737,6 +737,7 @@ bool ScriptParser::readSectionDirective(OutputSection expect("("); if (consume("NOLOAD")) { cmd->noload = true; + cmd->type = SHT_NOBITS; } else { skip(); // This is "COPY", "INFO" or "OVERLAY". cmd->nonAlloc = true; Modified: vendor/llvm-project/release-10.x/llvm/include/llvm/Support/AArch64TargetParser.def ============================================================================== --- vendor/llvm-project/release-10.x/llvm/include/llvm/Support/AArch64TargetParser.def Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/include/llvm/Support/AArch64TargetParser.def Sat Jun 20 18:49:12 2020 (r362442) @@ -152,6 +152,10 @@ AARCH64_CPU_NAME("kryo", ARMV8A, FK_CRYPTO_NEON_FP_ARM (AArch64::AEK_CRC)) AARCH64_CPU_NAME("thunderx2t99", ARMV8_1A, FK_CRYPTO_NEON_FP_ARMV8, false, (AArch64::AEK_NONE)) +AARCH64_CPU_NAME("thunderx3t110", ARMV8_3A, FK_CRYPTO_NEON_FP_ARMV8, false, + (AArch64::AEK_CRC | AEK_CRYPTO | AEK_FP | AEK_SIMD | + AEK_LSE | AEK_RAND | AArch64::AEK_PROFILE | + AArch64::AEK_RAS)) AARCH64_CPU_NAME("thunderx", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, (AArch64::AEK_CRC | AArch64::AEK_PROFILE)) AARCH64_CPU_NAME("thunderxt88", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, Modified: vendor/llvm-project/release-10.x/llvm/lib/CodeGen/BranchFolding.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/CodeGen/BranchFolding.cpp Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/CodeGen/BranchFolding.cpp Sat Jun 20 18:49:12 2020 (r362442) @@ -963,10 +963,10 @@ bool BranchFolder::TryTailMergeBlocks(MachineBasicBloc continue; } - // If one of the blocks is the entire common tail (and not the entry - // block, which we can't jump to), we can treat all blocks with this same - // tail at once. Use PredBB if that is one of the possibilities, as that - // will not introduce any extra branches. + // If one of the blocks is the entire common tail (and is not the entry + // block/an EH pad, which we can't jump to), we can treat all blocks with + // this same tail at once. Use PredBB if that is one of the possibilities, + // as that will not introduce any extra branches. MachineBasicBlock *EntryBB = &MergePotentials.front().getBlock()->getParent()->front(); unsigned commonTailIndex = SameTails.size(); @@ -974,19 +974,21 @@ bool BranchFolder::TryTailMergeBlocks(MachineBasicBloc // into the other. if (SameTails.size() == 2 && SameTails[0].getBlock()->isLayoutSuccessor(SameTails[1].getBlock()) && - SameTails[1].tailIsWholeBlock()) + SameTails[1].tailIsWholeBlock() && !SameTails[1].getBlock()->isEHPad()) commonTailIndex = 1; else if (SameTails.size() == 2 && SameTails[1].getBlock()->isLayoutSuccessor( - SameTails[0].getBlock()) && - SameTails[0].tailIsWholeBlock()) + SameTails[0].getBlock()) && + SameTails[0].tailIsWholeBlock() && + !SameTails[0].getBlock()->isEHPad()) commonTailIndex = 0; else { // Otherwise just pick one, favoring the fall-through predecessor if // there is one. for (unsigned i = 0, e = SameTails.size(); i != e; ++i) { MachineBasicBlock *MBB = SameTails[i].getBlock(); - if (MBB == EntryBB && SameTails[i].tailIsWholeBlock()) + if ((MBB == EntryBB || MBB->isEHPad()) && + SameTails[i].tailIsWholeBlock()) continue; if (MBB == PredBB) { commonTailIndex = i; Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64.td ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64.td Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64.td Sat Jun 20 18:49:12 2020 (r362442) @@ -443,6 +443,10 @@ def SVEUnsupported : AArch64Unsupported { HasSVE2BitPerm]; } +def PAUnsupported : AArch64Unsupported { + let F = [HasPA]; +} + include "AArch64SchedA53.td" include "AArch64SchedA57.td" include "AArch64SchedCyclone.td" @@ -453,6 +457,7 @@ include "AArch64SchedExynosM4.td" include "AArch64SchedExynosM5.td" include "AArch64SchedThunderX.td" include "AArch64SchedThunderX2T99.td" +include "AArch64SchedThunderX3T110.td" def ProcA35 : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35", "Cortex-A35 ARM processors", [ @@ -780,6 +785,25 @@ def ProcThunderX2T99 : SubtargetFeature<"thunderx2t99 FeatureLSE, HasV8_1aOps]>; +def ProcThunderX3T110 : SubtargetFeature<"thunderx3t110", "ARMProcFamily", + "ThunderX3T110", + "Marvell ThunderX3 processors", [ + FeatureAggressiveFMA, + FeatureCRC, + FeatureCrypto, + FeatureFPARMv8, + FeatureArithmeticBccFusion, + FeatureNEON, + FeaturePostRAScheduler, + FeaturePredictableSelectIsExpensive, + FeatureLSE, + FeaturePA, + FeatureUseAA, + FeatureBalanceFPOps, + FeaturePerfMon, + FeatureStrictAlign, + HasV8_3aOps]>; + def ProcThunderX : SubtargetFeature<"thunderx", "ARMProcFamily", "ThunderX", "Cavium ThunderX processors", [ FeatureCRC, @@ -878,6 +902,8 @@ def : ProcessorModel<"thunderxt81", ThunderXT8XModel, def : ProcessorModel<"thunderxt83", ThunderXT8XModel, [ProcThunderXT83]>; // Cavium ThunderX2T9X Processors. Formerly Broadcom Vulcan. def : ProcessorModel<"thunderx2t99", ThunderX2T99Model, [ProcThunderX2T99]>; +// Marvell ThunderX3T110 Processors. +def : ProcessorModel<"thunderx3t110", ThunderX3T110Model, [ProcThunderX3T110]>; // FIXME: HiSilicon TSV110 is currently modeled as a Cortex-A57. def : ProcessorModel<"tsv110", CortexA57Model, [ProcTSV110]>; Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp Sat Jun 20 18:49:12 2020 (r362442) @@ -118,9 +118,15 @@ void AArch64BranchTargets::addBTI(MachineBasicBlock &M auto MBBI = MBB.begin(); - // PACI[AB]SP are implicitly BTI JC, so no BTI instruction needed there. - if (MBBI != MBB.end() && (MBBI->getOpcode() == AArch64::PACIASP || - MBBI->getOpcode() == AArch64::PACIBSP)) + // Skip the meta instuctions, those will be removed anyway. + for (; MBBI != MBB.end() && MBBI->isMetaInstruction(); ++MBBI) + ; + + // SCTLR_EL1.BT[01] is set to 0 by default which means + // PACI[AB]SP are implicitly BTI C so no BTI C instruction is needed there. + if (MBBI != MBB.end() && HintNum == 34 && + (MBBI->getOpcode() == AArch64::PACIASP || + MBBI->getOpcode() == AArch64::PACIBSP)) return; BuildMI(MBB, MBB.begin(), MBB.findDebugLoc(MBB.begin()), Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedA53.td ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedA53.td Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedA53.td Sat Jun 20 18:49:12 2020 (r362442) @@ -26,7 +26,8 @@ def CortexA53Model : SchedMachineModel { // v 1.0 Spreadsheet let CompleteModel = 1; - list UnsupportedFeatures = SVEUnsupported.F; + list UnsupportedFeatures = !listconcat(SVEUnsupported.F, + PAUnsupported.F); } Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedA57.td ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedA57.td Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedA57.td Sat Jun 20 18:49:12 2020 (r362442) @@ -31,7 +31,8 @@ def CortexA57Model : SchedMachineModel { let LoopMicroOpBufferSize = 16; let CompleteModel = 1; - list UnsupportedFeatures = SVEUnsupported.F; + list UnsupportedFeatures = !listconcat(SVEUnsupported.F, + PAUnsupported.F); } //===----------------------------------------------------------------------===// Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedCyclone.td ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedCyclone.td Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedCyclone.td Sat Jun 20 18:49:12 2020 (r362442) @@ -18,7 +18,8 @@ def CycloneModel : SchedMachineModel { let MispredictPenalty = 16; // 14-19 cycles are typical. let CompleteModel = 1; - list UnsupportedFeatures = SVEUnsupported.F; + list UnsupportedFeatures = !listconcat(SVEUnsupported.F, + PAUnsupported.F); } //===----------------------------------------------------------------------===// Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedExynosM3.td ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedExynosM3.td Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedExynosM3.td Sat Jun 20 18:49:12 2020 (r362442) @@ -24,7 +24,8 @@ def ExynosM3Model : SchedMachineModel { let MispredictPenalty = 16; // Minimum branch misprediction penalty. let CompleteModel = 1; // Use the default model otherwise. - list UnsupportedFeatures = SVEUnsupported.F; + list UnsupportedFeatures = !listconcat(SVEUnsupported.F, + PAUnsupported.F); } //===----------------------------------------------------------------------===// Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td Sat Jun 20 18:49:12 2020 (r362442) @@ -24,7 +24,8 @@ def ExynosM4Model : SchedMachineModel { let MispredictPenalty = 16; // Minimum branch misprediction penalty. let CompleteModel = 1; // Use the default model otherwise. - list UnsupportedFeatures = SVEUnsupported.F; + list UnsupportedFeatures = !listconcat(SVEUnsupported.F, + PAUnsupported.F); } //===----------------------------------------------------------------------===// Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedExynosM5.td ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedExynosM5.td Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedExynosM5.td Sat Jun 20 18:49:12 2020 (r362442) @@ -24,7 +24,8 @@ def ExynosM5Model : SchedMachineModel { let MispredictPenalty = 15; // Minimum branch misprediction penalty. let CompleteModel = 1; // Use the default model otherwise. - list UnsupportedFeatures = SVEUnsupported.F; + list UnsupportedFeatures = !listconcat(SVEUnsupported.F, + PAUnsupported.F); } //===----------------------------------------------------------------------===// Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedFalkor.td ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedFalkor.td Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedFalkor.td Sat Jun 20 18:49:12 2020 (r362442) @@ -23,8 +23,8 @@ def FalkorModel : SchedMachineModel { let MispredictPenalty = 11; // Minimum branch misprediction penalty. let CompleteModel = 1; - list UnsupportedFeatures = SVEUnsupported.F; - + list UnsupportedFeatures = !listconcat(SVEUnsupported.F, + PAUnsupported.F); // FIXME: Remove when all errors have been fixed. let FullInstRWOverlapCheck = 0; } Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedKryo.td ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedKryo.td Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedKryo.td Sat Jun 20 18:49:12 2020 (r362442) @@ -27,8 +27,8 @@ def KryoModel : SchedMachineModel { let LoopMicroOpBufferSize = 16; let CompleteModel = 1; - list UnsupportedFeatures = SVEUnsupported.F; - + list UnsupportedFeatures = !listconcat(SVEUnsupported.F, + PAUnsupported.F); // FIXME: Remove when all errors have been fixed. let FullInstRWOverlapCheck = 0; } Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedThunderX.td ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedThunderX.td Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedThunderX.td Sat Jun 20 18:49:12 2020 (r362442) @@ -25,8 +25,8 @@ def ThunderXT8XModel : SchedMachineModel { let PostRAScheduler = 1; // Use PostRA scheduler. let CompleteModel = 1; - list UnsupportedFeatures = SVEUnsupported.F; - + list UnsupportedFeatures = !listconcat(SVEUnsupported.F, + PAUnsupported.F); // FIXME: Remove when all errors have been fixed. let FullInstRWOverlapCheck = 0; } Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedThunderX2T99.td ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedThunderX2T99.td Sat Jun 20 18:31:02 2020 (r362441) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedThunderX2T99.td Sat Jun 20 18:49:12 2020 (r362442) @@ -25,8 +25,8 @@ def ThunderX2T99Model : SchedMachineModel { let PostRAScheduler = 1; // Using PostRA sched. let CompleteModel = 1; - list UnsupportedFeatures = SVEUnsupported.F; - + list UnsupportedFeatures = !listconcat(SVEUnsupported.F, + PAUnsupported.F); // FIXME: Remove when all errors have been fixed. let FullInstRWOverlapCheck = 0; } Added: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedThunderX3T110.td ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedThunderX3T110.td Sat Jun 20 18:49:12 2020 (r362442) @@ -0,0 +1,1997 @@ +//=- AArch64SchedThunderX3T110.td - Marvell ThunderX3 T110 ---*- tablegen -*-=// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file defines the scheduling model for Marvell ThunderX3T110 +// family of processors. +// +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// Pipeline Description. + +def ThunderX3T110Model : SchedMachineModel { + let IssueWidth = 4; // 4 micro-ops dispatched at a time. + let MicroOpBufferSize = 70; // 70 entries in micro-op re-order buffer. + let LoadLatency = 4; // Optimistic load latency. + let MispredictPenalty = 12; // Extra cycles for mispredicted branch. + // Determined via a mix of micro-arch details and experimentation. + let LoopMicroOpBufferSize = 128; // FIXME: might be much bigger in TX3. + let PostRAScheduler = 1; // Using PostRA sched. + let CompleteModel = 1; + + list UnsupportedFeatures = !listconcat(SVEUnsupported.F, + PAUnsupported.F); + // FIXME: Remove when all errors have been fixed. + let FullInstRWOverlapCheck = 0; +} + +let SchedModel = ThunderX3T110Model in { + +// Issue ports. + +// Port 0: ALU. +def THX3T110P0 : ProcResource<1>; + +// Port 1: ALU. +def THX3T110P1 : ProcResource<1>; + +// Port 2: ALU/Branch. +def THX3T110P2 : ProcResource<1>; + +// Port 3: ALU/Branch. +def THX3T110P3 : ProcResource<1>; + +// Port 4: Load/Store. +def THX3T110P4 : ProcResource<1>; + +// Port 5: Load/store. +def THX3T110P5 : ProcResource<1>; + +// Port 6: FP/Neon/SIMD/Crypto. +def THX3T110P6FP0 : ProcResource<1>; + +// Port 7: FP/Neon/SIMD/Crypto. +def THX3T110P7FP1 : ProcResource<1>; + +// Port 8: FP/Neon/SIMD/Crypto. +def THX3T110P8FP2 : ProcResource<1>; + +// Port 9: FP/Neon/SIMD/Crypto. +def THX3T110P9FP3 : ProcResource<1>; + +// Port 10: Store Data Unit. +def THX3T110SD0 : ProcResource<1>; + +// Define groups for the functional units on each issue port. Each group +// created will be used by a WriteRes. + +// Integer divide/mulhi micro-ops only on port I1. +def THX3T110I1 : ProcResGroup<[THX3T110P1]>; + +// Branch micro-ops on ports I2/I3. +def THX3T110I23 : ProcResGroup<[THX3T110P2, THX3T110P3]>; + +// Branch micro-ops on ports I1/I2/I3. +def THX3T110I123 : ProcResGroup<[THX3T110P1, THX3T110P2, THX3T110P3]>; + +// Integer micro-ops on ports I0/I1/I2. +def THX3T110I012 : ProcResGroup<[THX3T110P0, THX3T110P1, THX3T110P2]>; + +// Integer micro-ops on ports I0/I1/I2/I3. +def THX3T110I0123 : ProcResGroup<[THX3T110P0, THX3T110P1, + THX3T110P2, THX3T110P3]>; + +// FP micro-ops on ports FP0/FP1/FP2/FP3. +def THX3T110FP0123 : ProcResGroup<[THX3T110P6FP0, THX3T110P7FP1, + THX3T110P8FP2, THX3T110P9FP3]>; + +// FP micro-ops on ports FP2/FP3. +def THX3T110FP23 : ProcResGroup<[THX3T110P8FP2, THX3T110P9FP3]>; + +// ASIMD micro-ops on ports FP0/FP1/FP2/FP3. +def THX3T110SIMD : ProcResGroup<[THX3T110P6FP0, THX3T110P7FP1, + THX3T110P8FP2, THX3T110P9FP3]>; + +// Store data micro-ops only on port 10. +def THX3T110SD : ProcResGroup<[THX3T110SD0]>; + +// Load/store micro-ops on ports P4/P5. +def THX3T110LS : ProcResGroup<[THX3T110P4, THX3T110P5]>; + +// 70 entry unified scheduler. +def THX3T110ANY: ProcResGroup<[THX3T110P0, THX3T110P1, THX3T110P2, + THX3T110P3, THX3T110P4, THX3T110P5, + THX3T110P6FP0, THX3T110P7FP1, + THX3T110P8FP2, THX3T110P9FP3]> { + let BufferSize = 70; +} + +// Define commonly used write types for InstRW specializations. +// All definitions follow the format: THX3T110Write_Cyc_. + +// 3 cycles on I1. +def THX3T110Write_3Cyc_I1 : SchedWriteRes<[THX3T110I1]> { + let Latency = 3; + let NumMicroOps = 2; +} + +// 4 cycles on I1. +def THX3T110Write_4Cyc_I1 : SchedWriteRes<[THX3T110I1]> { + let Latency = 4; + let NumMicroOps = 2; +} + +// 5 cycles on I1. +def THX3T110Write_5Cyc_I1 : SchedWriteRes<[THX3T110I1]> { + let Latency = 5; + let NumMicroOps = 2; +} + +// 7 cycles on I1. +def THX3T110Write_7Cyc_I1 : SchedWriteRes<[THX3T110I1]> { + let Latency = 7; + let NumMicroOps = 3; +} + +// 23 cycles on I1. +def THX3T110Write_23Cyc_I1 : SchedWriteRes<[THX3T110I1]> { + let Latency = 23; + let ResourceCycles = [13, 23]; + let NumMicroOps = 4; +} + +// 39 cycles on I1. +def THX3T110Write_39Cyc_I1 : SchedWriteRes<[THX3T110I1]> { + let Latency = 39; + let ResourceCycles = [13, 39]; + let NumMicroOps = 4; +} + +// 1 cycle on I2/I3 +def THX3T110Write_1Cyc_I23 : SchedWriteRes<[THX3T110I23]> { + let Latency = 1; + let NumMicroOps = 2; +} + +// 8 cycles on I2/I3 +def THX3T110Write_8Cyc_I23 : SchedWriteRes<[THX3T110I23]> { + let Latency = 8; + let NumMicroOps = 3; +} + +// 1 cycle on I1/I2/I3 +def THX3T110Write_1Cyc_I123 : SchedWriteRes<[THX3T110I123]> { + let Latency = 1; + let NumMicroOps = 2; +} + +// 8 cycles on I1/I2/I3 +def THX3T110Write_8Cyc_I123 : SchedWriteRes<[THX3T110I123]> { + let Latency = 8; + let NumMicroOps = 3; +} + +// 1 cycle on I0/I1/I2/I3. +def THX3T110Write_1Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { + let Latency = 1; + let NumMicroOps = 2; +} + +// 2 cycles on I0/I1/I2/I3. +def THX3T110Write_2Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { + let Latency = 2; + let NumMicroOps = 2; +} + +// 3 cycles on I0/I1/I2/I3. +def THX3T110Write_3Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { + let Latency = 3; + let NumMicroOps = 2; +} + +// 4 cycles on I0/I1/I2/I3. +def THX3T110Write_4Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { + let Latency = 4; + let NumMicroOps = 3; +} + +// 5 cycles on I0/I1/I2/I3. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jun 20 18:50:19 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 292A233099D; Sat, 20 Jun 2020 18:50:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49q4Vg0Dj4z4Z5J; Sat, 20 Jun 2020 18:50:19 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDD72108E9; Sat, 20 Jun 2020 18:50:18 +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 05KIoIqX067656; Sat, 20 Jun 2020 18:50:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05KIoIJe067655; Sat, 20 Jun 2020 18:50:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006201850.05KIoIJe067655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 20 Jun 2020 18:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362443 - vendor/llvm-project/llvmorg-10.0.0-97-g6f71678ecd2 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-project/llvmorg-10.0.0-97-g6f71678ecd2 X-SVN-Commit-Revision: 362443 X-SVN-Commit-Repository: base 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.33 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, 20 Jun 2020 18:50:19 -0000 Author: dim Date: Sat Jun 20 18:50:18 2020 New Revision: 362443 URL: https://svnweb.freebsd.org/changeset/base/362443 Log: Tag llvm-project branch release/10.x llvmorg-10.0.0-97-g6f71678ecd2. Added: vendor/llvm-project/llvmorg-10.0.0-97-g6f71678ecd2/ - copied from r362442, vendor/llvm-project/release-10.x/