From owner-svn-src-projects@freebsd.org Mon May 8 19:20:59 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E93ED6308B for ; Mon, 8 May 2017 19:20:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 189B91719; Mon, 8 May 2017 19:20:59 +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 v48JKwJH095275; Mon, 8 May 2017 19:20:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48JKt0b095251; Mon, 8 May 2017 19:20:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705081920.v48JKt0b095251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 8 May 2017 19:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r317969 - in projects/clang500-import: contrib/compiler-rt/include/xray contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contrib/compiler-rt/lib/cfi contrib/compiler-rt/lib... X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 19:20:59 -0000 Author: dim Date: Mon May 8 19:20:55 2017 New Revision: 317969 URL: https://svnweb.freebsd.org/changeset/base/317969 Log: Merge llvm, clang, lld, lldb, compiler-rt and libc++ r302418, and update build glue. Added: projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_android.cpp - copied unchanged from r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.cpp projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_android.inc - copied unchanged from r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.inc projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_context_android.inc - copied unchanged from r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_android.inc projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_context_linux.inc - copied unchanged from r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_linux.inc projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_linux.inc - copied unchanged from r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.inc projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_diag_standalone.cc - copied unchanged from r317962, vendor/compiler-rt/dist/lib/ubsan/ubsan_diag_standalone.cc projects/clang500-import/contrib/libc++/src/support/runtime/exception_pointer_msvc.ipp - copied unchanged from r317960, vendor/libc++/dist/src/support/runtime/exception_pointer_msvc.ipp projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MIRPrinter.h - copied unchanged from r317960, vendor/llvm/dist/include/llvm/CodeGen/MIRPrinter.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h - copied unchanged from r317960, vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/DbiModuleList.cpp - copied unchanged from r317960, vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiModuleList.cpp projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonDepIICHVX.td - copied unchanged from r317960, vendor/llvm/dist/lib/Target/Hexagon/HexagonDepIICHVX.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonDepIICScalar.td - copied unchanged from r317960, vendor/llvm/dist/lib/Target/Hexagon/HexagonDepIICScalar.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonDepTimingClasses.h - copied unchanged from r317960, vendor/llvm/dist/lib/Target/Hexagon/HexagonDepTimingClasses.h projects/clang500-import/contrib/llvm/tools/clang/lib/Headers/lwpintrin.h - copied unchanged from r317960, vendor/clang/dist/lib/Headers/lwpintrin.h projects/clang500-import/contrib/llvm/tools/lld/include/lld/Core/TaskGroup.h - copied unchanged from r317960, vendor/lld/dist/include/lld/Core/TaskGroup.h projects/clang500-import/contrib/llvm/tools/lld/lib/Core/TaskGroup.cpp - copied unchanged from r317960, vendor/lld/dist/lib/Core/TaskGroup.cpp Deleted: projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_linux.h projects/clang500-import/contrib/llvm/lib/CodeGen/MIRPrinter.h projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp projects/clang500-import/contrib/llvm/tools/lld/include/lld/Support/ Modified: projects/clang500-import/contrib/compiler-rt/include/xray/xray_interface.h projects/clang500-import/contrib/compiler-rt/lib/asan/asan_interceptors.cc projects/clang500-import/contrib/compiler-rt/lib/asan/asan_interceptors.h projects/clang500-import/contrib/compiler-rt/lib/builtins/emutls.c projects/clang500-import/contrib/compiler-rt/lib/builtins/int_types.h projects/clang500-import/contrib/compiler-rt/lib/cfi/cfi_blacklist.txt projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_allocator.cpp projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_allocator.h projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls.h projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_linux.cpp projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc projects/clang500-import/contrib/compiler-rt/lib/xray/xray_init.cc projects/clang500-import/contrib/compiler-rt/lib/xray/xray_interface.cc projects/clang500-import/contrib/compiler-rt/lib/xray/xray_interface_internal.h projects/clang500-import/contrib/libc++/include/__config projects/clang500-import/contrib/libc++/include/__locale projects/clang500-import/contrib/libc++/include/__threading_support projects/clang500-import/contrib/libc++/include/exception projects/clang500-import/contrib/libc++/include/experimental/dynarray projects/clang500-import/contrib/libc++/include/experimental/optional projects/clang500-import/contrib/libc++/include/functional projects/clang500-import/contrib/libc++/include/future projects/clang500-import/contrib/libc++/include/istream projects/clang500-import/contrib/libc++/include/locale projects/clang500-import/contrib/libc++/include/memory projects/clang500-import/contrib/libc++/include/new projects/clang500-import/contrib/libc++/include/ostream projects/clang500-import/contrib/libc++/include/random projects/clang500-import/contrib/libc++/include/shared_mutex projects/clang500-import/contrib/libc++/include/streambuf projects/clang500-import/contrib/libc++/include/typeinfo projects/clang500-import/contrib/libc++/src/exception.cpp projects/clang500-import/contrib/libc++/src/experimental/filesystem/operations.cpp projects/clang500-import/contrib/libc++/src/locale.cpp projects/clang500-import/contrib/libc++/src/memory.cpp projects/clang500-import/contrib/llvm/include/llvm/ADT/APInt.h projects/clang500-import/contrib/llvm/include/llvm/ADT/BitVector.h projects/clang500-import/contrib/llvm/include/llvm/ADT/SmallBitVector.h projects/clang500-import/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h projects/clang500-import/contrib/llvm/include/llvm/Analysis/ProfileSummaryInfo.h projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h projects/clang500-import/contrib/llvm/include/llvm/Analysis/TargetLibraryInfo.def projects/clang500-import/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/FastISel.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h projects/clang500-import/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeDatabase.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptor.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiStream.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/RawTypes.h projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/TpiStream.h projects/clang500-import/contrib/llvm/include/llvm/ExecutionEngine/Orc/RPCSerialization.h projects/clang500-import/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h projects/clang500-import/contrib/llvm/include/llvm/IR/Attributes.h projects/clang500-import/contrib/llvm/include/llvm/IR/BasicBlock.h projects/clang500-import/contrib/llvm/include/llvm/IR/CFG.h projects/clang500-import/contrib/llvm/include/llvm/IR/CallSite.h projects/clang500-import/contrib/llvm/include/llvm/IR/CallingConv.h projects/clang500-import/contrib/llvm/include/llvm/IR/ConstantRange.h projects/clang500-import/contrib/llvm/include/llvm/IR/DataLayout.h projects/clang500-import/contrib/llvm/include/llvm/IR/DebugInfo.h projects/clang500-import/contrib/llvm/include/llvm/IR/Dominators.h projects/clang500-import/contrib/llvm/include/llvm/IR/Function.h projects/clang500-import/contrib/llvm/include/llvm/IR/InlineAsm.h projects/clang500-import/contrib/llvm/include/llvm/IR/InstIterator.h projects/clang500-import/contrib/llvm/include/llvm/IR/InstrTypes.h projects/clang500-import/contrib/llvm/include/llvm/IR/Intrinsics.td projects/clang500-import/contrib/llvm/include/llvm/IR/IntrinsicsARM.td projects/clang500-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndex.h projects/clang500-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h projects/clang500-import/contrib/llvm/include/llvm/MC/ConstantPools.h projects/clang500-import/contrib/llvm/include/llvm/Object/COFF.h projects/clang500-import/contrib/llvm/include/llvm/Object/Wasm.h projects/clang500-import/contrib/llvm/include/llvm/ObjectYAML/WasmYAML.h projects/clang500-import/contrib/llvm/include/llvm/Support/AArch64TargetParser.def projects/clang500-import/contrib/llvm/include/llvm/Support/BinaryStreamArray.h projects/clang500-import/contrib/llvm/include/llvm/Support/COFF.h projects/clang500-import/contrib/llvm/include/llvm/Support/KnownBits.h projects/clang500-import/contrib/llvm/include/llvm/Support/MathExtras.h projects/clang500-import/contrib/llvm/include/llvm/Target/GlobalISel/SelectionDAGCompat.td projects/clang500-import/contrib/llvm/include/llvm/Target/Target.td projects/clang500-import/contrib/llvm/include/llvm/Target/TargetOpcodes.def projects/clang500-import/contrib/llvm/include/llvm/Transforms/Instrumentation.h projects/clang500-import/contrib/llvm/include/llvm/Transforms/Scalar/Float2Int.h projects/clang500-import/contrib/llvm/lib/Analysis/ConstantFolding.cpp projects/clang500-import/contrib/llvm/lib/Analysis/InstructionSimplify.cpp projects/clang500-import/contrib/llvm/lib/Analysis/LazyValueInfo.cpp projects/clang500-import/contrib/llvm/lib/Analysis/Lint.cpp projects/clang500-import/contrib/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp projects/clang500-import/contrib/llvm/lib/Analysis/ScalarEvolution.cpp projects/clang500-import/contrib/llvm/lib/Analysis/TargetLibraryInfo.cpp projects/clang500-import/contrib/llvm/lib/Analysis/ValueTracking.cpp projects/clang500-import/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp projects/clang500-import/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/BranchFolding.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/MIRParser/MIParser.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/MIRPrinter.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/MIRPrintingPass.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/MachineFrameInfo.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/MachineVerifier.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp projects/clang500-import/contrib/llvm/lib/CodeGen/XRayInstrumentation.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/TypeDatabase.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/TpiStream.cpp projects/clang500-import/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp projects/clang500-import/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h projects/clang500-import/contrib/llvm/lib/IR/ConstantRange.cpp projects/clang500-import/contrib/llvm/lib/IR/DataLayout.cpp projects/clang500-import/contrib/llvm/lib/IR/DebugInfo.cpp projects/clang500-import/contrib/llvm/lib/IR/Instruction.cpp projects/clang500-import/contrib/llvm/lib/IR/ModuleSummaryIndex.cpp projects/clang500-import/contrib/llvm/lib/LTO/LTO.cpp projects/clang500-import/contrib/llvm/lib/LTO/ThinLTOCodeGenerator.cpp projects/clang500-import/contrib/llvm/lib/MC/ConstantPools.cpp projects/clang500-import/contrib/llvm/lib/MC/MCParser/AsmParser.cpp projects/clang500-import/contrib/llvm/lib/Object/COFFObjectFile.cpp projects/clang500-import/contrib/llvm/lib/Object/WasmObjectFile.cpp projects/clang500-import/contrib/llvm/lib/ObjectYAML/WasmYAML.cpp projects/clang500-import/contrib/llvm/lib/Passes/PassBuilder.cpp projects/clang500-import/contrib/llvm/lib/Support/APInt.cpp projects/clang500-import/contrib/llvm/lib/Support/TargetParser.cpp projects/clang500-import/contrib/llvm/lib/Support/Unix/DynamicLibrary.inc projects/clang500-import/contrib/llvm/lib/Support/Unix/Path.inc projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64.h projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64.td projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.h projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.h projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMISelLowering.h projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMRegisterBankInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMRegisterBankInfo.h projects/clang500-import/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp projects/clang500-import/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp projects/clang500-import/contrib/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonDepITypes.h projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonDepITypes.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonDepInstrFormats.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonDepInstrInfo.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonIICHVX.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonIICScalar.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormats.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV4.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV60.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.h projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonPatterns.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonPseudo.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonSchedule.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV4.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV55.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV60.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV62.td projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.h projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp projects/clang500-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h projects/clang500-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp projects/clang500-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp projects/clang500-import/contrib/llvm/lib/Target/Hexagon/RDFLiveness.cpp projects/clang500-import/contrib/llvm/lib/Target/Hexagon/RDFRegisters.cpp projects/clang500-import/contrib/llvm/lib/Target/Hexagon/RDFRegisters.h projects/clang500-import/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp projects/clang500-import/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td projects/clang500-import/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp projects/clang500-import/contrib/llvm/lib/Target/X86/AsmParser/X86Operand.h projects/clang500-import/contrib/llvm/lib/Target/X86/X86AsmPrinter.h projects/clang500-import/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp projects/clang500-import/contrib/llvm/lib/Target/X86/X86InstrAVX512.td projects/clang500-import/contrib/llvm/lib/Target/X86/X86InstrInfo.td projects/clang500-import/contrib/llvm/lib/Target/X86/X86InstrSSE.td projects/clang500-import/contrib/llvm/lib/Target/X86/X86InstructionSelector.cpp projects/clang500-import/contrib/llvm/lib/Target/X86/X86LegalizerInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/X86/X86LegalizerInfo.h projects/clang500-import/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp projects/clang500-import/contrib/llvm/lib/Target/X86/X86OptimizeLEAs.cpp projects/clang500-import/contrib/llvm/lib/Target/X86/X86RegisterBankInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/X86/X86RegisterBankInfo.h projects/clang500-import/contrib/llvm/lib/Target/X86/X86Subtarget.cpp projects/clang500-import/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp projects/clang500-import/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp projects/clang500-import/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp projects/clang500-import/contrib/llvm/lib/Transforms/IPO/FunctionImport.cpp projects/clang500-import/contrib/llvm/lib/Transforms/IPO/LowerTypeTests.cpp projects/clang500-import/contrib/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp projects/clang500-import/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/Float2Int.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/NewGVN.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Utils/BuildLibCalls.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Utils/ValueMapper.cpp projects/clang500-import/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp projects/clang500-import/contrib/llvm/tools/clang/include/clang/AST/ODRHash.h projects/clang500-import/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/Attr.td projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86_64.def projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td projects/clang500-import/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td projects/clang500-import/contrib/llvm/tools/clang/include/clang/Driver/Distro.h projects/clang500-import/contrib/llvm/tools/clang/include/clang/Driver/Multilib.h projects/clang500-import/contrib/llvm/tools/clang/include/clang/Driver/Options.td projects/clang500-import/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def projects/clang500-import/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h projects/clang500-import/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h projects/clang500-import/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h projects/clang500-import/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h projects/clang500-import/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h projects/clang500-import/contrib/llvm/tools/clang/include/clang/Sema/Sema.h projects/clang500-import/contrib/llvm/tools/clang/include/clang/Tooling/FixIt.h projects/clang500-import/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Basic/Targets.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/Distro.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/Multilib.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/CrossWindows.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Gnu.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Format/FormatToken.h projects/clang500-import/contrib/llvm/tools/clang/lib/Format/FormatTokenLexer.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/Rewrite/FrontendActions.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Headers/arm_acle.h projects/clang500-import/contrib/llvm/tools/clang/lib/Headers/x86intrin.h projects/clang500-import/contrib/llvm/tools/clang/lib/Index/IndexDecl.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/Sema.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp projects/clang500-import/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp projects/clang500-import/contrib/llvm/tools/lld/CMakeLists.txt projects/clang500-import/contrib/llvm/tools/lld/COFF/Chunks.h projects/clang500-import/contrib/llvm/tools/lld/COFF/ICF.cpp projects/clang500-import/contrib/llvm/tools/lld/COFF/PDB.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/Config.h projects/clang500-import/contrib/llvm/tools/lld/ELF/Driver.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/InputFiles.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/InputFiles.h projects/clang500-import/contrib/llvm/tools/lld/ELF/LinkerScript.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/LinkerScript.h projects/clang500-import/contrib/llvm/tools/lld/ELF/Options.td projects/clang500-import/contrib/llvm/tools/lld/ELF/OutputSections.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/Relocations.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/SymbolTable.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/Symbols.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/Target.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/Target.h projects/clang500-import/contrib/llvm/tools/lld/ELF/Writer.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/Writer.h projects/clang500-import/contrib/llvm/tools/lld/include/lld/Core/Parallel.h projects/clang500-import/contrib/llvm/tools/lld/lib/Core/CMakeLists.txt projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/API/SBAddress.h projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/API/SBInstruction.h projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/API/SBInstructionList.h projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/Core/Disassembler.h projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/Expression/Expression.h projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/Host/MainLoop.h projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/Host/common/UDPSocket.h projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallFunction.h projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallUserExpression.h projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/Utility/TaskPool.h projects/clang500-import/contrib/llvm/tools/lldb/source/API/SBAddress.cpp projects/clang500-import/contrib/llvm/tools/lldb/source/API/SBInstruction.cpp projects/clang500-import/contrib/llvm/tools/lldb/source/API/SBInstructionList.cpp projects/clang500-import/contrib/llvm/tools/lldb/source/API/SBProcess.cpp projects/clang500-import/contrib/llvm/tools/lldb/source/Core/Disassembler.cpp projects/clang500-import/contrib/llvm/tools/lldb/source/Host/common/Editline.cpp projects/clang500-import/contrib/llvm/tools/lldb/source/Host/common/MainLoop.cpp projects/clang500-import/contrib/llvm/tools/lldb/source/Host/common/UDPSocket.cpp projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp projects/clang500-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp projects/clang500-import/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallUserExpression.cpp projects/clang500-import/contrib/llvm/tools/lldb/source/Utility/TaskPool.cpp projects/clang500-import/contrib/llvm/tools/llvm-link/llvm-link.cpp projects/clang500-import/contrib/llvm/tools/llvm-lto/llvm-lto.cpp projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/Analyze.cpp projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/LLVMOutputStyle.h projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/StreamUtil.cpp projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/YAMLOutputStyle.cpp projects/clang500-import/contrib/llvm/tools/llvm-readobj/COFFDumper.cpp projects/clang500-import/contrib/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp projects/clang500-import/lib/clang/include/clang/Basic/Version.inc projects/clang500-import/lib/clang/include/lld/Config/Version.inc projects/clang500-import/lib/clang/include/llvm/Support/VCSRevision.h projects/clang500-import/lib/clang/libllvm/Makefile projects/clang500-import/usr.bin/clang/lld/Makefile Directory Properties: projects/clang500-import/contrib/compiler-rt/ (props changed) projects/clang500-import/contrib/libc++/ (props changed) projects/clang500-import/contrib/llvm/ (props changed) projects/clang500-import/contrib/llvm/tools/clang/ (props changed) projects/clang500-import/contrib/llvm/tools/lld/ (props changed) projects/clang500-import/contrib/llvm/tools/lldb/ (props changed) Modified: projects/clang500-import/contrib/compiler-rt/include/xray/xray_interface.h ============================================================================== --- projects/clang500-import/contrib/compiler-rt/include/xray/xray_interface.h Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/include/xray/xray_interface.h Mon May 8 19:20:55 2017 (r317969) @@ -15,10 +15,11 @@ #define XRAY_XRAY_INTERFACE_H #include +#include extern "C" { -// Synchronize this with AsmPrinter::SledKind in LLVM. +/// Synchronize this with AsmPrinter::SledKind in LLVM. enum XRayEntryType { ENTRY = 0, EXIT = 1, @@ -26,32 +27,43 @@ enum XRayEntryType { LOG_ARGS_ENTRY = 3, }; -// Provide a function to invoke for when instrumentation points are hit. This is -// a user-visible control surface that overrides the default implementation. The -// function provided should take the following arguments: -// -// - function id: an identifier that indicates the id of a function; this id -// is generated by xray; the mapping between the function id -// and the actual function pointer is available through -// __xray_table. -// - entry type: identifies what kind of instrumentation point was encountered -// (function entry, function exit, etc.). See the enum -// XRayEntryType for more details. -// -// The user handler must handle correctly spurious calls after this handler is -// removed or replaced with another handler, because it would be too costly for -// XRay runtime to avoid spurious calls. -// To prevent circular calling, the handler function itself and all its -// direct&indirect callees must not be instrumented with XRay, which can be -// achieved by marking them all with: __attribute__((xray_never_instrument)) -// -// Returns 1 on success, 0 on error. +/// Provide a function to invoke for when instrumentation points are hit. This +/// is a user-visible control surface that overrides the default implementation. +/// The function provided should take the following arguments: +/// +/// - function id: an identifier that indicates the id of a function; this id +/// is generated by xray; the mapping between the function id +/// and the actual function pointer is available through +/// __xray_table. +/// - entry type: identifies what kind of instrumentation point was +/// encountered (function entry, function exit, etc.). See the +/// enum XRayEntryType for more details. +/// +/// The user handler must handle correctly spurious calls after this handler is +/// removed or replaced with another handler, because it would be too costly for +/// XRay runtime to avoid spurious calls. +/// To prevent circular calling, the handler function itself and all its +/// direct&indirect callees must not be instrumented with XRay, which can be +/// achieved by marking them all with: __attribute__((xray_never_instrument)) +/// +/// Returns 1 on success, 0 on error. extern int __xray_set_handler(void (*entry)(int32_t, XRayEntryType)); -// This removes whatever the currently provided handler is. Returns 1 on -// success, 0 on error. +/// This removes whatever the currently provided handler is. Returns 1 on +/// success, 0 on error. extern int __xray_remove_handler(); +/// Use XRay to log the first argument of each (instrumented) function call. +/// When this function exits, all threads will have observed the effect and +/// start logging their subsequent affected function calls (if patched). +/// +/// Returns 1 on success, 0 on error. +extern int __xray_set_handler_arg1(void (*)(int32_t, XRayEntryType, uint64_t)); + +/// Disables the XRay handler used to log first arguments of function calls. +/// Returns 1 on success, 0 on error. +extern int __xray_remove_handler_arg1(); + enum XRayPatchingStatus { NOT_INITIALIZED = 0, SUCCESS = 1, @@ -59,24 +71,31 @@ enum XRayPatchingStatus { FAILED = 3, }; -// This tells XRay to patch the instrumentation points. See XRayPatchingStatus -// for possible result values. +/// This tells XRay to patch the instrumentation points. See XRayPatchingStatus +/// for possible result values. extern XRayPatchingStatus __xray_patch(); -// Reverses the effect of __xray_patch(). See XRayPatchingStatus for possible -// result values. +/// Reverses the effect of __xray_patch(). See XRayPatchingStatus for possible +/// result values. extern XRayPatchingStatus __xray_unpatch(); -// Use XRay to log the first argument of each (instrumented) function call. -// When this function exits, all threads will have observed the effect and -// start logging their subsequent affected function calls (if patched). -// -// Returns 1 on success, 0 on error. -extern int __xray_set_handler_arg1(void (*)(int32_t, XRayEntryType, uint64_t)); +/// This patches a specific function id. See XRayPatchingStatus for possible +/// result values. +extern XRayPatchingStatus __xray_patch_function(int32_t FuncId); + +/// This unpatches a specific function id. See XRayPatchingStatus for possible +/// result values. +extern XRayPatchingStatus __xray_unpatch_function(int32_t FuncId); + +/// This function returns the address of the function provided a valid function +/// id. We return 0 if we encounter any error, even if 0 may be a valid function +/// address. +extern uintptr_t __xray_function_address(int32_t FuncId); + +/// This function returns the maximum valid function id. Returns 0 if we +/// encounter errors (when there are no instrumented functions, etc.). +extern size_t __xray_max_function_id(); -// Disables the XRay handler used to log first arguments of function calls. -// Returns 1 on success, 0 on error. -extern int __xray_remove_handler_arg1(); } #endif Modified: projects/clang500-import/contrib/compiler-rt/lib/asan/asan_interceptors.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/asan/asan_interceptors.cc Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/asan/asan_interceptors.cc Mon May 8 19:20:55 2017 (r317969) @@ -443,6 +443,13 @@ INTERCEPTOR(void, _longjmp, void *env, i } #endif +#if ASAN_INTERCEPT___LONGJMP_CHK +INTERCEPTOR(void, __longjmp_chk, void *env, int val) { + __asan_handle_no_return(); + REAL(__longjmp_chk)(env, val); +} +#endif + #if ASAN_INTERCEPT_SIGLONGJMP INTERCEPTOR(void, siglongjmp, void *env, int val) { __asan_handle_no_return(); @@ -758,6 +765,9 @@ void InitializeAsanInterceptors() { #if ASAN_INTERCEPT__LONGJMP ASAN_INTERCEPT_FUNC(_longjmp); #endif +#if ASAN_INTERCEPT___LONGJMP_CHK + ASAN_INTERCEPT_FUNC(__longjmp_chk); +#endif #if ASAN_INTERCEPT_SIGLONGJMP ASAN_INTERCEPT_FUNC(siglongjmp); #endif Modified: projects/clang500-import/contrib/compiler-rt/lib/asan/asan_interceptors.h ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/asan/asan_interceptors.h Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/asan/asan_interceptors.h Mon May 8 19:20:55 2017 (r317969) @@ -58,6 +58,12 @@ # define ASAN_INTERCEPT_SIGLONGJMP 0 #endif +#if SANITIZER_LINUX && !SANITIZER_ANDROID +# define ASAN_INTERCEPT___LONGJMP_CHK 1 +#else +# define ASAN_INTERCEPT___LONGJMP_CHK 0 +#endif + // Android bug: https://code.google.com/p/android/issues/detail?id=61799 #if ASAN_HAS_EXCEPTIONS && !SANITIZER_WINDOWS && \ !(SANITIZER_ANDROID && defined(__i386)) Modified: projects/clang500-import/contrib/compiler-rt/lib/builtins/emutls.c ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/builtins/emutls.c Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/builtins/emutls.c Mon May 8 19:20:55 2017 (r317969) @@ -98,7 +98,7 @@ static __inline emutls_address_array* em #else -#include +#include #include #include #include Modified: projects/clang500-import/contrib/compiler-rt/lib/builtins/int_types.h ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/builtins/int_types.h Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/builtins/int_types.h Mon May 8 19:20:55 2017 (r317969) @@ -60,9 +60,7 @@ typedef union }s; } udwords; -/* MIPS64 issue: PR 20098 */ -#if (defined(__LP64__) || defined(__wasm__)) && \ - !(defined(__mips__) && defined(__clang__)) +#if (defined(__LP64__) || defined(__wasm__) || defined(__mips64)) #define CRT_HAS_128BIT #endif Modified: projects/clang500-import/contrib/compiler-rt/lib/cfi/cfi_blacklist.txt ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/cfi/cfi_blacklist.txt Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/cfi/cfi_blacklist.txt Mon May 8 19:20:55 2017 (r317969) @@ -24,3 +24,8 @@ fun:_ZNSt3__19addressof* # Windows C++ stdlib headers that contain bad unrelated casts. src:*xmemory0 src:*xstddef + +# std::_Sp_counted_ptr_inplace::_Sp_counted_ptr_inplace() (libstdc++). +# This ctor is used by std::make_shared and needs to cast to uninitialized T* +# in order to call std::allocator_traits::construct. +fun:_ZNSt23_Sp_counted_ptr_inplace* Modified: projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_allocator.cpp ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_allocator.cpp Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_allocator.cpp Mon May 8 19:20:55 2017 (r317969) @@ -368,11 +368,12 @@ struct ScudoAllocator { void *Ptr; uptr Salt; uptr AllocationAlignment = FromPrimary ? MinAlignment : Alignment; - ScudoThreadContext *ThreadContext = getThreadContext(); + ScudoThreadContext *ThreadContext = getThreadContextAndLock(); if (LIKELY(ThreadContext)) { Salt = getPrng(ThreadContext)->getNext(); Ptr = BackendAllocator.Allocate(getAllocatorCache(ThreadContext), NeededSize, AllocationAlignment); + ThreadContext->unlock(); } else { SpinMutexLock l(&FallbackMutex); Salt = FallbackPrng.getNext(); @@ -434,9 +435,10 @@ struct ScudoAllocator { if (BypassQuarantine) { Chunk->eraseHeader(); void *Ptr = Chunk->getAllocBeg(Header); - ScudoThreadContext *ThreadContext = getThreadContext(); + ScudoThreadContext *ThreadContext = getThreadContextAndLock(); if (LIKELY(ThreadContext)) { getBackendAllocator().Deallocate(getAllocatorCache(ThreadContext), Ptr); + ThreadContext->unlock(); } else { SpinMutexLock Lock(&FallbackMutex); getBackendAllocator().Deallocate(&FallbackAllocatorCache, Ptr); @@ -445,12 +447,13 @@ struct ScudoAllocator { UnpackedHeader NewHeader = *Header; NewHeader.State = ChunkQuarantine; Chunk->compareExchangeHeader(&NewHeader, Header); - ScudoThreadContext *ThreadContext = getThreadContext(); + ScudoThreadContext *ThreadContext = getThreadContextAndLock(); if (LIKELY(ThreadContext)) { AllocatorQuarantine.Put(getQuarantineCache(ThreadContext), QuarantineCallback( getAllocatorCache(ThreadContext)), Chunk, Size); + ThreadContext->unlock(); } else { SpinMutexLock l(&FallbackMutex); AllocatorQuarantine.Put(&FallbackQuarantineCache, Modified: projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_allocator.h ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_allocator.h Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_allocator.h Mon May 8 19:20:55 2017 (r317969) @@ -72,7 +72,13 @@ const uptr AlignedChunkHeaderSize = #if SANITIZER_CAN_USE_ALLOCATOR64 const uptr AllocatorSpace = ~0ULL; -const uptr AllocatorSize = 0x40000000000ULL; // 4TB. +# if defined(__aarch64__) && SANITIZER_ANDROID +const uptr AllocatorSize = 0x4000000000ULL; // 256G. +# elif defined(__aarch64__) +const uptr AllocatorSize = 0x10000000000ULL; // 1T. +# else +const uptr AllocatorSize = 0x40000000000ULL; // 4T. +# endif typedef DefaultSizeClassMap SizeClassMap; struct AP { static const uptr kSpaceBeg = AllocatorSpace; Modified: projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls.h ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls.h Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls.h Mon May 8 19:20:55 2017 (r317969) @@ -19,10 +19,16 @@ #include "scudo_allocator.h" #include "scudo_utils.h" +#include "sanitizer_common/sanitizer_linux.h" +#include "sanitizer_common/sanitizer_platform.h" + namespace __scudo { -struct ALIGNED(64) ScudoThreadContext { - public: +// Platform specific base thread context definitions. +#include "scudo_tls_context_android.inc" +#include "scudo_tls_context_linux.inc" + +struct ALIGNED(64) ScudoThreadContext : public ScudoThreadContextPlatform { AllocatorCache Cache; Xorshift128Plus Prng; uptr QuarantineCachePlaceHolder[4]; @@ -32,8 +38,9 @@ struct ALIGNED(64) ScudoThreadContext { void initThread(); -// Fastpath functions are defined in the following platform specific headers. -#include "scudo_tls_linux.h" +// Platform specific dastpath functions definitions. +#include "scudo_tls_android.inc" +#include "scudo_tls_linux.inc" } // namespace __scudo Copied: projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_android.cpp (from r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.cpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_android.cpp Mon May 8 19:20:55 2017 (r317969, copy of r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.cpp) @@ -0,0 +1,95 @@ +//===-- scudo_tls_android.cpp -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +/// +/// Scudo thread local structure implementation for Android. +/// +//===----------------------------------------------------------------------===// + +#include "sanitizer_common/sanitizer_platform.h" + +#if SANITIZER_LINUX && SANITIZER_ANDROID + +#include "scudo_tls.h" + +#include + +namespace __scudo { + +static pthread_once_t GlobalInitialized = PTHREAD_ONCE_INIT; +static pthread_key_t PThreadKey; + +static atomic_uint32_t ThreadContextCurrentIndex; +static ScudoThreadContext *ThreadContexts; +static uptr NumberOfContexts; + +// sysconf(_SC_NPROCESSORS_{CONF,ONLN}) cannot be used as they allocate memory. +static uptr getNumberOfCPUs() { + cpu_set_t CPUs; + CHECK_EQ(sched_getaffinity(0, sizeof(cpu_set_t), &CPUs), 0); + return CPU_COUNT(&CPUs); +} + +static void initOnce() { + // Hack: TLS_SLOT_TSAN was introduced in N. To be able to use it on M for + // testing, we create an unused key. Since the key_data array follows the tls + // array, it basically gives us the extra entry we need. + // TODO(kostyak): remove and restrict to N and above. + CHECK_EQ(pthread_key_create(&PThreadKey, NULL), 0); + initScudo(); + NumberOfContexts = getNumberOfCPUs(); + ThreadContexts = reinterpret_cast( + MmapOrDie(sizeof(ScudoThreadContext) * NumberOfContexts, __func__)); + for (int i = 0; i < NumberOfContexts; i++) + ThreadContexts[i].init(); +} + +void initThread() { + pthread_once(&GlobalInitialized, initOnce); + // Initial context assignment is done in a plain round-robin fashion. + u32 Index = atomic_fetch_add(&ThreadContextCurrentIndex, 1, + memory_order_relaxed); + ScudoThreadContext *ThreadContext = + &ThreadContexts[Index % NumberOfContexts]; + *get_android_tls_ptr() = reinterpret_cast(ThreadContext); +} + +ScudoThreadContext *getThreadContextAndLockSlow() { + ScudoThreadContext *ThreadContext; + // Go through all the contexts and find the first unlocked one. + for (u32 i = 0; i < NumberOfContexts; i++) { + ThreadContext = &ThreadContexts[i]; + if (ThreadContext->tryLock()) { + *get_android_tls_ptr() = reinterpret_cast(ThreadContext); + return ThreadContext; + } + } + // No luck, find the one with the lowest precedence, and slow lock it. + u64 Precedence = UINT64_MAX; + for (u32 i = 0; i < NumberOfContexts; i++) { + u64 SlowLockPrecedence = ThreadContexts[i].getSlowLockPrecedence(); + if (SlowLockPrecedence && SlowLockPrecedence < Precedence) { + ThreadContext = &ThreadContexts[i]; + Precedence = SlowLockPrecedence; + } + } + if (LIKELY(Precedence != UINT64_MAX)) { + ThreadContext->lock(); + *get_android_tls_ptr() = reinterpret_cast(ThreadContext); + return ThreadContext; + } + // Last resort (can this happen?), stick with the current one. + ThreadContext = + reinterpret_cast(*get_android_tls_ptr()); + ThreadContext->lock(); + return ThreadContext; +} + +} // namespace __scudo + +#endif // SANITIZER_LINUX && SANITIZER_ANDROID Copied: projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_android.inc (from r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_android.inc Mon May 8 19:20:55 2017 (r317969, copy of r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.inc) @@ -0,0 +1,44 @@ +//===-- scudo_tls_android.inc -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +/// +/// Scudo thread local structure fastpath functions implementation for Android. +/// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_TLS_ANDROID_H_ +#define SCUDO_TLS_ANDROID_H_ + +#ifndef SCUDO_TLS_H_ +# error "This file must be included inside scudo_tls.h." +#endif // SCUDO_TLS_H_ + +#if SANITIZER_LINUX && SANITIZER_ANDROID + +ALWAYS_INLINE void initThreadMaybe() { + if (LIKELY(*get_android_tls_ptr())) + return; + initThread(); +} + +ScudoThreadContext *getThreadContextAndLockSlow(); + +ALWAYS_INLINE ScudoThreadContext *getThreadContextAndLock() { + ScudoThreadContext *ThreadContext = + reinterpret_cast(*get_android_tls_ptr()); + CHECK(ThreadContext); + // Try to lock the currently associated context. + if (ThreadContext->tryLock()) + return ThreadContext; + // If it failed, go the slow path. + return getThreadContextAndLockSlow(); +} + +#endif // SANITIZER_LINUX && SANITIZER_ANDROID + +#endif // SCUDO_TLS_ANDROID_H_ Copied: projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_context_android.inc (from r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_android.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_context_android.inc Mon May 8 19:20:55 2017 (r317969, copy of r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_android.inc) @@ -0,0 +1,54 @@ +//===-- scudo_tls_context_android.inc ---------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +/// +/// Android specific base thread context definition. +/// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_TLS_CONTEXT_ANDROID_INC_ +#define SCUDO_TLS_CONTEXT_ANDROID_INC_ + +#ifndef SCUDO_TLS_H_ +# error "This file must be included inside scudo_tls.h." +#endif // SCUDO_TLS_H_ + +#if SANITIZER_LINUX && SANITIZER_ANDROID + +struct ScudoThreadContextPlatform { + INLINE bool tryLock() { + if (Mutex.TryLock()) { + atomic_store_relaxed(&SlowLockPrecedence, 0); + return true; + } + if (atomic_load_relaxed(&SlowLockPrecedence) == 0) + atomic_store_relaxed(&SlowLockPrecedence, NanoTime()); + return false; + } + + INLINE void lock() { + Mutex.Lock(); + atomic_store_relaxed(&SlowLockPrecedence, 0); + } + + INLINE void unlock() { + Mutex.Unlock(); + } + + INLINE u64 getSlowLockPrecedence() { + return atomic_load_relaxed(&SlowLockPrecedence); + } + + private: + StaticSpinMutex Mutex; + atomic_uint64_t SlowLockPrecedence; +}; + +#endif // SANITIZER_LINUX && SANITIZER_ANDROID + +#endif // SCUDO_TLS_CONTEXT_ANDROID_INC_ Copied: projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_context_linux.inc (from r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_linux.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_context_linux.inc Mon May 8 19:20:55 2017 (r317969, copy of r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_linux.inc) @@ -0,0 +1,29 @@ +//===-- scudo_tls_context_linux.inc -----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +/// +/// Linux specific base thread context definition. +/// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_TLS_CONTEXT_LINUX_INC_ +#define SCUDO_TLS_CONTEXT_LINUX_INC_ + +#ifndef SCUDO_TLS_H_ +# error "This file must be included inside scudo_tls.h." +#endif // SCUDO_TLS_H_ + +#if SANITIZER_LINUX && !SANITIZER_ANDROID + +struct ScudoThreadContextPlatform { + ALWAYS_INLINE void unlock() {} +}; + +#endif // SANITIZER_LINUX && !SANITIZER_ANDROID + +#endif // SCUDO_TLS_CONTEXT_LINUX_INC_ Modified: projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_linux.cpp ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_linux.cpp Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_linux.cpp Mon May 8 19:20:55 2017 (r317969) @@ -14,7 +14,7 @@ #include "sanitizer_common/sanitizer_platform.h" -#if SANITIZER_LINUX +#if SANITIZER_LINUX && !SANITIZER_ANDROID #include "scudo_tls.h" @@ -26,8 +26,10 @@ namespace __scudo { static pthread_once_t GlobalInitialized = PTHREAD_ONCE_INIT; static pthread_key_t PThreadKey; -thread_local ThreadState ScudoThreadState = ThreadNotInitialized; -thread_local ScudoThreadContext ThreadLocalContext; +__attribute__((tls_model("initial-exec"))) +THREADLOCAL ThreadState ScudoThreadState = ThreadNotInitialized; +__attribute__((tls_model("initial-exec"))) +THREADLOCAL ScudoThreadContext ThreadLocalContext; static void teardownThread(void *Ptr) { uptr Iteration = reinterpret_cast(Ptr); @@ -59,4 +61,4 @@ void initThread() { } // namespace __scudo -#endif // SANITIZER_LINUX +#endif // SANITIZER_LINUX && !SANITIZER_ANDROID Copied: projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_linux.inc (from r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang500-import/contrib/compiler-rt/lib/scudo/scudo_tls_linux.inc Mon May 8 19:20:55 2017 (r317969, copy of r317962, vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.inc) @@ -0,0 +1,48 @@ +//===-- scudo_tls_linux.inc -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +/// +/// Scudo thread local structure fastpath functions implementation for platforms +/// supporting thread_local. +/// +//===----------------------------------------------------------------------===// + +#ifndef SCUDO_TLS_LINUX_H_ +#define SCUDO_TLS_LINUX_H_ + +#ifndef SCUDO_TLS_H_ +# error "This file must be included inside scudo_tls.h." +#endif // SCUDO_TLS_H_ + +#if SANITIZER_LINUX && !SANITIZER_ANDROID + +enum ThreadState : u8 { + ThreadNotInitialized = 0, + ThreadInitialized, + ThreadTornDown, +}; +__attribute__((tls_model("initial-exec"))) +extern THREADLOCAL ThreadState ScudoThreadState; +__attribute__((tls_model("initial-exec"))) +extern THREADLOCAL ScudoThreadContext ThreadLocalContext; + +ALWAYS_INLINE void initThreadMaybe() { + if (LIKELY(ScudoThreadState != ThreadNotInitialized)) + return; + initThread(); +} + +ALWAYS_INLINE ScudoThreadContext *getThreadContextAndLock() { + if (UNLIKELY(ScudoThreadState == ThreadTornDown)) + return nullptr; + return &ThreadLocalContext; +} + +#endif // SANITIZER_LINUX && !SANITIZER_ANDROID + +#endif // SCUDO_TLS_LINUX_H_ Copied: projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_diag_standalone.cc (from r317962, vendor/compiler-rt/dist/lib/ubsan/ubsan_diag_standalone.cc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_diag_standalone.cc Mon May 8 19:20:55 2017 (r317969, copy of r317962, vendor/compiler-rt/dist/lib/ubsan/ubsan_diag_standalone.cc) @@ -0,0 +1,37 @@ +//===-- ubsan_diag_standalone.cc ------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Diagnostic reporting for the standalone UBSan runtime. +// +//===----------------------------------------------------------------------===// + +#include "ubsan_platform.h" +#if CAN_SANITIZE_UB +#include "ubsan_diag.h" + +using namespace __ubsan; + +extern "C" { +SANITIZER_INTERFACE_ATTRIBUTE +void __sanitizer_print_stack_trace() { + uptr top = 0; + uptr bottom = 0; + bool request_fast_unwind = common_flags()->fast_unwind_on_fatal; + if (request_fast_unwind) + __sanitizer::GetThreadStackTopAndBottom(false, &top, &bottom); + + GET_REPORT_OPTIONS(false); + BufferedStackTrace stack; + stack.Unwind(kStackTraceMax, Opts.pc, Opts.bp, nullptr, top, bottom, + request_fast_unwind); + stack.Print(); +} +} // extern "C" + +#endif // CAN_SANITIZE_UB Modified: projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc Mon May 8 19:20:55 2017 (r317969) @@ -410,7 +410,8 @@ static void handleLoadInvalidValue(Inval SourceLocation Loc = Data->Loc.acquire(); // This check could be more precise if we used different handlers for // -fsanitize=bool and -fsanitize=enum. - bool IsBool = (0 == internal_strcmp(Data->Type.getTypeName(), "'bool'")); + bool IsBool = (0 == internal_strcmp(Data->Type.getTypeName(), "'bool'")) || + (0 == internal_strncmp(Data->Type.getTypeName(), "'BOOL'", 6)); ErrorType ET = IsBool ? ErrorType::InvalidBoolLoad : ErrorType::InvalidEnumLoad; Modified: projects/clang500-import/contrib/compiler-rt/lib/xray/xray_init.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/xray/xray_init.cc Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/xray/xray_init.cc Mon May 8 19:20:55 2017 (r317969) @@ -25,6 +25,8 @@ extern "C" { void __xray_init(); extern const XRaySledEntry __start_xray_instr_map[] __attribute__((weak)); extern const XRaySledEntry __stop_xray_instr_map[] __attribute__((weak)); +extern const XRayFunctionSledIndex __start_xray_fn_idx[] __attribute__((weak)); +extern const XRayFunctionSledIndex __stop_xray_fn_idx[] __attribute__((weak)); } using namespace __xray; @@ -55,6 +57,8 @@ void __xray_init() XRAY_NEVER_INSTRUMENT __sanitizer::SpinMutexLock Guard(&XRayInstrMapMutex); XRayInstrMap.Sleds = __start_xray_instr_map; XRayInstrMap.Entries = __stop_xray_instr_map - __start_xray_instr_map; + XRayInstrMap.SledsIndex = __start_xray_fn_idx; + XRayInstrMap.Functions = __stop_xray_fn_idx - __start_xray_fn_idx; } __sanitizer::atomic_store(&XRayInitialized, true, __sanitizer::memory_order_release); Modified: projects/clang500-import/contrib/compiler-rt/lib/xray/xray_interface.cc ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/xray/xray_interface.cc Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/xray/xray_interface.cc Mon May 8 19:20:55 2017 (r317969) @@ -132,12 +132,48 @@ CleanupInvoker scopeCleanup(Fu return CleanupInvoker{Fn}; } +inline bool patchSled(const XRaySledEntry &Sled, bool Enable, + int32_t FuncId) XRAY_NEVER_INSTRUMENT { + // While we're here, we should patch the nop sled. To do that we mprotect + // the page containing the function to be writeable. + const uint64_t PageSize = GetPageSizeCached(); + void *PageAlignedAddr = + reinterpret_cast(Sled.Address & ~(PageSize - 1)); + std::size_t MProtectLen = (Sled.Address + cSledLength) - + reinterpret_cast(PageAlignedAddr); + MProtectHelper Protector(PageAlignedAddr, MProtectLen); + if (Protector.MakeWriteable() == -1) { + printf("Failed mprotect: %d\n", errno); + return XRayPatchingStatus::FAILED; + } + + bool Success = false; + switch (Sled.Kind) { + case XRayEntryType::ENTRY: + Success = patchFunctionEntry(Enable, FuncId, Sled, __xray_FunctionEntry); + break; + case XRayEntryType::EXIT: + Success = patchFunctionExit(Enable, FuncId, Sled); + break; + case XRayEntryType::TAIL: + Success = patchFunctionTailExit(Enable, FuncId, Sled); + break; + case XRayEntryType::LOG_ARGS_ENTRY: + Success = patchFunctionEntry(Enable, FuncId, Sled, __xray_ArgLoggerEntry); + break; + default: + Report("Unsupported sled kind '%d' @%04x\n", Sled.Address, int(Sled.Kind)); + return false; + } + return Success; +} + // controlPatching implements the common internals of the patching/unpatching // implementation. |Enable| defines whether we're enabling or disabling the // runtime XRay instrumentation. XRayPatchingStatus controlPatching(bool Enable) XRAY_NEVER_INSTRUMENT { if (!__sanitizer::atomic_load(&XRayInitialized, - __sanitizer::memory_order_acquire)) + __sanitizer::memory_order_acquire)) return XRayPatchingStatus::NOT_INITIALIZED; // Not initialized. uint8_t NotPatching = false; @@ -179,38 +215,7 @@ XRayPatchingStatus controlPatching(bool ++FuncId; CurFun = F; } - - // While we're here, we should patch the nop sled. To do that we mprotect - // the page containing the function to be writeable. - void *PageAlignedAddr = - reinterpret_cast(Sled.Address & ~(PageSize - 1)); - std::size_t MProtectLen = (Sled.Address + cSledLength) - - reinterpret_cast(PageAlignedAddr); - MProtectHelper Protector(PageAlignedAddr, MProtectLen); - if (Protector.MakeWriteable() == -1) { - printf("Failed mprotect: %d\n", errno); - return XRayPatchingStatus::FAILED; - } - - bool Success = false; - switch (Sled.Kind) { - case XRayEntryType::ENTRY: - Success = patchFunctionEntry(Enable, FuncId, Sled, __xray_FunctionEntry); - break; - case XRayEntryType::EXIT: - Success = patchFunctionExit(Enable, FuncId, Sled); - break; - case XRayEntryType::TAIL: - Success = patchFunctionTailExit(Enable, FuncId, Sled); - break; - case XRayEntryType::LOG_ARGS_ENTRY: - Success = patchFunctionEntry(Enable, FuncId, Sled, __xray_ArgLoggerEntry); - break; - default: - Report("Unsupported sled kind: %d\n", int(Sled.Kind)); - continue; - } - (void)Success; + patchSled(Sled, Enable, FuncId); } __sanitizer::atomic_store(&XRayPatching, false, __sanitizer::memory_order_release); @@ -226,6 +231,64 @@ XRayPatchingStatus __xray_unpatch() XRAY return controlPatching(false); } +XRayPatchingStatus patchFunction(int32_t FuncId, + bool Enable) XRAY_NEVER_INSTRUMENT { + if (!__sanitizer::atomic_load(&XRayInitialized, + __sanitizer::memory_order_acquire)) + return XRayPatchingStatus::NOT_INITIALIZED; // Not initialized. + + uint8_t NotPatching = false; + if (!__sanitizer::atomic_compare_exchange_strong( + &XRayPatching, &NotPatching, true, __sanitizer::memory_order_acq_rel)) + return XRayPatchingStatus::ONGOING; // Already patching. + + // Next, we look for the function index. + XRaySledMap InstrMap; + { + __sanitizer::SpinMutexLock Guard(&XRayInstrMapMutex); + InstrMap = XRayInstrMap; + } + + // If we don't have an index, we can't patch individual functions. + if (InstrMap.Functions == 0) + return XRayPatchingStatus::NOT_INITIALIZED; + + // FuncId must be a positive number, less than the number of functions + // instrumented. + if (FuncId <= 0 || static_cast(FuncId) > InstrMap.Functions) { + Report("Invalid function id provided: %d\n", FuncId); + return XRayPatchingStatus::FAILED; + } + + // Now we patch ths sleds for this specific function. + auto SledRange = InstrMap.SledsIndex[FuncId - 1]; + auto *f = SledRange.Begin; + auto *e = SledRange.End; + + bool SucceedOnce = false; + while (f != e) + SucceedOnce |= patchSled(*f++, Enable, FuncId); + + __sanitizer::atomic_store(&XRayPatching, false, + __sanitizer::memory_order_release); + + if (!SucceedOnce) { + Report("Failed patching any sled for function '%d'.", FuncId); + return XRayPatchingStatus::FAILED; + } + + return XRayPatchingStatus::SUCCESS; +} + +XRayPatchingStatus __xray_patch_function(int32_t FuncId) XRAY_NEVER_INSTRUMENT { + return patchFunction(FuncId, true); +} + +XRayPatchingStatus +__xray_unpatch_function(int32_t FuncId) XRAY_NEVER_INSTRUMENT { + return patchFunction(FuncId, false); +} + int __xray_set_handler_arg1(void (*Handler)(int32_t, XRayEntryType, uint64_t)) { if (!__sanitizer::atomic_load(&XRayInitialized, __sanitizer::memory_order_acquire)) @@ -239,3 +302,15 @@ int __xray_set_handler_arg1(void (*Handl return 1; } int __xray_remove_handler_arg1() { return __xray_set_handler_arg1(nullptr); } + +uintptr_t __xray_function_address(int32_t FuncId) XRAY_NEVER_INSTRUMENT { + __sanitizer::SpinMutexLock Guard(&XRayInstrMapMutex); + if (FuncId <= 0 || static_cast(FuncId) > XRayInstrMap.Functions) + return 0; + return XRayInstrMap.SledsIndex[FuncId - 1].Begin->Address; +} + +size_t __xray_max_function_id() XRAY_NEVER_INSTRUMENT { + __sanitizer::SpinMutexLock Guard(&XRayInstrMapMutex); + return XRayInstrMap.Functions; +} Modified: projects/clang500-import/contrib/compiler-rt/lib/xray/xray_interface_internal.h ============================================================================== --- projects/clang500-import/contrib/compiler-rt/lib/xray/xray_interface_internal.h Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/compiler-rt/lib/xray/xray_interface_internal.h Mon May 8 19:20:55 2017 (r317969) @@ -39,6 +39,11 @@ struct XRaySledEntry { #error "Unsupported word size." #endif }; + +struct XRayFunctionSledIndex { + const XRaySledEntry* Begin; + const XRaySledEntry* End; +}; } namespace __xray { @@ -46,6 +51,8 @@ namespace __xray { struct XRaySledMap { const XRaySledEntry *Sleds; size_t Entries; + const XRayFunctionSledIndex *SledsIndex; + size_t Functions; }; bool patchFunctionEntry(bool Enable, uint32_t FuncId, Modified: projects/clang500-import/contrib/libc++/include/__config ============================================================================== --- projects/clang500-import/contrib/libc++/include/__config Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/libc++/include/__config Mon May 8 19:20:55 2017 (r317969) @@ -314,7 +314,7 @@ typedef __char32_t char32_t; #define _LIBCPP_NO_EXCEPTIONS #endif -#if !(__has_feature(cxx_rtti)) +#if !(__has_feature(cxx_rtti)) && !defined(_LIBCPP_NO_RTTI) #define _LIBCPP_NO_RTTI #endif @@ -1089,6 +1089,13 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit # define _LIBCPP_DIAGNOSE_ERROR(...) #endif +#if __has_attribute(fallthough) || _GNUC_VER >= 700 +// Use a function like macro to imply that it must be followed by a semicolon +#define _LIBCPP_FALLTHROUGH() __attribute__((__fallthrough__)) +#else +#define _LIBCPP_FALLTHROUGH() ((void)0) +#endif + #if defined(_LIBCPP_ABI_MICROSOFT) && \ (defined(_LIBCPP_COMPILER_MSVC) || __has_declspec_attribute(empty_bases)) # define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases) @@ -1113,4 +1120,77 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit #endif // __cplusplus +// Decide whether to use availability macros. +#if !defined(_LIBCPP_BUILDING_LIBRARY) && \ + !defined(_LIBCPP_DISABLE_AVAILABILITY) && \ + __has_feature(attribute_availability_with_strict) && \ + __has_feature(attribute_availability_in_templates) +#ifdef __APPLE__ +#define _LIBCPP_USE_AVAILABILITY_APPLE +#endif +#endif + +// Define availability macros. +#if defined(_LIBCPP_USE_AVAILABILITY_APPLE) +#define _LIBCPP_AVAILABILITY_SHARED_MUTEX \ + __attribute__((availability(macosx,strict,introduced=10.12))) \ + __attribute__((availability(ios,strict,introduced=10.0))) \ + __attribute__((availability(tvos,strict,introduced=10.0))) \ + __attribute__((availability(watchos,strict,introduced=3.0))) +#define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable)) +#define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH __attribute__((unavailable)) +#define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS \ + __attribute__((availability(macosx,strict,introduced=10.12))) \ + __attribute__((availability(ios,strict,introduced=10.0))) \ + __attribute__((availability(tvos,strict,introduced=10.0))) \ + __attribute__((availability(watchos,strict,introduced=3.0))) +#define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE \ + __attribute__((availability(macosx,strict,introduced=10.12))) \ + __attribute__((availability(ios,strict,introduced=10.0))) \ + __attribute__((availability(tvos,strict,introduced=10.0))) \ + __attribute__((availability(watchos,strict,introduced=3.0))) +#define _LIBCPP_AVAILABILITY_FUTURE_ERROR \ + __attribute__((availability(ios,strict,introduced=6.0))) +#define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE \ + __attribute__((availability(macosx,strict,introduced=10.9))) \ + __attribute__((availability(ios,strict,introduced=7.0))) +#define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY \ + __attribute__((availability(macosx,strict,introduced=10.9))) \ + __attribute__((availability(ios,strict,introduced=7.0))) +#define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \ + __attribute__((availability(macosx,strict,introduced=10.9))) \ + __attribute__((availability(ios,strict,introduced=7.0))) +#else +#define _LIBCPP_AVAILABILITY_SHARED_MUTEX +#define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS +#define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH +#define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS +#define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE +#define _LIBCPP_AVAILABILITY_FUTURE_ERROR +#define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE +#define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY +#define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR +#endif + +// Define availability that depends on _LIBCPP_NO_EXCEPTIONS. +#ifdef _LIBCPP_NO_EXCEPTIONS +#define _LIBCPP_AVAILABILITY_DYNARRAY +#define _LIBCPP_AVAILABILITY_FUTURE +#else +#define _LIBCPP_AVAILABILITY_DYNARRAY _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH +#define _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_AVAILABILITY_FUTURE_ERROR +#endif + +// Availability of stream API in the dylib got dropped and re-added. The +// extern template should effectively be available at: +// availability(macosx,introduced=10.9) +// availability(ios,introduced=7.0) +#if defined(_LIBCPP_USE_AVAILABILITY_APPLE) && \ + ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ <= 1090) || \ + (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \ + __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ <= 70000)) +#define _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE +#endif + #endif // _LIBCPP_CONFIG Modified: projects/clang500-import/contrib/libc++/include/__locale ============================================================================== --- projects/clang500-import/contrib/libc++/include/__locale Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/libc++/include/__locale Mon May 8 19:20:55 2017 (r317969) @@ -69,6 +69,7 @@ public: class _LIBCPP_TYPE_VIS id; typedef int category; + _LIBCPP_AVAILABILITY_LOCALE_CATEGORY static const category // values assigned here are for exposition only none = 0, collate = LC_COLLATE_MASK, Modified: projects/clang500-import/contrib/libc++/include/__threading_support ============================================================================== --- projects/clang500-import/contrib/libc++/include/__threading_support Mon May 8 18:51:13 2017 (r317968) +++ projects/clang500-import/contrib/libc++/include/__threading_support Mon May 8 19:20:55 2017 (r317969) @@ -474,7 +474,10 @@ int __libcpp_condvar_timedwait(__libcpp_ timeout_ms.count() > 0 ? timeout_ms.count() : 0, 0)) - return GetLastError(); + { + auto __ec = GetLastError(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Mon May 8 19:27:48 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92D76D63481 for ; Mon, 8 May 2017 19:27:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05A641925; Mon, 8 May 2017 19:27:47 +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 v48JRlc0099179; Mon, 8 May 2017 19:27:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48JRi1A099157; Mon, 8 May 2017 19:27:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705081927.v48JRi1A099157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 8 May 2017 19:27:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r317971 - in projects/clang500-import: . bin/sh bin/sh/tests/builtins bin/stty contrib/ipfilter/tools contrib/less contrib/netbsd-tests/usr.bin/grep contrib/openpam contrib/openpam/bin ... X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 19:27:48 -0000 Author: dim Date: Mon May 8 19:27:44 2017 New Revision: 317971 URL: https://svnweb.freebsd.org/changeset/base/317971 Log: Merge ^/head r317808 through r317970. Added: projects/clang500-import/bin/sh/tests/builtins/locale2.0 - copied unchanged from r317970, head/bin/sh/tests/builtins/locale2.0 projects/clang500-import/contrib/zstd/contrib/cleanTabs - copied unchanged from r317970, head/contrib/zstd/contrib/cleanTabs projects/clang500-import/contrib/zstd/programs/zstd.1.md - copied unchanged from r317970, head/contrib/zstd/programs/zstd.1.md projects/clang500-import/share/man/man4/adm6996fc.4 - copied unchanged from r317970, head/share/man/man4/adm6996fc.4 projects/clang500-import/share/man/man4/e6060sw.4 - copied unchanged from r317970, head/share/man/man4/e6060sw.4 projects/clang500-import/share/man/man4/ksz8995ma.4 - copied unchanged from r317970, head/share/man/man4/ksz8995ma.4 projects/clang500-import/sys/arm/conf/RT1310 - copied unchanged from r317970, head/sys/arm/conf/RT1310 projects/clang500-import/sys/arm/ralink/ - copied from r317970, head/sys/arm/ralink/ projects/clang500-import/sys/boot/fdt/dts/arm/rt1310a.dtsi - copied unchanged from r317970, head/sys/boot/fdt/dts/arm/rt1310a.dtsi projects/clang500-import/sys/boot/fdt/dts/arm/wzr2-g300n.dts - copied unchanged from r317970, head/sys/boot/fdt/dts/arm/wzr2-g300n.dts projects/clang500-import/sys/gnu/dts/mips/MZK-W04N-XX.dts - copied unchanged from r317970, head/sys/gnu/dts/mips/MZK-W04N-XX.dts projects/clang500-import/sys/mips/conf/RT2880_FDT - copied unchanged from r317970, head/sys/mips/conf/RT2880_FDT projects/clang500-import/sys/mips/mediatek/std.rt2880 - copied unchanged from r317970, head/sys/mips/mediatek/std.rt2880 projects/clang500-import/usr.bin/csplit/tests/ - copied from r317970, head/usr.bin/csplit/tests/ Deleted: projects/clang500-import/contrib/zstd/.gitignore projects/clang500-import/contrib/zstd/.travis.yml Modified: projects/clang500-import/Makefile.inc1 projects/clang500-import/bin/sh/TOUR projects/clang500-import/bin/sh/eval.c projects/clang500-import/bin/sh/exec.c projects/clang500-import/bin/sh/expand.c projects/clang500-import/bin/sh/options.c projects/clang500-import/bin/sh/tests/builtins/Makefile projects/clang500-import/bin/sh/var.c projects/clang500-import/bin/stty/stty.1 projects/clang500-import/contrib/ipfilter/tools/ippool.c projects/clang500-import/contrib/less/LICENSE projects/clang500-import/contrib/less/NEWS projects/clang500-import/contrib/less/README projects/clang500-import/contrib/less/brac.c projects/clang500-import/contrib/less/ch.c projects/clang500-import/contrib/less/charset.c projects/clang500-import/contrib/less/charset.h projects/clang500-import/contrib/less/cmd.h projects/clang500-import/contrib/less/cmdbuf.c projects/clang500-import/contrib/less/command.c projects/clang500-import/contrib/less/compose.uni projects/clang500-import/contrib/less/cvt.c projects/clang500-import/contrib/less/decode.c projects/clang500-import/contrib/less/edit.c projects/clang500-import/contrib/less/filename.c projects/clang500-import/contrib/less/forwback.c projects/clang500-import/contrib/less/funcs.h projects/clang500-import/contrib/less/help.c projects/clang500-import/contrib/less/ifile.c projects/clang500-import/contrib/less/input.c projects/clang500-import/contrib/less/jump.c projects/clang500-import/contrib/less/less.h projects/clang500-import/contrib/less/less.hlp projects/clang500-import/contrib/less/less.nro projects/clang500-import/contrib/less/lessecho.c projects/clang500-import/contrib/less/lessecho.nro projects/clang500-import/contrib/less/lesskey.c projects/clang500-import/contrib/less/lesskey.h projects/clang500-import/contrib/less/lesskey.nro projects/clang500-import/contrib/less/lglob.h projects/clang500-import/contrib/less/line.c projects/clang500-import/contrib/less/linenum.c projects/clang500-import/contrib/less/lsystem.c projects/clang500-import/contrib/less/main.c projects/clang500-import/contrib/less/mark.c projects/clang500-import/contrib/less/mkhelp.c projects/clang500-import/contrib/less/mkutable projects/clang500-import/contrib/less/optfunc.c projects/clang500-import/contrib/less/option.c projects/clang500-import/contrib/less/option.h projects/clang500-import/contrib/less/opttbl.c projects/clang500-import/contrib/less/os.c projects/clang500-import/contrib/less/output.c projects/clang500-import/contrib/less/pattern.c projects/clang500-import/contrib/less/pattern.h projects/clang500-import/contrib/less/pckeys.h projects/clang500-import/contrib/less/position.c projects/clang500-import/contrib/less/position.h projects/clang500-import/contrib/less/prompt.c projects/clang500-import/contrib/less/regexp.c projects/clang500-import/contrib/less/screen.c projects/clang500-import/contrib/less/scrsize.c projects/clang500-import/contrib/less/search.c projects/clang500-import/contrib/less/signal.c projects/clang500-import/contrib/less/tags.c projects/clang500-import/contrib/less/ttyin.c projects/clang500-import/contrib/less/ubin.uni projects/clang500-import/contrib/less/version.c projects/clang500-import/contrib/less/wide.uni projects/clang500-import/contrib/netbsd-tests/usr.bin/grep/t_grep.sh projects/clang500-import/contrib/openpam/HISTORY projects/clang500-import/contrib/openpam/Makefile.am projects/clang500-import/contrib/openpam/Makefile.in projects/clang500-import/contrib/openpam/RELNOTES projects/clang500-import/contrib/openpam/autogen.sh projects/clang500-import/contrib/openpam/bin/Makefile.am projects/clang500-import/contrib/openpam/bin/Makefile.in projects/clang500-import/contrib/openpam/bin/openpam_dump_policy/Makefile.am projects/clang500-import/contrib/openpam/bin/openpam_dump_policy/Makefile.in projects/clang500-import/contrib/openpam/bin/openpam_dump_policy/openpam_dump_policy.c projects/clang500-import/contrib/openpam/bin/pamtest/Makefile.am projects/clang500-import/contrib/openpam/bin/pamtest/Makefile.in projects/clang500-import/contrib/openpam/bin/pamtest/pamtest.1 projects/clang500-import/contrib/openpam/bin/pamtest/pamtest.c projects/clang500-import/contrib/openpam/bin/su/Makefile.am projects/clang500-import/contrib/openpam/bin/su/Makefile.in projects/clang500-import/contrib/openpam/bin/su/su.1 projects/clang500-import/contrib/openpam/bin/su/su.c projects/clang500-import/contrib/openpam/configure projects/clang500-import/contrib/openpam/configure.ac projects/clang500-import/contrib/openpam/doc/Makefile.am projects/clang500-import/contrib/openpam/doc/Makefile.in projects/clang500-import/contrib/openpam/doc/man/Makefile.am projects/clang500-import/contrib/openpam/doc/man/Makefile.in projects/clang500-import/contrib/openpam/doc/man/openpam.3 projects/clang500-import/contrib/openpam/doc/man/openpam.man projects/clang500-import/contrib/openpam/doc/man/openpam_borrow_cred.3 projects/clang500-import/contrib/openpam/doc/man/openpam_free_data.3 projects/clang500-import/contrib/openpam/doc/man/openpam_free_envlist.3 projects/clang500-import/contrib/openpam/doc/man/openpam_get_feature.3 projects/clang500-import/contrib/openpam/doc/man/openpam_get_option.3 projects/clang500-import/contrib/openpam/doc/man/openpam_log.3 projects/clang500-import/contrib/openpam/doc/man/openpam_nullconv.3 projects/clang500-import/contrib/openpam/doc/man/openpam_readline.3 projects/clang500-import/contrib/openpam/doc/man/openpam_readlinev.3 projects/clang500-import/contrib/openpam/doc/man/openpam_readword.3 projects/clang500-import/contrib/openpam/doc/man/openpam_restore_cred.3 projects/clang500-import/contrib/openpam/doc/man/openpam_set_feature.3 projects/clang500-import/contrib/openpam/doc/man/openpam_set_option.3 projects/clang500-import/contrib/openpam/doc/man/openpam_straddch.3 projects/clang500-import/contrib/openpam/doc/man/openpam_subst.3 projects/clang500-import/contrib/openpam/doc/man/openpam_ttyconv.3 projects/clang500-import/contrib/openpam/doc/man/pam.3 projects/clang500-import/contrib/openpam/doc/man/pam.conf.5 projects/clang500-import/contrib/openpam/doc/man/pam.man projects/clang500-import/contrib/openpam/doc/man/pam_acct_mgmt.3 projects/clang500-import/contrib/openpam/doc/man/pam_authenticate.3 projects/clang500-import/contrib/openpam/doc/man/pam_chauthtok.3 projects/clang500-import/contrib/openpam/doc/man/pam_close_session.3 projects/clang500-import/contrib/openpam/doc/man/pam_conv.3 projects/clang500-import/contrib/openpam/doc/man/pam_end.3 projects/clang500-import/contrib/openpam/doc/man/pam_error.3 projects/clang500-import/contrib/openpam/doc/man/pam_get_authtok.3 projects/clang500-import/contrib/openpam/doc/man/pam_get_data.3 projects/clang500-import/contrib/openpam/doc/man/pam_get_item.3 projects/clang500-import/contrib/openpam/doc/man/pam_get_user.3 projects/clang500-import/contrib/openpam/doc/man/pam_getenv.3 projects/clang500-import/contrib/openpam/doc/man/pam_getenvlist.3 projects/clang500-import/contrib/openpam/doc/man/pam_info.3 projects/clang500-import/contrib/openpam/doc/man/pam_open_session.3 projects/clang500-import/contrib/openpam/doc/man/pam_prompt.3 projects/clang500-import/contrib/openpam/doc/man/pam_putenv.3 projects/clang500-import/contrib/openpam/doc/man/pam_set_data.3 projects/clang500-import/contrib/openpam/doc/man/pam_set_item.3 projects/clang500-import/contrib/openpam/doc/man/pam_setcred.3 projects/clang500-import/contrib/openpam/doc/man/pam_setenv.3 projects/clang500-import/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 projects/clang500-import/contrib/openpam/doc/man/pam_sm_authenticate.3 projects/clang500-import/contrib/openpam/doc/man/pam_sm_chauthtok.3 projects/clang500-import/contrib/openpam/doc/man/pam_sm_close_session.3 projects/clang500-import/contrib/openpam/doc/man/pam_sm_open_session.3 projects/clang500-import/contrib/openpam/doc/man/pam_sm_setcred.3 projects/clang500-import/contrib/openpam/doc/man/pam_start.3 projects/clang500-import/contrib/openpam/doc/man/pam_strerror.3 projects/clang500-import/contrib/openpam/doc/man/pam_verror.3 projects/clang500-import/contrib/openpam/doc/man/pam_vinfo.3 projects/clang500-import/contrib/openpam/doc/man/pam_vprompt.3 projects/clang500-import/contrib/openpam/include/Makefile.am projects/clang500-import/contrib/openpam/include/Makefile.in projects/clang500-import/contrib/openpam/include/security/Makefile.am projects/clang500-import/contrib/openpam/include/security/Makefile.in projects/clang500-import/contrib/openpam/include/security/openpam.h projects/clang500-import/contrib/openpam/include/security/openpam_attr.h projects/clang500-import/contrib/openpam/include/security/openpam_version.h projects/clang500-import/contrib/openpam/include/security/pam_appl.h projects/clang500-import/contrib/openpam/include/security/pam_constants.h projects/clang500-import/contrib/openpam/include/security/pam_modules.h projects/clang500-import/contrib/openpam/include/security/pam_types.h projects/clang500-import/contrib/openpam/lib/Makefile.am projects/clang500-import/contrib/openpam/lib/Makefile.in projects/clang500-import/contrib/openpam/lib/libpam/Makefile.am projects/clang500-import/contrib/openpam/lib/libpam/Makefile.in projects/clang500-import/contrib/openpam/lib/libpam/openpam_asprintf.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_asprintf.h projects/clang500-import/contrib/openpam/lib/libpam/openpam_borrow_cred.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_check_owner_perms.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_configure.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_constants.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_constants.h projects/clang500-import/contrib/openpam/lib/libpam/openpam_cred.h projects/clang500-import/contrib/openpam/lib/libpam/openpam_ctype.h projects/clang500-import/contrib/openpam/lib/libpam/openpam_debug.h projects/clang500-import/contrib/openpam/lib/libpam/openpam_dispatch.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_dlfunc.h projects/clang500-import/contrib/openpam/lib/libpam/openpam_dynamic.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_features.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_features.h projects/clang500-import/contrib/openpam/lib/libpam/openpam_findenv.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_free_data.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_free_envlist.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_get_feature.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_get_option.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_impl.h projects/clang500-import/contrib/openpam/lib/libpam/openpam_load.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_log.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_nullconv.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_readline.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_readlinev.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_readword.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_restore_cred.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_set_feature.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_set_option.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_static.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_straddch.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_strlcat.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_strlcat.h projects/clang500-import/contrib/openpam/lib/libpam/openpam_strlcmp.h projects/clang500-import/contrib/openpam/lib/libpam/openpam_strlcpy.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_strlcpy.h projects/clang500-import/contrib/openpam/lib/libpam/openpam_strlset.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_strlset.h projects/clang500-import/contrib/openpam/lib/libpam/openpam_subst.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_ttyconv.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_vasprintf.c projects/clang500-import/contrib/openpam/lib/libpam/openpam_vasprintf.h projects/clang500-import/contrib/openpam/lib/libpam/pam_acct_mgmt.c projects/clang500-import/contrib/openpam/lib/libpam/pam_authenticate.c projects/clang500-import/contrib/openpam/lib/libpam/pam_authenticate_secondary.c projects/clang500-import/contrib/openpam/lib/libpam/pam_chauthtok.c projects/clang500-import/contrib/openpam/lib/libpam/pam_close_session.c projects/clang500-import/contrib/openpam/lib/libpam/pam_end.c projects/clang500-import/contrib/openpam/lib/libpam/pam_error.c projects/clang500-import/contrib/openpam/lib/libpam/pam_get_authtok.c projects/clang500-import/contrib/openpam/lib/libpam/pam_get_data.c projects/clang500-import/contrib/openpam/lib/libpam/pam_get_item.c projects/clang500-import/contrib/openpam/lib/libpam/pam_get_mapped_authtok.c projects/clang500-import/contrib/openpam/lib/libpam/pam_get_mapped_username.c projects/clang500-import/contrib/openpam/lib/libpam/pam_get_user.c projects/clang500-import/contrib/openpam/lib/libpam/pam_getenv.c projects/clang500-import/contrib/openpam/lib/libpam/pam_getenvlist.c projects/clang500-import/contrib/openpam/lib/libpam/pam_info.c projects/clang500-import/contrib/openpam/lib/libpam/pam_open_session.c projects/clang500-import/contrib/openpam/lib/libpam/pam_prompt.c projects/clang500-import/contrib/openpam/lib/libpam/pam_putenv.c projects/clang500-import/contrib/openpam/lib/libpam/pam_set_data.c projects/clang500-import/contrib/openpam/lib/libpam/pam_set_item.c projects/clang500-import/contrib/openpam/lib/libpam/pam_set_mapped_authtok.c projects/clang500-import/contrib/openpam/lib/libpam/pam_set_mapped_username.c projects/clang500-import/contrib/openpam/lib/libpam/pam_setcred.c projects/clang500-import/contrib/openpam/lib/libpam/pam_setenv.c projects/clang500-import/contrib/openpam/lib/libpam/pam_sm_acct_mgmt.c projects/clang500-import/contrib/openpam/lib/libpam/pam_sm_authenticate.c projects/clang500-import/contrib/openpam/lib/libpam/pam_sm_authenticate_secondary.c projects/clang500-import/contrib/openpam/lib/libpam/pam_sm_chauthtok.c projects/clang500-import/contrib/openpam/lib/libpam/pam_sm_close_session.c projects/clang500-import/contrib/openpam/lib/libpam/pam_sm_get_mapped_authtok.c projects/clang500-import/contrib/openpam/lib/libpam/pam_sm_get_mapped_username.c projects/clang500-import/contrib/openpam/lib/libpam/pam_sm_open_session.c projects/clang500-import/contrib/openpam/lib/libpam/pam_sm_set_mapped_authtok.c projects/clang500-import/contrib/openpam/lib/libpam/pam_sm_set_mapped_username.c projects/clang500-import/contrib/openpam/lib/libpam/pam_sm_setcred.c projects/clang500-import/contrib/openpam/lib/libpam/pam_start.c projects/clang500-import/contrib/openpam/lib/libpam/pam_strerror.c projects/clang500-import/contrib/openpam/lib/libpam/pam_verror.c projects/clang500-import/contrib/openpam/lib/libpam/pam_vinfo.c projects/clang500-import/contrib/openpam/lib/libpam/pam_vprompt.c projects/clang500-import/contrib/openpam/misc/gendoc.pl projects/clang500-import/contrib/openpam/mkpkgng.in projects/clang500-import/contrib/openpam/modules/Makefile.am projects/clang500-import/contrib/openpam/modules/Makefile.in projects/clang500-import/contrib/openpam/modules/pam_deny/Makefile.am projects/clang500-import/contrib/openpam/modules/pam_deny/Makefile.in projects/clang500-import/contrib/openpam/modules/pam_deny/pam_deny.c projects/clang500-import/contrib/openpam/modules/pam_permit/Makefile.am projects/clang500-import/contrib/openpam/modules/pam_permit/Makefile.in projects/clang500-import/contrib/openpam/modules/pam_permit/pam_permit.c projects/clang500-import/contrib/openpam/modules/pam_return/Makefile.am projects/clang500-import/contrib/openpam/modules/pam_return/Makefile.in projects/clang500-import/contrib/openpam/modules/pam_return/pam_return.c projects/clang500-import/contrib/openpam/modules/pam_unix/Makefile.am projects/clang500-import/contrib/openpam/modules/pam_unix/Makefile.in projects/clang500-import/contrib/openpam/modules/pam_unix/pam_unix.c projects/clang500-import/contrib/openpam/t/Makefile.am projects/clang500-import/contrib/openpam/t/Makefile.in projects/clang500-import/contrib/openpam/t/t_openpam_ctype.c projects/clang500-import/contrib/openpam/t/t_openpam_dispatch.c projects/clang500-import/contrib/openpam/t/t_openpam_readlinev.c projects/clang500-import/contrib/openpam/t/t_openpam_readword.c projects/clang500-import/contrib/openpam/t/t_pam_conv.c projects/clang500-import/contrib/openpam/t/t_pam_conv.h projects/clang500-import/contrib/zstd/Makefile projects/clang500-import/contrib/zstd/NEWS projects/clang500-import/contrib/zstd/README.md projects/clang500-import/contrib/zstd/appveyor.yml projects/clang500-import/contrib/zstd/circle.yml projects/clang500-import/contrib/zstd/contrib/pzstd/Options.cpp projects/clang500-import/contrib/zstd/contrib/pzstd/utils/test/ThreadPoolTest.cpp projects/clang500-import/contrib/zstd/contrib/pzstd/utils/test/WorkQueueTest.cpp projects/clang500-import/contrib/zstd/doc/educational_decoder/zstd_decompress.c projects/clang500-import/contrib/zstd/doc/images/Cspeed4.png projects/clang500-import/contrib/zstd/doc/images/Dspeed4.png projects/clang500-import/contrib/zstd/doc/images/dict-cr.png projects/clang500-import/contrib/zstd/doc/images/dict-cs.png projects/clang500-import/contrib/zstd/doc/images/dict-ds.png projects/clang500-import/contrib/zstd/doc/zstd_compression_format.md projects/clang500-import/contrib/zstd/doc/zstd_manual.html projects/clang500-import/contrib/zstd/examples/simple_compression.c projects/clang500-import/contrib/zstd/examples/streaming_compression.c projects/clang500-import/contrib/zstd/examples/streaming_decompression.c projects/clang500-import/contrib/zstd/lib/Makefile projects/clang500-import/contrib/zstd/lib/README.md projects/clang500-import/contrib/zstd/lib/common/bitstream.h projects/clang500-import/contrib/zstd/lib/common/error_private.c projects/clang500-import/contrib/zstd/lib/common/fse.h projects/clang500-import/contrib/zstd/lib/common/huf.h projects/clang500-import/contrib/zstd/lib/common/mem.h projects/clang500-import/contrib/zstd/lib/common/zstd_errors.h projects/clang500-import/contrib/zstd/lib/common/zstd_internal.h projects/clang500-import/contrib/zstd/lib/compress/fse_compress.c projects/clang500-import/contrib/zstd/lib/compress/zstd_compress.c projects/clang500-import/contrib/zstd/lib/compress/zstd_opt.h projects/clang500-import/contrib/zstd/lib/compress/zstdmt_compress.c projects/clang500-import/contrib/zstd/lib/decompress/zstd_decompress.c projects/clang500-import/contrib/zstd/lib/dictBuilder/cover.c projects/clang500-import/contrib/zstd/lib/dictBuilder/zdict.c projects/clang500-import/contrib/zstd/lib/dictBuilder/zdict.h projects/clang500-import/contrib/zstd/lib/legacy/zstd_v01.c projects/clang500-import/contrib/zstd/lib/legacy/zstd_v02.c projects/clang500-import/contrib/zstd/lib/legacy/zstd_v03.c projects/clang500-import/contrib/zstd/lib/legacy/zstd_v04.c projects/clang500-import/contrib/zstd/lib/legacy/zstd_v05.c projects/clang500-import/contrib/zstd/lib/legacy/zstd_v06.c projects/clang500-import/contrib/zstd/lib/zstd.h projects/clang500-import/contrib/zstd/programs/Makefile projects/clang500-import/contrib/zstd/programs/README.md projects/clang500-import/contrib/zstd/programs/bench.c projects/clang500-import/contrib/zstd/programs/dibio.c projects/clang500-import/contrib/zstd/programs/fileio.c projects/clang500-import/contrib/zstd/programs/fileio.h projects/clang500-import/contrib/zstd/programs/platform.h projects/clang500-import/contrib/zstd/programs/util.h projects/clang500-import/contrib/zstd/programs/zstd.1 projects/clang500-import/contrib/zstd/programs/zstdcli.c projects/clang500-import/contrib/zstd/tests/Makefile projects/clang500-import/contrib/zstd/tests/decodecorpus.c projects/clang500-import/contrib/zstd/tests/fullbench.c projects/clang500-import/contrib/zstd/tests/fuzzer.c projects/clang500-import/contrib/zstd/tests/paramgrill.c projects/clang500-import/contrib/zstd/tests/playTests.sh projects/clang500-import/contrib/zstd/tests/test-zstd-speed.py projects/clang500-import/contrib/zstd/tests/zbufftest.c projects/clang500-import/contrib/zstd/tests/zstreamtest.c projects/clang500-import/contrib/zstd/zlibWrapper/examples/zwrapbench.c projects/clang500-import/etc/mtree/BSD.tests.dist projects/clang500-import/lib/libc/gen/glob.c projects/clang500-import/lib/libc/sys/sigqueue.2 projects/clang500-import/lib/libstand/arp.c projects/clang500-import/lib/libstand/bootp.c projects/clang500-import/lib/libstand/bootp.h projects/clang500-import/lib/libstand/bootparam.c projects/clang500-import/lib/libstand/ether.c projects/clang500-import/lib/libstand/globals.c projects/clang500-import/lib/libstand/net.c projects/clang500-import/lib/libstand/net.h projects/clang500-import/lib/libstand/netif.c projects/clang500-import/lib/libstand/netif.h projects/clang500-import/lib/libstand/nfs.c projects/clang500-import/lib/libstand/rarp.c projects/clang500-import/lib/libstand/rpc.c projects/clang500-import/lib/libstand/rpc.h projects/clang500-import/lib/libstand/tftp.c projects/clang500-import/lib/libstand/udp.c projects/clang500-import/lib/libzstd/Makefile projects/clang500-import/libexec/ftpd/blacklist.c projects/clang500-import/libexec/ftpd/blacklist_client.h projects/clang500-import/rescue/rescue/Makefile projects/clang500-import/sbin/camcontrol/modeedit.c projects/clang500-import/sbin/dhclient/dhclient.c projects/clang500-import/sbin/dhclient/options.c projects/clang500-import/sbin/mount_nfs/mount_nfs.c projects/clang500-import/share/man/man4/Makefile projects/clang500-import/share/man/man4/etherswitch.4 projects/clang500-import/share/man/man4/sa.4 projects/clang500-import/share/man/man7/arch.7 projects/clang500-import/share/man/man9/VOP_GETPAGES.9 projects/clang500-import/share/misc/committers-ports.dot projects/clang500-import/share/mk/bsd.init.mk projects/clang500-import/share/mk/src.libnames.mk projects/clang500-import/sys/arm64/arm64/pmap.c projects/clang500-import/sys/boot/common/dev_net.c projects/clang500-import/sys/boot/efi/libefi/efinet.c projects/clang500-import/sys/boot/efi/libefi/time.c projects/clang500-import/sys/boot/efi/loader/Makefile projects/clang500-import/sys/boot/i386/libi386/pxe.c projects/clang500-import/sys/boot/i386/libi386/pxe.h projects/clang500-import/sys/boot/i386/loader/Makefile projects/clang500-import/sys/boot/ofw/libofw/ofw_net.c projects/clang500-import/sys/boot/uboot/lib/net.c projects/clang500-import/sys/cam/scsi/scsi_sa.c projects/clang500-import/sys/compat/freebsd32/freebsd32_misc.c projects/clang500-import/sys/compat/freebsd32/freebsd32_proto.h projects/clang500-import/sys/compat/freebsd32/freebsd32_syscall.h projects/clang500-import/sys/compat/freebsd32/freebsd32_syscalls.c projects/clang500-import/sys/compat/freebsd32/freebsd32_sysent.c projects/clang500-import/sys/compat/freebsd32/freebsd32_systrace_args.c projects/clang500-import/sys/compat/freebsd32/syscalls.master projects/clang500-import/sys/compat/linprocfs/linprocfs.c projects/clang500-import/sys/compat/linuxkpi/common/src/linux_compat.c projects/clang500-import/sys/conf/options.mips projects/clang500-import/sys/contrib/octeon-sdk/cvmx-app-init.h projects/clang500-import/sys/contrib/octeon-sdk/cvmx-helper-board.c projects/clang500-import/sys/dev/atkbdc/psm.c projects/clang500-import/sys/dev/cfi/cfi_core.c projects/clang500-import/sys/dev/cfi/cfi_reg.h projects/clang500-import/sys/dev/cxgbe/t4_iov.c projects/clang500-import/sys/dev/cxgbe/t4_main.c projects/clang500-import/sys/dev/cxgbe/t4_sched.c projects/clang500-import/sys/dev/cxgbe/t4_vf.c projects/clang500-import/sys/dev/cxgbe/tom/t4_cpl_io.c projects/clang500-import/sys/dev/cxgbe/tom/t4_tom.c projects/clang500-import/sys/dev/cxgbe/tom/t4_tom.h projects/clang500-import/sys/dev/etherswitch/e6000sw/e6060sw.c projects/clang500-import/sys/dev/etherswitch/infineon/adm6996fc.c projects/clang500-import/sys/dev/etherswitch/ip17x/ip17x.c projects/clang500-import/sys/dev/etherswitch/ip17x/ip17x_var.h projects/clang500-import/sys/dev/flash/mx25l.c projects/clang500-import/sys/dev/hyperv/input/hv_kbd.c projects/clang500-import/sys/dev/rt/if_rt.c projects/clang500-import/sys/dev/rt/if_rtreg.h projects/clang500-import/sys/gnu/dts/mips/rt2880.dtsi projects/clang500-import/sys/kern/kern_sig.c projects/clang500-import/sys/mips/atheros/ar531x/if_are.c projects/clang500-import/sys/mips/atheros/ar531x/if_arereg.h projects/clang500-import/sys/mips/atheros/ar934x_chip.c projects/clang500-import/sys/mips/mediatek/mtk_gpio_v1.c projects/clang500-import/sys/mips/mediatek/mtk_machdep.c projects/clang500-import/sys/mips/mediatek/mtk_soc.c projects/clang500-import/sys/mips/mediatek/mtk_soc.h projects/clang500-import/sys/modules/cxgbe/tom/Makefile projects/clang500-import/sys/net/if_lagg.c projects/clang500-import/sys/netpfil/pf/pf_ioctl.c projects/clang500-import/sys/rpc/clnt_vc.c projects/clang500-import/sys/sys/syscallsubr.h projects/clang500-import/sys/ufs/ffs/ffs_rawread.c projects/clang500-import/sys/ufs/ffs/fs.h projects/clang500-import/usr.bin/calendar/calendars/calendar.freebsd projects/clang500-import/usr.bin/csplit/Makefile projects/clang500-import/usr.bin/csplit/csplit.c projects/clang500-import/usr.bin/grep/util.c projects/clang500-import/usr.bin/less/defines.h projects/clang500-import/usr.bin/mt/mt.1 projects/clang500-import/usr.bin/resizewin/resizewin.1 projects/clang500-import/usr.bin/resizewin/resizewin.c projects/clang500-import/usr.bin/zstd/Makefile projects/clang500-import/usr.sbin/makefs/cd9660/cd9660_eltorito.c projects/clang500-import/usr.sbin/makefs/ffs.c projects/clang500-import/usr.sbin/makefs/ffs/buf.c projects/clang500-import/usr.sbin/makefs/walk.c projects/clang500-import/usr.sbin/mpsutil/mps_show.c Directory Properties: projects/clang500-import/ (props changed) projects/clang500-import/contrib/ipfilter/ (props changed) projects/clang500-import/contrib/less/ (props changed) projects/clang500-import/contrib/netbsd-tests/ (props changed) projects/clang500-import/contrib/openpam/ (props changed) projects/clang500-import/contrib/zstd/ (props changed) projects/clang500-import/sys/contrib/octeon-sdk/ (props changed) Modified: projects/clang500-import/Makefile.inc1 ============================================================================== --- projects/clang500-import/Makefile.inc1 Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/Makefile.inc1 Mon May 8 19:27:44 2017 (r317971) @@ -628,7 +628,7 @@ XCFLAGS+= ${BFLAGS} .endif .if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \ - ${TARGET_ARCH} == "powerpc64") || ${TARGET_ARCH:Mmips64*} != "" + ${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH:Mmips64*} != "") LIBCOMPAT= 32 .include "Makefile.libcompat" .elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH} == "armv6" Modified: projects/clang500-import/bin/sh/TOUR ============================================================================== --- projects/clang500-import/bin/sh/TOUR Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/bin/sh/TOUR Mon May 8 19:27:44 2017 (r317971) @@ -24,7 +24,7 @@ programs is: program input files generates ------- ----------- --------- - mkbuiltins builtins builtins.h builtins.c + mkbuiltins builtins.def builtins.h builtins.c mknodes nodetypes nodes.h nodes.c mksyntax - syntax.h syntax.c mktokens - token.h @@ -108,10 +108,12 @@ The text field of a NARG structure point word. The text consists of ordinary characters and a number of special codes defined in parser.h. The special codes are: - CTLVAR Variable substitution - CTLENDVAR End of variable substitution + CTLVAR Parameter expansion + CTLENDVAR End of parameter expansion CTLBACKQ Command substitution CTLBACKQ|CTLQUOTE Command substitution inside double quotes + CTLARI Arithmetic expansion + CTLENDARI End of arithmetic expansion CTLESC Escape next character A variable substitution contains the following elements: @@ -130,18 +132,31 @@ stitution. The possible types are: VSQUESTION|VSNUL ${var:?text} VSASSIGN ${var=text} VSASSIGN|VSNUL ${var:=text} + VSTRIMLEFT ${var#text} + VSTRIMLEFTMAX ${var##text} + VSTRIMRIGHT ${var%text} + VSTRIMRIGHTMAX ${var%%text} + VSLENGTH ${#var} + VSERROR delayed error In addition, the type field will have the VSQUOTE flag set if the -variable is enclosed in double quotes. The name of the variable -comes next, terminated by an equals sign. If the type is not -VSNORMAL, then the text field in the substitution follows, ter- -minated by a CTLENDVAR byte. +variable is enclosed in double quotes and the VSLINENO flag if +LINENO is being expanded (the parameter name is the decimal line +number). The parameter's name comes next, terminated by an equals +sign. If the type is not VSNORMAL (including when it is VSLENGTH), +then the text field in the substitution follows, terminated by a +CTLENDVAR byte. + +The type VSERROR is used to allow parsing bad substitutions like +${var[7]} and generate an error when they are expanded. Commands in back quotes are parsed and stored in a linked list. The locations of these commands in the string are indicated by CTLBACKQ and CTLBACKQ+CTLQUOTE characters, depending upon whether the back quotes were enclosed in double quotes. +Arithmetic expansion starts with CTLARI and ends with CTLENDARI. + The character CTLESC escapes the next character, so that in case any of the CTL characters mentioned above appear in the input, they can be passed through transparently. CTLESC is also used to @@ -153,11 +168,11 @@ right. In the case of here documents wh variable and command substitution, the parser doesn't insert any CTLESC characters to begin with (so the contents of the text field can be written without any processing). Other here docu- -ments, and words which are not subject to splitting and file name -generation, have the CTLESC characters removed during the vari- -able and command substitution phase. Words which are subject to -splitting and file name generation have the CTLESC characters re- -moved as part of the file name phase. +ments, and words which are not subject to file name generation, +have the CTLESC characters removed during the variable and command +substitution phase. Words which are subject to file name +generation have the CTLESC characters removed as part of the file +name phase. EXECUTION: Command execution is handled by the following files: eval.c The top level routines. @@ -199,10 +214,10 @@ later.) The routine shellexec is the interface to the exec system call. -EXPAND.C: Arguments are processed in three passes. The first -(performed by the routine argstr) performs variable and command -substitution. The second (ifsbreakup) performs word splitting -and the third (expandmeta) performs file name generation. +EXPAND.C: As the routine argstr generates words by parameter +expansion, command substitution and arithmetic expansion, it +performs word splitting on the result. As each word is output, +the routine expandmeta performs file name generation (if enabled). VAR.C: Variables are stored in a hash table. Probably we should switch to extensible hashing. The variable name is stored in the @@ -221,8 +236,8 @@ BUILTIN COMMANDS: The procedures for ha tered throughout the code, depending on which location appears most appropriate. They can be recognized because their names al- ways end in "cmd". The mapping from names to procedures is -specified in the file builtins, which is processed by the mkbuilt- -ins command. +specified in the file builtins.def, which is processed by the +mkbuiltins command. A builtin command is invoked with argc and argv set up like a normal program. A builtin command is allowed to overwrite its @@ -230,22 +245,20 @@ arguments. Builtin routines can call ne ing. This is kind of like getopt, but you don't pass argc and argv to it. Builtin routines can also call error. This routine normally terminates the shell (or returns to the main command -loop if the shell is interactive), but when called from a builtin -command it causes the builtin command to terminate with an exit -status of 2. +loop if the shell is interactive), but when called from a non- +special builtin command it causes the builtin command to +terminate with an exit status of 2. The directory bltins contains commands which can be compiled in- dependently but can also be built into the shell for efficiency -reasons. The makefile in this directory compiles these programs -in the normal fashion (so that they can be run regardless of -whether the invoker is ash), but also creates a library named -bltinlib.a which can be linked with ash. The header file bltin.h -takes care of most of the differences between the ash and the -stand-alone environment. The user should call the main routine -"main", and #define main to be the name of the routine to use -when the program is linked into ash. This #define should appear -before bltin.h is included; bltin.h will #undef main if the pro- -gram is to be compiled stand-alone. +reasons. The header file bltin.h takes care of most of the +differences between the ash and the stand-alone environment. +The user should call the main routine "main", and #define main to +be the name of the routine to use when the program is linked into +ash. This #define should appear before bltin.h is included; +bltin.h will #undef main if the program is to be compiled +stand-alone. A similar approach is used for a few utilities from +bin and usr.bin. CD.C: This file defines the cd and pwd builtins. @@ -258,7 +271,7 @@ is called at appropriate points to actua When an interrupt is caught and no trap has been set for that signal, the routine "onint" in error.c is called. -OUTPUT: Ash uses it's own output routines. There are three out- +OUTPUT: Ash uses its own output routines. There are three out- put structures allocated. "Output" represents the standard out- put, "errout" the standard error, and "memout" contains output which is to be stored in memory. This last is used when a buil- Modified: projects/clang500-import/bin/sh/eval.c ============================================================================== --- projects/clang500-import/bin/sh/eval.c Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/bin/sh/eval.c Mon May 8 19:27:44 2017 (r317971) @@ -1222,7 +1222,7 @@ bltincmd(int argc, char **argv) return 127; } /* - * Preserve exitstatus of a previous possible redirection + * Preserve exitstatus of a previous possible command substitution * as POSIX mandates */ return exitstatus; Modified: projects/clang500-import/bin/sh/exec.c ============================================================================== --- projects/clang500-import/bin/sh/exec.c Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/bin/sh/exec.c Mon May 8 19:27:44 2017 (r317971) @@ -338,7 +338,7 @@ find_command(const char *name, struct cm cd = 0; - /* If name is in the table, and not invalidated by cd, we're done */ + /* If name is in the table, we're done */ if ((cmdp = cmdlookup(name, 0)) != NULL) { if (cmdp->cmdtype == CMDFUNCTION && act & DO_NOFUNC) cmdp = NULL; @@ -485,8 +485,7 @@ changepath(const char *newval __unused) /* - * Clear out command entries. The argument specifies the first entry in - * PATH which has changed. + * Clear out cached utility locations. */ void Modified: projects/clang500-import/bin/sh/expand.c ============================================================================== --- projects/clang500-import/bin/sh/expand.c Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/bin/sh/expand.c Mon May 8 19:27:44 2017 (r317971) @@ -222,9 +222,9 @@ stputs_split(const char *data, const cha * The result is left in the stack string. * When arglist is NULL, perform here document expansion. * - * Caution: this function uses global state and is not reentrant. - * However, a new invocation after an interrupted invocation is safe - * and will reset the global state for the new call. + * When doing something that may cause this to be re-entered, make sure + * the stack string is empty via grabstackstr() and do not assume expdest + * remains valid. */ void expandarg(union node *arg, struct arglist *arglist, int flag) @@ -476,7 +476,7 @@ expbackq(union node *cmd, int quoted, in ifs = ifsset() ? ifsval() : " \t\n"; else ifs = ""; - /* Don't copy trailing newlines */ + /* Remove trailing newlines */ for (;;) { if (--in.nleft < 0) { if (in.fd < 0) @@ -821,7 +821,7 @@ evalvar(const char *p, struct nodelist * /* - * Test whether a specialized variable is set. + * Test whether a special or positional parameter is set. */ static int @@ -918,7 +918,7 @@ reprocess(int startloc, int flag, int su } /* - * Add the value of a specialized variable to the stack string. + * Add the value of a special or positional parameter to the stack string. */ static void Modified: projects/clang500-import/bin/sh/options.c ============================================================================== --- projects/clang500-import/bin/sh/options.c Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/bin/sh/options.c Mon May 8 19:27:44 2017 (r317971) @@ -141,6 +141,8 @@ optschanged(void) /* * Process shell options. The global variable argptr contains a pointer * to the argument list; we advance it past the options. + * If cmdline is true, process the shell's argv; otherwise, process arguments + * to the set special builtin. */ static void @@ -392,7 +394,7 @@ shiftcmd(int argc, char **argv) /* - * The set command builtin. + * The set builtin command. */ int @@ -558,7 +560,7 @@ out: /* * Standard option processing (a la getopt) for builtin routines. The * only argument that is passed to nextopt is the option string; the - * other arguments are unnecessary. It return the character, or '\0' on + * other arguments are unnecessary. It returns the option, or '\0' on * end of input. */ Modified: projects/clang500-import/bin/sh/tests/builtins/Makefile ============================================================================== --- projects/clang500-import/bin/sh/tests/builtins/Makefile Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/bin/sh/tests/builtins/Makefile Mon May 8 19:27:44 2017 (r317971) @@ -120,6 +120,7 @@ ${PACKAGE}FILES+= local7.0 .if ${MK_NLS} != "no" ${PACKAGE}FILES+= locale1.0 .endif +${PACKAGE}FILES+= locale2.0 ${PACKAGE}FILES+= printf1.0 ${PACKAGE}FILES+= printf2.0 ${PACKAGE}FILES+= printf3.0 Copied: projects/clang500-import/bin/sh/tests/builtins/locale2.0 (from r317970, head/bin/sh/tests/builtins/locale2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang500-import/bin/sh/tests/builtins/locale2.0 Mon May 8 19:27:44 2017 (r317971, copy of r317970, head/bin/sh/tests/builtins/locale2.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +$SH -c 'LC_ALL=C true; kill -INT $$; echo continued' +r=$? +[ "$r" -gt 128 ] && [ "$(kill -l "$r")" = INT ] Modified: projects/clang500-import/bin/sh/var.c ============================================================================== --- projects/clang500-import/bin/sh/var.c Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/bin/sh/var.c Mon May 8 19:27:44 2017 (r317971) @@ -513,7 +513,7 @@ bltinunsetlocale(void) if (localevar(cmdenviron->args[i])) { setlocale(LC_ALL, ""); updatecharset(); - return; + break; } } INTON; Modified: projects/clang500-import/bin/stty/stty.1 ============================================================================== --- projects/clang500-import/bin/stty/stty.1 Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/bin/stty/stty.1 Mon May 8 19:27:44 2017 (r317971) @@ -588,6 +588,7 @@ Same as the control character .Sh EXIT STATUS .Ex -std .Sh SEE ALSO +.Xr resizewin 1 , .Xr termios 4 .Sh STANDARDS The Modified: projects/clang500-import/contrib/ipfilter/tools/ippool.c ============================================================================== --- projects/clang500-import/contrib/ipfilter/tools/ippool.c Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/contrib/ipfilter/tools/ippool.c Mon May 8 19:27:44 2017 (r317971) @@ -1047,7 +1047,9 @@ setnodeaddr(int type, int role, void *pt if (type == IPLT_POOL) { ip_pool_node_t *node = ptr; +#ifdef USE_INET6 if (node->ipn_addr.adf_family == AF_INET) +#endif node->ipn_addr.adf_len = offsetof(addrfamily_t, adf_addr) + sizeof(struct in_addr); Modified: projects/clang500-import/contrib/less/LICENSE ============================================================================== --- projects/clang500-import/contrib/less/LICENSE Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/contrib/less/LICENSE Mon May 8 19:27:44 2017 (r317971) @@ -2,7 +2,7 @@ ------------ Less -Copyright (C) 1984-2015 Mark Nudelman +Copyright (C) 1984-2016 Mark Nudelman Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: projects/clang500-import/contrib/less/NEWS ============================================================================== --- projects/clang500-import/contrib/less/NEWS Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/contrib/less/NEWS Mon May 8 19:27:44 2017 (r317971) @@ -11,6 +11,40 @@ ====================================================================== + Major changes between "less" versions 487 and 491 + +* Don't output terminal init sequence if using -F and file fits on one screen. + +* Use ANSI prototypes in funcs.h declarations. + +* Fix some const mismatches. + +* Remove "register" in variable declarations. + +* Fix some memory leaks. + +====================================================================== + + Major changes between "less" versions 481 and 487 + +* New commands ESC-{ and ESC-} to shift to start/end of displayed lines. + +* Make search highlights work correctly when changing caselessness with -i. + +* New option -Da in Windows version to enable SGR mode. + +* Fix "nothing to search" error when top or bottom line on screen is empty. + +* Fix bug when terminal has no "cm" termcap entry. + +* Fix incorrect display when entering double-width chars in search string. + +* Fix bug in Unicode handling that missed some double width characters. + +* Update Unicode database to 9.0.0. + +====================================================================== + Major changes between "less" versions 458 and 481 * Don't overwrite history file; just append to it. Modified: projects/clang500-import/contrib/less/README ============================================================================== --- projects/clang500-import/contrib/less/README Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/contrib/less/README Mon May 8 19:27:44 2017 (r317971) @@ -7,9 +7,9 @@ ************************************************************************** ************************************************************************** - Less, version 481 + Less, version 491 - This is the distribution of less, version 481, released 31 Aug 2015. + This is the distribution of less, version 491, released 07 Apr 2017. This program is part of the GNU project (http://www.gnu.org). This program is free software. You may redistribute it and/or Modified: projects/clang500-import/contrib/less/brac.c ============================================================================== --- projects/clang500-import/contrib/less/brac.c Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/contrib/less/brac.c Mon May 8 19:27:44 2017 (r317971) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -24,14 +24,18 @@ * "close bracket" are given. */ public void -match_brac(int obrac, int cbrac, int forwdir, int n) +match_brac(obrac, cbrac, forwdir, n) + int obrac; + int cbrac; + int forwdir; + int n; { int c; int nest; POSITION pos; - int (*chget)(void); + int (*chget)(); - extern int ch_forw_get(void), ch_back_get(void); + extern int ch_forw_get(), ch_back_get(); /* * Seek to the line containing the open bracket. Modified: projects/clang500-import/contrib/less/ch.c ============================================================================== --- projects/clang500-import/contrib/less/ch.c Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/contrib/less/ch.c Mon May 8 19:27:44 2017 (r317971) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -144,7 +144,7 @@ static int ch_addbuf(); * Get the character pointed to by the read pointer. */ int -ch_get(void) +ch_get() { struct buf *bp; struct bufnode *bn; @@ -378,7 +378,8 @@ ch_get(void) * a single char onto an input file descriptor. */ public void -ch_ungetchar(int c) +ch_ungetchar(c) + int c; { if (c != -1 && ch_ungotchar != -1) error("ch_ungetchar overrun", NULL_PARG); @@ -391,7 +392,7 @@ ch_ungetchar(int c) * If we haven't read all of standard input into it, do that now. */ public void -end_logfile(void) +end_logfile() { static int tried = FALSE; @@ -416,7 +417,7 @@ end_logfile(void) * Write all the existing buffered data to the log file. */ public void -sync_logfile(void) +sync_logfile() { struct buf *bp; struct bufnode *bn; @@ -453,7 +454,8 @@ sync_logfile(void) * Determine if a specific block is currently in one of the buffers. */ static int -buffered(BLOCKNUM block) +buffered(block) + BLOCKNUM block; { struct buf *bp; struct bufnode *bn; @@ -474,7 +476,8 @@ buffered(BLOCKNUM block) * Return 0 if successful, non-zero if can't seek there. */ public int -ch_seek(POSITION pos) +ch_seek(pos) + POSITION pos; { BLOCKNUM new_block; POSITION len; @@ -512,7 +515,7 @@ ch_seek(POSITION pos) * Seek to the end of the file. */ public int -ch_end_seek(void) +ch_end_seek() { POSITION len; @@ -539,7 +542,7 @@ ch_end_seek(void) * Seek to the last position in the file that is currently buffered. */ public int -ch_end_buffer_seek(void) +ch_end_buffer_seek() { struct buf *bp; struct bufnode *bn; @@ -567,7 +570,7 @@ ch_end_buffer_seek(void) * beginning of the pipe is no longer buffered. */ public int -ch_beg_seek(void) +ch_beg_seek() { struct bufnode *bn; struct bufnode *firstbn; @@ -599,7 +602,7 @@ ch_beg_seek(void) * Return the length of the file, if known. */ public POSITION -ch_length(void) +ch_length() { if (thisfile == NULL) return (NULL_POSITION); @@ -616,7 +619,7 @@ ch_length(void) * Return the current position in the file. */ public POSITION -ch_tell(void) +ch_tell() { if (thisfile == NULL) return (NULL_POSITION); @@ -627,7 +630,7 @@ ch_tell(void) * Get the current char and post-increment the read pointer. */ public int -ch_forw_get(void) +ch_forw_get() { int c; @@ -650,7 +653,7 @@ ch_forw_get(void) * Pre-decrement the read pointer and get the new current char. */ public int -ch_back_get(void) +ch_back_get() { if (thisfile == NULL) return (EOI); @@ -673,7 +676,8 @@ ch_back_get(void) * bufspace is in units of 1024 bytes. -1 mean no limit. */ public void -ch_setbufspace(int bufspace) +ch_setbufspace(bufspace) + int bufspace; { if (bufspace < 0) maxbufs = -1; @@ -689,7 +693,7 @@ ch_setbufspace(int bufspace) * Flush (discard) any saved file state, including buffer contents. */ public void -ch_flush(void) +ch_flush() { struct bufnode *bn; @@ -756,7 +760,7 @@ ch_flush(void) * The buffer is added to the tail of the buffer chain. */ static int -ch_addbuf(void) +ch_addbuf() { struct buf *bp; struct bufnode *bn; @@ -781,7 +785,7 @@ ch_addbuf(void) * */ static void -init_hashtbl(void) +init_hashtbl() { int h; @@ -796,7 +800,7 @@ init_hashtbl(void) * Delete all buffers for this file. */ static void -ch_delbufs(void) +ch_delbufs() { struct bufnode *bn; @@ -814,7 +818,8 @@ ch_delbufs(void) * Is it possible to seek on a file descriptor? */ public int -seekable(int f) +seekable(f) + int f; { #if MSDOS_COMPILER extern int fd0; @@ -835,7 +840,7 @@ seekable(int f) * This is used after an ignore_eof read, during which the EOF may change. */ public void -ch_set_eof(void) +ch_set_eof() { ch_fsize = ch_fpos; } @@ -845,7 +850,9 @@ ch_set_eof(void) * Initialize file state for a new file. */ public void -ch_init(int f, int flags) +ch_init(f, flags) + int f; + int flags; { /* * See if we already have a filestate for this file. @@ -884,7 +891,7 @@ ch_init(int f, int flags) * Close a filestate. */ public void -ch_close(void) +ch_close() { int keepstate = FALSE; @@ -927,7 +934,7 @@ ch_close(void) * Return ch_flags for the current file. */ public int -ch_getflags(void) +ch_getflags() { if (thisfile == NULL) return (0); Modified: projects/clang500-import/contrib/less/charset.c ============================================================================== --- projects/clang500-import/contrib/less/charset.c Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/contrib/less/charset.c Mon May 8 19:27:44 2017 (r317971) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -64,6 +64,8 @@ struct cs_alias { char *oname; } cs_aliases[] = { { "UTF-8", "utf-8" }, + { "utf8", "utf-8" }, + { "UTF8", "utf-8" }, { "ANSI_X3.4-1968", "ascii" }, { "US-ASCII", "ascii" }, { "latin1", "iso8859" }, @@ -130,7 +132,8 @@ public int binattr = AT_STANDOUT; * c control character */ static void -ichardef(char *s) +ichardef(s) + char *s; { char *cp; int n; @@ -186,7 +189,9 @@ ichardef(char *s) * The valid charset names are listed in the "charsets" array. */ static int -icharset(char *name, int no_error) +icharset(name, no_error) + char *name; + int no_error; { struct charset *p; struct cs_alias *a; @@ -227,7 +232,7 @@ icharset(char *name, int no_error) * Define a charset, given a locale name. */ static void -ilocale(void) +ilocale() { int c; @@ -247,7 +252,10 @@ ilocale(void) * Define the printing format for control (or binary utf) chars. */ static void -setbinfmt(char *s, char **fmtvarptr, char *default_fmt) +setbinfmt(s, fmtvarptr, default_fmt) + char *s; + char **fmtvarptr; + char *default_fmt; { if (s && utf_mode) { @@ -293,7 +301,7 @@ setbinfmt(char *s, char **fmtvarptr, cha * */ static void -set_charset(void) +set_charset() { char *s; @@ -364,7 +372,7 @@ set_charset(void) * Initialize charset data structures. */ public void -init_charset(void) +init_charset() { char *s; @@ -385,7 +393,8 @@ init_charset(void) * Is a given character a "binary" character? */ public int -binary_char(LWCHAR c) +binary_char(c) + LWCHAR c; { if (utf_mode) return (is_ubin_char(c)); @@ -397,7 +406,8 @@ binary_char(LWCHAR c) * Is a given character a "control" character? */ public int -control_char(LWCHAR c) +control_char(c) + LWCHAR c; { c &= 0377; return (chardef[c] & IS_CONTROL_CHAR); @@ -408,7 +418,8 @@ control_char(LWCHAR c) * For example, in the "ascii" charset '\3' is printed as "^C". */ public char * -prchar(LWCHAR c) +prchar(c) + LWCHAR c; { /* {{ This buffer can be overrun if LESSBINFMT is a long string. }} */ static char buf[32]; @@ -443,7 +454,8 @@ prchar(LWCHAR c) * Return the printable form of a UTF-8 character. */ public char * -prutfchar(LWCHAR ch) +prutfchar(ch) + LWCHAR ch; { static char buf[32]; @@ -473,7 +485,8 @@ prutfchar(LWCHAR ch) * Get the length of a UTF-8 character in bytes. */ public int -utf_len(char ch) +utf_len(ch) + unsigned char ch; { if ((ch & 0x80) == 0) return 1; @@ -495,15 +508,18 @@ utf_len(char ch) * Does the parameter point to the lead byte of a well-formed UTF-8 character? */ public int -is_utf8_well_formed(unsigned char *s, int slen) +is_utf8_well_formed(ss, slen) + char *ss; + int slen; { int i; int len; + unsigned char *s = (unsigned char *) ss; if (IS_UTF8_INVALID(s[0])) return (0); - len = utf_len((char) s[0]); + len = utf_len(s[0]); if (len > slen) return (0); if (len == 1) @@ -530,14 +546,16 @@ is_utf8_well_formed(unsigned char *s, in * Return number of invalid UTF-8 sequences found in a buffer. */ public int -utf_bin_count(unsigned char *data, int len) +utf_bin_count(data, len) + char *data; + int len; { int bin_count = 0; while (len > 0) { if (is_utf8_well_formed(data, len)) { - int clen = utf_len(*data); + int clen = utf_len(*data & 0377); data += clen; len -= clen; } else @@ -547,7 +565,7 @@ utf_bin_count(unsigned char *data, int l do { ++data; --len; - } while (len > 0 && !IS_UTF8_LEAD(*data)); + } while (len > 0 && !IS_UTF8_LEAD(*data & 0377)); } } return (bin_count); @@ -557,7 +575,8 @@ utf_bin_count(unsigned char *data, int l * Get the value of a UTF-8 character. */ public LWCHAR -get_wchar(constant char *p) +get_wchar(p) + constant char *p; { switch (utf_len(p[0])) { @@ -608,7 +627,9 @@ get_wchar(constant char *p) * Store a character into a UTF-8 string. */ public void -put_wchar(char **pp, LWCHAR ch) +put_wchar(pp, ch) + char **pp; + LWCHAR ch; { if (!utf_mode || ch < 0x80) { @@ -656,11 +677,14 @@ put_wchar(char **pp, LWCHAR ch) * Step forward or backward one character in a string. */ public LWCHAR -step_char(constant char **pp, signed int dir, constant char *limit) +step_char(pp, dir, limit) + char **pp; + signed int dir; + constant char *limit; { LWCHAR ch; int len; - constant char *p = *pp; + char *p = *pp; if (!utf_mode) { @@ -675,7 +699,7 @@ step_char(constant char **pp, signed int if (p + len > limit) { ch = 0; - p = limit; + p = (char *) limit; } else { ch = get_wchar(p); @@ -723,7 +747,9 @@ static struct wchar_range comb_table[] = static int -is_in_table(LWCHAR ch, struct wchar_range_table *table) +is_in_table(ch, table) + LWCHAR ch; + struct wchar_range_table *table; { int hi; int lo; @@ -751,7 +777,8 @@ is_in_table(LWCHAR ch, struct wchar_rang * If a composing character follows any char, the two combine into one glyph. */ public int -is_composing_char(LWCHAR ch) +is_composing_char(ch) + LWCHAR ch; { return is_in_table(ch, &compose_table); } @@ -760,7 +787,8 @@ is_composing_char(LWCHAR ch) * Should this UTF-8 character be treated as binary? */ public int -is_ubin_char(LWCHAR ch) +is_ubin_char(ch) + LWCHAR ch; { return is_in_table(ch, &ubin_table); } @@ -769,7 +797,8 @@ is_ubin_char(LWCHAR ch) * Is this a double width UTF-8 character? */ public int -is_wide_char(LWCHAR ch) +is_wide_char(ch) + LWCHAR ch; { return is_in_table(ch, &wide_table); } @@ -780,7 +809,9 @@ is_wide_char(LWCHAR ch) * a specific char (not any char), the two combine into one glyph. */ public int -is_combining_char(LWCHAR ch1, LWCHAR ch2) +is_combining_char(ch1, ch2) + LWCHAR ch1; + LWCHAR ch2; { /* The table is small; use linear search. */ int i; Modified: projects/clang500-import/contrib/less/charset.h ============================================================================== --- projects/clang500-import/contrib/less/charset.h Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/contrib/less/charset.h Mon May 8 19:27:44 2017 (r317971) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. Modified: projects/clang500-import/contrib/less/cmd.h ============================================================================== --- projects/clang500-import/contrib/less/cmd.h Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/contrib/less/cmd.h Mon May 8 19:27:44 2017 (r317971) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -67,6 +67,8 @@ #define A_FILTER 55 #define A_F_UNTIL_HILITE 56 #define A_GOEND_BUF 57 +#define A_LLSHIFT 58 +#define A_RRSHIFT 59 #define A_INVALID 100 #define A_NOACTION 101 Modified: projects/clang500-import/contrib/less/cmdbuf.c ============================================================================== --- projects/clang500-import/contrib/less/cmdbuf.c Mon May 8 19:22:59 2017 (r317970) +++ projects/clang500-import/contrib/less/cmdbuf.c Mon May 8 19:27:44 2017 (r317971) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -32,7 +32,7 @@ static int literal; /* Next input char static int updown_match = -1; /* Prefix length in up/down movement */ #if TAB_COMPLETE_FILENAME -static int cmd_complete(int action); +static int cmd_complete(); /* * These variables are statics used by cmd_complete. */ @@ -76,25 +76,25 @@ struct mlist */ struct mlist mlist_search = { &mlist_search, &mlist_search, &mlist_search, NULL, 0 }; -public void * constant ml_search = (void *) &mlist_search; +public void *ml_search = (void *) &mlist_search; struct mlist mlist_examine = { &mlist_examine, &mlist_examine, &mlist_examine, NULL, 0 }; -public void * constant ml_examine = (void *) &mlist_examine; +public void *ml_examine = (void *) &mlist_examine; #if SHELL_ESCAPE || PIPEC struct mlist mlist_shell = { &mlist_shell, &mlist_shell, &mlist_shell, NULL, 0 }; -public void * constant ml_shell = (void *) &mlist_shell; +public void *ml_shell = (void *) &mlist_shell; #endif #else /* CMD_HISTORY */ /* If CMD_HISTORY is off, these are just flags. */ -public void * constant ml_search = (void *)1; -public void * constant ml_examine = (void *)2; +public void *ml_search = (void *)1; +public void *ml_examine = (void *)2; #if SHELL_ESCAPE || PIPEC -public void * constant ml_shell = (void *)3; +public void *ml_shell = (void *)3; #endif #endif /* CMD_HISTORY */ @@ -114,7 +114,7 @@ static int cmd_mbc_buf_index; * Reset command buffer (to empty). */ public void -cmd_reset(void) +cmd_reset() { cp = cmdbuf; *cp = '\0'; @@ -129,7 +129,7 @@ cmd_reset(void) * Clear command line. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Mon May 8 19:46:35 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18C9FD63D83 for ; Mon, 8 May 2017 19:46:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A44C51064; Mon, 8 May 2017 19:46:34 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48JkXLt007321; Mon, 8 May 2017 19:46:33 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48JkX5S007317; Mon, 8 May 2017 19:46:33 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705081946.v48JkX5S007317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 8 May 2017 19:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r317972 - in projects/pnfs-planb-server/sys: . amd64/pci amd64/vmm/amd arm/conf arm/ralink arm64/arm64 boot/common boot/efi/libefi boot/efi/loader boot/fdt/dts/arm boot/i386/libi386 boo... X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 19:46:35 -0000 Author: rmacklem Date: Mon May 8 19:46:33 2017 New Revision: 317972 URL: https://svnweb.freebsd.org/changeset/base/317972 Log: Update kernel sources to head. Added: projects/pnfs-planb-server/sys/amd64/vmm/amd/amdvi_hw.c - copied unchanged from r317971, head/sys/amd64/vmm/amd/amdvi_hw.c projects/pnfs-planb-server/sys/amd64/vmm/amd/amdvi_priv.h - copied unchanged from r317971, head/sys/amd64/vmm/amd/amdvi_priv.h projects/pnfs-planb-server/sys/amd64/vmm/amd/ivrs_drv.c - copied unchanged from r317971, head/sys/amd64/vmm/amd/ivrs_drv.c projects/pnfs-planb-server/sys/arm/conf/RT1310 - copied unchanged from r317971, head/sys/arm/conf/RT1310 projects/pnfs-planb-server/sys/arm/ralink/ - copied from r317971, head/sys/arm/ralink/ projects/pnfs-planb-server/sys/boot/fdt/dts/arm/rt1310a.dtsi - copied unchanged from r317971, head/sys/boot/fdt/dts/arm/rt1310a.dtsi projects/pnfs-planb-server/sys/boot/fdt/dts/arm/wzr2-g300n.dts - copied unchanged from r317971, head/sys/boot/fdt/dts/arm/wzr2-g300n.dts projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/asm/smp.h - copied unchanged from r317971, head/sys/compat/linuxkpi/common/include/asm/smp.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/smp.h - copied unchanged from r317971, head/sys/compat/linuxkpi/common/include/linux/smp.h projects/pnfs-planb-server/sys/contrib/ena-com/ - copied from r317971, head/sys/contrib/ena-com/ projects/pnfs-planb-server/sys/dev/cxgbe/t4_sched.c - copied unchanged from r317971, head/sys/dev/cxgbe/t4_sched.c projects/pnfs-planb-server/sys/dev/cy/ - copied from r317971, head/sys/dev/cy/ projects/pnfs-planb-server/sys/gnu/dts/mips/MZK-W04N-XX.dts - copied unchanged from r317971, head/sys/gnu/dts/mips/MZK-W04N-XX.dts projects/pnfs-planb-server/sys/libkern/arm64/ - copied from r317971, head/sys/libkern/arm64/ projects/pnfs-planb-server/sys/mips/conf/RT2880_FDT - copied unchanged from r317971, head/sys/mips/conf/RT2880_FDT projects/pnfs-planb-server/sys/mips/mediatek/std.rt2880 - copied unchanged from r317971, head/sys/mips/mediatek/std.rt2880 Modified: projects/pnfs-planb-server/sys/Makefile projects/pnfs-planb-server/sys/amd64/pci/pci_cfgreg.c projects/pnfs-planb-server/sys/arm64/arm64/machdep.c projects/pnfs-planb-server/sys/arm64/arm64/pmap.c projects/pnfs-planb-server/sys/boot/common/dev_net.c projects/pnfs-planb-server/sys/boot/efi/libefi/efinet.c projects/pnfs-planb-server/sys/boot/efi/libefi/time.c projects/pnfs-planb-server/sys/boot/efi/loader/Makefile projects/pnfs-planb-server/sys/boot/efi/loader/main.c projects/pnfs-planb-server/sys/boot/i386/libi386/pxe.c projects/pnfs-planb-server/sys/boot/i386/libi386/pxe.h projects/pnfs-planb-server/sys/boot/i386/loader/Makefile projects/pnfs-planb-server/sys/boot/i386/zfsboot/zfsboot.c projects/pnfs-planb-server/sys/boot/ofw/libofw/ofw_net.c projects/pnfs-planb-server/sys/boot/uboot/lib/net.c projects/pnfs-planb-server/sys/cam/cam_periph.c projects/pnfs-planb-server/sys/cam/scsi/scsi_all.c projects/pnfs-planb-server/sys/cam/scsi/scsi_all.h projects/pnfs-planb-server/sys/cam/scsi/scsi_pass.c projects/pnfs-planb-server/sys/cam/scsi/scsi_sa.c projects/pnfs-planb-server/sys/cam/scsi/scsi_sa.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c projects/pnfs-planb-server/sys/cddl/dev/dtrace/dtrace_load.c projects/pnfs-planb-server/sys/compat/freebsd32/freebsd32_misc.c projects/pnfs-planb-server/sys/compat/freebsd32/freebsd32_proto.h projects/pnfs-planb-server/sys/compat/freebsd32/freebsd32_syscall.h projects/pnfs-planb-server/sys/compat/freebsd32/freebsd32_syscalls.c projects/pnfs-planb-server/sys/compat/freebsd32/freebsd32_sysent.c projects/pnfs-planb-server/sys/compat/freebsd32/freebsd32_systrace_args.c projects/pnfs-planb-server/sys/compat/freebsd32/syscalls.master projects/pnfs-planb-server/sys/compat/linprocfs/linprocfs.c projects/pnfs-planb-server/sys/compat/linux/linux_file.c projects/pnfs-planb-server/sys/compat/linux/linux_futex.c projects/pnfs-planb-server/sys/compat/linuxkpi/common/src/linux_compat.c projects/pnfs-planb-server/sys/compat/linuxkpi/common/src/linux_page.c projects/pnfs-planb-server/sys/conf/files projects/pnfs-planb-server/sys/conf/files.arm64 projects/pnfs-planb-server/sys/conf/options.mips projects/pnfs-planb-server/sys/contrib/octeon-sdk/cvmx-app-init.h projects/pnfs-planb-server/sys/contrib/octeon-sdk/cvmx-helper-board.c projects/pnfs-planb-server/sys/dev/acpica/acpi_pcib_acpi.c projects/pnfs-planb-server/sys/dev/acpica/acpivar.h projects/pnfs-planb-server/sys/dev/atkbdc/psm.c projects/pnfs-planb-server/sys/dev/bnxt/bnxt.h projects/pnfs-planb-server/sys/dev/bnxt/if_bnxt.c projects/pnfs-planb-server/sys/dev/cfi/cfi_core.c projects/pnfs-planb-server/sys/dev/cfi/cfi_reg.h projects/pnfs-planb-server/sys/dev/cxgbe/adapter.h projects/pnfs-planb-server/sys/dev/cxgbe/common/common.h projects/pnfs-planb-server/sys/dev/cxgbe/common/t4_hw.c projects/pnfs-planb-server/sys/dev/cxgbe/t4_iov.c projects/pnfs-planb-server/sys/dev/cxgbe/t4_main.c projects/pnfs-planb-server/sys/dev/cxgbe/t4_sge.c projects/pnfs-planb-server/sys/dev/cxgbe/t4_vf.c projects/pnfs-planb-server/sys/dev/cxgbe/tom/t4_cpl_io.c projects/pnfs-planb-server/sys/dev/cxgbe/tom/t4_tom.c projects/pnfs-planb-server/sys/dev/cxgbe/tom/t4_tom.h projects/pnfs-planb-server/sys/dev/drm2/radeon/radeon_drv.c projects/pnfs-planb-server/sys/dev/etherswitch/e6000sw/e6000sw.c projects/pnfs-planb-server/sys/dev/etherswitch/e6000sw/e6060sw.c projects/pnfs-planb-server/sys/dev/etherswitch/infineon/adm6996fc.c projects/pnfs-planb-server/sys/dev/etherswitch/ip17x/ip17x.c projects/pnfs-planb-server/sys/dev/etherswitch/ip17x/ip17x_var.h projects/pnfs-planb-server/sys/dev/fdt/fdt_common.c projects/pnfs-planb-server/sys/dev/flash/mx25l.c projects/pnfs-planb-server/sys/dev/hyperv/input/hv_kbd.c projects/pnfs-planb-server/sys/dev/isp/isp.c projects/pnfs-planb-server/sys/dev/isp/isp_freebsd.c projects/pnfs-planb-server/sys/dev/isp/ispmbox.h projects/pnfs-planb-server/sys/dev/isp/ispvar.h projects/pnfs-planb-server/sys/dev/mlx4/mlx4_en/en.h projects/pnfs-planb-server/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c projects/pnfs-planb-server/sys/dev/mlx5/mlx5_en/mlx5_en_main.c projects/pnfs-planb-server/sys/dev/nand/nandsim.c projects/pnfs-planb-server/sys/dev/pci/pci_pci.c projects/pnfs-planb-server/sys/dev/pci/pcib_private.h projects/pnfs-planb-server/sys/dev/rt/if_rt.c projects/pnfs-planb-server/sys/dev/rt/if_rtreg.h projects/pnfs-planb-server/sys/dev/sdhci/sdhci_fdt.c projects/pnfs-planb-server/sys/dev/sound/pcm/feeder_matrix.c projects/pnfs-planb-server/sys/dev/uart/uart_dev_lpc.c projects/pnfs-planb-server/sys/dev/uart/uart_dev_ns8250.c projects/pnfs-planb-server/sys/dev/vt/vt_core.c projects/pnfs-planb-server/sys/fs/ext2fs/ext2_alloc.c projects/pnfs-planb-server/sys/fs/ext2fs/ext2_extattr.c projects/pnfs-planb-server/sys/fs/ext2fs/ext2_extattr.h projects/pnfs-planb-server/sys/fs/ext2fs/ext2_extern.h projects/pnfs-planb-server/sys/fs/ext2fs/ext2_inode.c projects/pnfs-planb-server/sys/fs/ext2fs/ext2_inode_cnv.c projects/pnfs-planb-server/sys/fs/ext2fs/ext2_vnops.c projects/pnfs-planb-server/sys/fs/nfsclient/nfs_clrpcops.c projects/pnfs-planb-server/sys/geom/mirror/g_mirror.c projects/pnfs-planb-server/sys/gnu/dts/mips/rt2880.dtsi projects/pnfs-planb-server/sys/kern/kern_cpuset.c projects/pnfs-planb-server/sys/kern/kern_intr.c projects/pnfs-planb-server/sys/kern/kern_sig.c projects/pnfs-planb-server/sys/kern/kern_thread.c projects/pnfs-planb-server/sys/kern/subr_gtaskqueue.c projects/pnfs-planb-server/sys/kern/vfs_cache.c projects/pnfs-planb-server/sys/libkern/crc32.c projects/pnfs-planb-server/sys/mips/atheros/ar531x/if_are.c projects/pnfs-planb-server/sys/mips/atheros/ar531x/if_arereg.h projects/pnfs-planb-server/sys/mips/atheros/ar934x_chip.c projects/pnfs-planb-server/sys/mips/conf/CARAMBOLA2 projects/pnfs-planb-server/sys/mips/conf/std.AR933X projects/pnfs-planb-server/sys/mips/conf/std.AR934X projects/pnfs-planb-server/sys/mips/mediatek/mtk_gpio_v1.c projects/pnfs-planb-server/sys/mips/mediatek/mtk_machdep.c projects/pnfs-planb-server/sys/mips/mediatek/mtk_soc.c projects/pnfs-planb-server/sys/mips/mediatek/mtk_soc.h projects/pnfs-planb-server/sys/modules/cxgbe/if_cxgbe/Makefile projects/pnfs-planb-server/sys/modules/cxgbe/tom/Makefile projects/pnfs-planb-server/sys/modules/vmm/Makefile projects/pnfs-planb-server/sys/net/if_bridge.c projects/pnfs-planb-server/sys/net/if_lagg.c projects/pnfs-planb-server/sys/net/if_lagg.h projects/pnfs-planb-server/sys/net/if_vlan.c projects/pnfs-planb-server/sys/netgraph/bluetooth/hci/ng_hci_evnt.c projects/pnfs-planb-server/sys/netgraph/bluetooth/hci/ng_hci_main.c projects/pnfs-planb-server/sys/netgraph/bluetooth/hci/ng_hci_var.h projects/pnfs-planb-server/sys/netgraph/bluetooth/include/ng_bluetooth.h projects/pnfs-planb-server/sys/netgraph/bluetooth/include/ng_btsocket.h projects/pnfs-planb-server/sys/netgraph/bluetooth/include/ng_hci.h projects/pnfs-planb-server/sys/netinet/sctp_output.c projects/pnfs-planb-server/sys/netinet/sctp_pcb.c projects/pnfs-planb-server/sys/netinet/sctp_timer.c projects/pnfs-planb-server/sys/netinet/sctp_usrreq.c projects/pnfs-planb-server/sys/netinet/sctputil.c projects/pnfs-planb-server/sys/netinet/sctputil.h projects/pnfs-planb-server/sys/netpfil/pf/pf_ioctl.c projects/pnfs-planb-server/sys/rpc/clnt_vc.c projects/pnfs-planb-server/sys/sparc64/pci/psycho.c projects/pnfs-planb-server/sys/sys/cpuset.h projects/pnfs-planb-server/sys/sys/interrupt.h projects/pnfs-planb-server/sys/sys/libkern.h projects/pnfs-planb-server/sys/sys/syscallsubr.h projects/pnfs-planb-server/sys/ufs/ffs/ffs_rawread.c projects/pnfs-planb-server/sys/ufs/ffs/fs.h projects/pnfs-planb-server/sys/vm/vm_meter.c projects/pnfs-planb-server/sys/x86/x86/mca.c Directory Properties: projects/pnfs-planb-server/sys/ (props changed) projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/ (props changed) projects/pnfs-planb-server/sys/contrib/octeon-sdk/ (props changed) Modified: projects/pnfs-planb-server/sys/Makefile ============================================================================== --- projects/pnfs-planb-server/sys/Makefile Mon May 8 19:27:44 2017 (r317971) +++ projects/pnfs-planb-server/sys/Makefile Mon May 8 19:46:33 2017 (r317972) @@ -3,7 +3,7 @@ # Directories to include in cscope name file and TAGS. CSCOPEDIRS= boot bsm cam cddl compat conf contrib crypto ddb dev fs gdb \ geom gnu isa kern libkern modules net net80211 \ - netgraph netinet netinet6 netipsec netnatm netpfil \ + netgraph netinet netinet6 netipsec netpfil \ netsmb nfs nfsclient nfsserver nlm ofed opencrypto \ rpc security sys ufs vm xdr xen ${CSCOPE_ARCHDIR} .if !defined(CSCOPE_ARCHDIR) @@ -32,7 +32,8 @@ ${.CURDIR}/cscope.files: .PHONY find ${CSCOPEDIRS} -name "*.[chSsly]" -a -type f > ${.TARGET} cscope-clean: - rm -f cscope.files cscope.out cscope.in.out cscope.po.out + cd ${.CURDIR}; \ + rm -f cscope.files cscope.out cscope.in.out cscope.po.out # # Installs SCM hooks to update the cscope database every time the source tree Modified: projects/pnfs-planb-server/sys/amd64/pci/pci_cfgreg.c ============================================================================== --- projects/pnfs-planb-server/sys/amd64/pci/pci_cfgreg.c Mon May 8 19:27:44 2017 (r317971) +++ projects/pnfs-planb-server/sys/amd64/pci/pci_cfgreg.c Mon May 8 19:46:33 2017 (r317972) @@ -64,6 +64,7 @@ static vm_offset_t pcie_base; static int pcie_minbus, pcie_maxbus; static uint32_t pcie_badslots; static struct mtx pcicfg_mtx; +MTX_SYSINIT(pcicfg_mtx, &pcicfg_mtx, "pcicfg_mtx", MTX_SPIN); static int mcfg_enable = 1; SYSCTL_INT(_hw_pci, OID_AUTO, mcfg, CTLFLAG_RDTUN, &mcfg_enable, 0, "Enable support for PCI-e memory mapped config access"); @@ -74,15 +75,9 @@ SYSCTL_INT(_hw_pci, OID_AUTO, mcfg, CTLF int pci_cfgregopen(void) { - static int once = 0; uint64_t pciebar; uint16_t did, vid; - if (!once) { - mtx_init(&pcicfg_mtx, "pcicfg", NULL, MTX_SPIN); - once = 1; - } - if (cfgmech != CFGMECH_NONE) return (1); cfgmech = CFGMECH_1; @@ -138,6 +133,9 @@ pci_cfgregread(int bus, int slot, int fu { uint32_t line; + if (cfgmech == CFGMECH_NONE) + return (0xffffffff); + /* * Some BIOS writers seem to want to ignore the spec and put * 0 in the intline rather than 255 to indicate none. Some use @@ -162,6 +160,9 @@ void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes) { + if (cfgmech == CFGMECH_NONE) + return; + if (cfgmech == CFGMECH_PCIE && (bus >= pcie_minbus && bus <= pcie_maxbus) && (bus != 0 || !(1 << slot & pcie_badslots))) Copied: projects/pnfs-planb-server/sys/amd64/vmm/amd/amdvi_hw.c (from r317971, head/sys/amd64/vmm/amd/amdvi_hw.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/pnfs-planb-server/sys/amd64/vmm/amd/amdvi_hw.c Mon May 8 19:46:33 2017 (r317972, copy of r317971, head/sys/amd64/vmm/amd/amdvi_hw.c) @@ -0,0 +1,1509 @@ +/*- + * Copyright (c) 2016, Anish Gupta (anish@freebsd.org) + * 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 unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR 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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include "pcib_if.h" + +#include "io/iommu.h" +#include "amdvi_priv.h" + +SYSCTL_DECL(_hw_vmm); +SYSCTL_NODE(_hw_vmm, OID_AUTO, amdvi, CTLFLAG_RW, NULL, NULL); + +#define MOD_INC(a, s, m) (((a) + (s)) % ((m) * (s))) +#define MOD_DEC(a, s, m) (((a) - (s)) % ((m) * (s))) + +/* Print RID or device ID in PCI string format. */ +#define RID2PCI_STR(d) PCI_RID2BUS(d), PCI_RID2SLOT(d), PCI_RID2FUNC(d) + +static void amdvi_dump_cmds(struct amdvi_softc *softc); +static void amdvi_print_dev_cap(struct amdvi_softc *softc); + +MALLOC_DEFINE(M_AMDVI, "amdvi", "amdvi"); + +extern device_t *ivhd_devs; + +extern int ivhd_count; +SYSCTL_INT(_hw_vmm_amdvi, OID_AUTO, count, CTLFLAG_RDTUN, &ivhd_count, + 0, NULL); + +static int amdvi_enable_user = 0; +SYSCTL_INT(_hw_vmm_amdvi, OID_AUTO, enable, CTLFLAG_RDTUN, + &amdvi_enable_user, 0, NULL); +TUNABLE_INT("hw.vmm.amdvi_enable", &amdvi_enable_user); + +#ifdef AMDVI_ATS_ENABLE +/* XXX: ATS is not tested. */ +static int amdvi_enable_iotlb = 1; +SYSCTL_INT(_hw_vmm_amdvi, OID_AUTO, iotlb_enabled, CTLFLAG_RDTUN, + &amdvi_enable_iotlb, 0, NULL); +TUNABLE_INT("hw.vmm.enable_iotlb", &amdvi_enable_iotlb); +#endif + +static int amdvi_host_ptp = 1; /* Use page tables for host. */ +SYSCTL_INT(_hw_vmm_amdvi, OID_AUTO, host_ptp, CTLFLAG_RDTUN, + &amdvi_host_ptp, 0, NULL); +TUNABLE_INT("hw.vmm.amdvi.host_ptp", &amdvi_host_ptp); + +/* Page table level used <= supported by h/w[v1=7]. */ +static int amdvi_ptp_level = 4; +SYSCTL_INT(_hw_vmm_amdvi, OID_AUTO, ptp_level, CTLFLAG_RDTUN, + &amdvi_ptp_level, 0, NULL); +TUNABLE_INT("hw.vmm.amdvi.ptp_level", &amdvi_ptp_level); + +/* Disable fault event reporting. */ +static int amdvi_disable_io_fault = 0; +SYSCTL_INT(_hw_vmm_amdvi, OID_AUTO, disable_io_fault, CTLFLAG_RDTUN, + &amdvi_disable_io_fault, 0, NULL); +TUNABLE_INT("hw.vmm.amdvi.disable_io_fault", &amdvi_disable_io_fault); + +static uint32_t amdvi_dom_id = 0; /* 0 is reserved for host. */ +SYSCTL_UINT(_hw_vmm_amdvi, OID_AUTO, domain_id, CTLFLAG_RD, + &amdvi_dom_id, 0, NULL); +/* + * Device table entry. + * Bus(256) x Dev(32) x Fun(8) x DTE(256 bits or 32 bytes). + * = 256 * 2 * PAGE_SIZE. + */ +static struct amdvi_dte amdvi_dte[PCI_NUM_DEV_MAX] __aligned(PAGE_SIZE); +CTASSERT(PCI_NUM_DEV_MAX == 0x10000); +CTASSERT(sizeof(amdvi_dte) == 0x200000); + +static SLIST_HEAD (, amdvi_domain) dom_head; + +static inline void +amdvi_pci_write(struct amdvi_softc *softc, int off, uint32_t data) +{ + + pci_cfgregwrite(PCI_RID2BUS(softc->pci_rid), + PCI_RID2SLOT(softc->pci_rid), PCI_RID2FUNC(softc->pci_rid), + off, data, 4); +} + +static inline uint32_t +amdvi_pci_read(struct amdvi_softc *softc, int off) +{ + + return (pci_cfgregread(PCI_RID2BUS(softc->pci_rid), + PCI_RID2SLOT(softc->pci_rid), PCI_RID2FUNC(softc->pci_rid), + off, 4)); +} + +static int +amdvi_find_pci_cap(struct amdvi_softc *softc, uint8_t capability, int *off) +{ + uint32_t read; + uint8_t ptr; + + read = amdvi_pci_read(softc, PCIR_COMMAND); + if (((read >> 16) & PCIM_STATUS_CAPPRESENT) == 0) + return (ENXIO); + + /* Read the starting of capability pointer. */ + read = amdvi_pci_read(softc, PCIR_CAP_PTR); + ptr = read & 0xFF; + + while (ptr != 0) { + read = amdvi_pci_read(softc, ptr); + if ((read & 0xFF) == capability) { + *off = ptr; + return (0); + } + ptr = (read >> 8) & 0xFF; + } + + return (ENOENT); +} + +#ifdef AMDVI_ATS_ENABLE +/* XXX: Should be in pci.c */ +/* + * Check if device has ATS capability and its enabled. + * If ATS is absent or disabled, return (-1), otherwise ATS + * queue length. + */ +static int +amdvi_find_ats_qlen(uint16_t devid) +{ + device_t dev; + uint32_t off, cap; + int qlen = -1; + + dev = pci_find_bsf(PCI_RID2BUS(devid), PCI_RID2SLOT(devid), + PCI_RID2FUNC(devid)); + + if (!dev) { + return (-1); + } +#define PCIM_ATS_EN BIT(31) + + if (pci_find_extcap(dev, PCIZ_ATS, &off) == 0) { + cap = pci_read_config(dev, off + 4, 4); + qlen = (cap & 0x1F); + qlen = qlen ? qlen : 32; + printf("AMD-Vi: PCI device %d.%d.%d ATS %s qlen=%d\n", + RID2PCI_STR(devid), + (cap & PCIM_ATS_EN) ? "enabled" : "Disabled", + qlen); + qlen = (cap & PCIM_ATS_EN) ? qlen : -1; + } + + return (qlen); +} + +/* + * Check if an endpoint device support device IOTLB or ATS. + */ +static inline bool +amdvi_dev_support_iotlb(struct amdvi_softc *softc, uint16_t devid) +{ + struct ivhd_dev_cfg *cfg; + int qlen, i; + bool pci_ats, ivhd_ats; + + qlen = amdvi_find_ats_qlen(devid); + if (qlen < 0) + return (false); + + KASSERT(softc, ("softc is NULL")); + cfg = softc->dev_cfg; + + ivhd_ats = false; + for (i = 0; i < softc->dev_cfg_cnt; i++) { + if ((cfg->start_id <= devid) && (cfg->end_id >= devid)) { + ivhd_ats = cfg->enable_ats; + break; + } + cfg++; + } + + pci_ats = (qlen < 0) ? false : true; + if (pci_ats != ivhd_ats) + device_printf(softc->dev, + "BIOS bug: mismatch in ATS setting for %d.%d.%d," + "ATS inv qlen = %d\n", RID2PCI_STR(devid), qlen); + + /* Ignore IVRS setting and respect PCI setting. */ + return (pci_ats); +} +#endif + +/* Enable IOTLB support for IOMMU if its supported. */ +static inline void +amdvi_hw_enable_iotlb(struct amdvi_softc *softc) +{ +#ifndef AMDVI_ATS_ENABLE + softc->iotlb = false; +#else + bool supported; + + supported = (softc->ivhd_flag & IVHD_FLAG_IOTLB) ? true : false; + + if (softc->pci_cap & AMDVI_PCI_CAP_IOTLB) { + if (!supported) + device_printf(softc->dev, "IOTLB disabled by BIOS.\n"); + + if (supported && !amdvi_enable_iotlb) { + device_printf(softc->dev, "IOTLB disabled by user.\n"); + supported = false; + } + } else + supported = false; + + softc->iotlb = supported; + +#endif +} + +static int +amdvi_init_cmd(struct amdvi_softc *softc) +{ + struct amdvi_ctrl *ctrl = softc->ctrl; + + ctrl->cmd.len = 8; /* Use 256 command buffer entries. */ + softc->cmd_max = 1 << ctrl->cmd.len; + + softc->cmd = malloc(sizeof(struct amdvi_cmd) * + softc->cmd_max, M_AMDVI, M_WAITOK | M_ZERO); + + if ((uintptr_t)softc->cmd & PAGE_MASK) + panic("AMDVi: Command buffer not aligned on page boundary."); + + ctrl->cmd.base = vtophys(softc->cmd) / PAGE_SIZE; + /* + * XXX: Reset the h/w pointers in case IOMMU is restarting, + * h/w doesn't clear these pointers based on empirical data. + */ + ctrl->cmd_tail = 0; + ctrl->cmd_head = 0; + + return (0); +} + +/* + * Note: Update tail pointer after we have written the command since tail + * pointer update cause h/w to execute new commands, see section 3.3 + * of AMD IOMMU spec ver 2.0. + */ +/* Get the command tail pointer w/o updating it. */ +static struct amdvi_cmd * +amdvi_get_cmd_tail(struct amdvi_softc *softc) +{ + struct amdvi_ctrl *ctrl; + struct amdvi_cmd *tail; + + KASSERT(softc, ("softc is NULL")); + KASSERT(softc->cmd != NULL, ("cmd is NULL")); + + ctrl = softc->ctrl; + KASSERT(ctrl != NULL, ("ctrl is NULL")); + + tail = (struct amdvi_cmd *)((uint8_t *)softc->cmd + + ctrl->cmd_tail); + + return (tail); +} + +/* + * Update the command tail pointer which will start command execution. + */ +static void +amdvi_update_cmd_tail(struct amdvi_softc *softc) +{ + struct amdvi_ctrl *ctrl; + int size; + + size = sizeof(struct amdvi_cmd); + KASSERT(softc->cmd != NULL, ("cmd is NULL")); + + ctrl = softc->ctrl; + KASSERT(ctrl != NULL, ("ctrl is NULL")); + + ctrl->cmd_tail = MOD_INC(ctrl->cmd_tail, size, softc->cmd_max); + softc->total_cmd++; + +#ifdef AMDVI_DEBUG_CMD + device_printf(softc->dev, "cmd_tail: %s Tail:0x%x, Head:0x%x.\n", + ctrl->cmd_tail, + ctrl->cmd_head); +#endif + +} + +/* + * Various commands supported by IOMMU. + */ + +/* Completion wait command. */ +static void +amdvi_cmd_cmp(struct amdvi_softc *softc, const uint64_t data) +{ + struct amdvi_cmd *cmd; + uint64_t pa; + + cmd = amdvi_get_cmd_tail(softc); + KASSERT(cmd != NULL, ("Cmd is NULL")); + + pa = vtophys(&softc->cmp_data); + cmd->opcode = AMDVI_CMP_WAIT_OPCODE; + cmd->word0 = (pa & 0xFFFFFFF8) | + (AMDVI_CMP_WAIT_STORE); + //(AMDVI_CMP_WAIT_FLUSH | AMDVI_CMP_WAIT_STORE); + cmd->word1 = (pa >> 32) & 0xFFFFF; + cmd->addr = data; + + amdvi_update_cmd_tail(softc); +} + +/* Invalidate device table entry. */ +static void +amdvi_cmd_inv_dte(struct amdvi_softc *softc, uint16_t devid) +{ + struct amdvi_cmd *cmd; + + cmd = amdvi_get_cmd_tail(softc); + KASSERT(cmd != NULL, ("Cmd is NULL")); + cmd->opcode = AMDVI_INVD_DTE_OPCODE; + cmd->word0 = devid; + amdvi_update_cmd_tail(softc); +#ifdef AMDVI_DEBUG_CMD + device_printf(softc->dev, "Invalidated DTE:0x%x\n", devid); +#endif +} + +/* Invalidate IOMMU page, use for invalidation of domain. */ +static void +amdvi_cmd_inv_iommu_pages(struct amdvi_softc *softc, uint16_t domain_id, + uint64_t addr, bool guest_nested, + bool pde, bool page) +{ + struct amdvi_cmd *cmd; + + cmd = amdvi_get_cmd_tail(softc); + KASSERT(cmd != NULL, ("Cmd is NULL")); + + + cmd->opcode = AMDVI_INVD_PAGE_OPCODE; + cmd->word1 = domain_id; + /* + * Invalidate all addresses for this domain. + */ + cmd->addr = addr; + cmd->addr |= pde ? AMDVI_INVD_PAGE_PDE : 0; + cmd->addr |= page ? AMDVI_INVD_PAGE_S : 0; + + amdvi_update_cmd_tail(softc); +} + +#ifdef AMDVI_ATS_ENABLE +/* Invalidate device IOTLB. */ +static void +amdvi_cmd_inv_iotlb(struct amdvi_softc *softc, uint16_t devid) +{ + struct amdvi_cmd *cmd; + int qlen; + + if (!softc->iotlb) + return; + + qlen = amdvi_find_ats_qlen(devid); + if (qlen < 0) { + panic("AMDVI: Invalid ATS qlen(%d) for device %d.%d.%d\n", + qlen, RID2PCI_STR(devid)); + } + cmd = amdvi_get_cmd_tail(softc); + KASSERT(cmd != NULL, ("Cmd is NULL")); + +#ifdef AMDVI_DEBUG_CMD + device_printf(softc->dev, "Invalidate IOTLB devID 0x%x" + " Qlen:%d\n", devid, qlen); +#endif + cmd->opcode = AMDVI_INVD_IOTLB_OPCODE; + cmd->word0 = devid; + cmd->word1 = qlen; + cmd->addr = AMDVI_INVD_IOTLB_ALL_ADDR | + AMDVI_INVD_IOTLB_S; + amdvi_update_cmd_tail(softc); +} +#endif + +#ifdef notyet /* For Interrupt Remap. */ +static void +amdvi_cmd_inv_intr_map(struct amdvi_softc *softc, + uint16_t devid) +{ + struct amdvi_cmd *cmd; + + cmd = amdvi_get_cmd_tail(softc); + KASSERT(cmd != NULL, ("Cmd is NULL")); + cmd->opcode = AMDVI_INVD_INTR_OPCODE; + cmd->word0 = devid; + amdvi_update_cmd_tail(softc); +#ifdef AMDVI_DEBUG_CMD + device_printf(softc->dev, "Invalidate INTR map of devID 0x%x\n", devid); +#endif +} +#endif + +/* Invalidate domain using INVALIDATE_IOMMU_PAGES command. */ +static void +amdvi_inv_domain(struct amdvi_softc *softc, uint16_t domain_id) +{ + struct amdvi_cmd *cmd; + + cmd = amdvi_get_cmd_tail(softc); + KASSERT(cmd != NULL, ("Cmd is NULL")); + + /* + * See section 3.3.3 of IOMMU spec rev 2.0, software note + * for invalidating domain. + */ + amdvi_cmd_inv_iommu_pages(softc, domain_id, AMDVI_INVD_PAGE_ALL_ADDR, + false, true, true); + +#ifdef AMDVI_DEBUG_CMD + device_printf(softc->dev, "Invalidate domain:0x%x\n", domain_id); + +#endif +} + +static bool +amdvi_cmp_wait(struct amdvi_softc *softc) +{ + struct amdvi_ctrl *ctrl; + const uint64_t VERIFY = 0xA5A5; + volatile uint64_t *read; + int i; + bool status; + + ctrl = softc->ctrl; + read = &softc->cmp_data; + *read = 0; + amdvi_cmd_cmp(softc, VERIFY); + /* Wait for h/w to update completion data. */ + for (i = 0; i < 100 && (*read != VERIFY); i++) { + DELAY(1000); /* 1 ms */ + } + status = (VERIFY == softc->cmp_data) ? true : false; + +#ifdef AMDVI_DEBUG_CMD + if (status) + device_printf(softc->dev, "CMD completion DONE Tail:0x%x, + "Head:0x%x, loop:%d.\n", ctrl->cmd_tail, + ctrl->cmd_head, loop); +#endif + return (status); +} + +static void +amdvi_wait(struct amdvi_softc *softc) +{ + struct amdvi_ctrl *ctrl; + int i; + + KASSERT(softc, ("softc is NULL")); + + ctrl = softc->ctrl; + KASSERT(ctrl != NULL, ("ctrl is NULL")); + /* Don't wait if h/w is not enabled. */ + if ((ctrl->control & AMDVI_CTRL_EN) == 0) + return; + + for (i = 0; i < 10; i++) { + if (amdvi_cmp_wait(softc)) + return; + } + + device_printf(softc->dev, "Error: completion failed" + " tail:0x%x, head:0x%x.\n", + ctrl->cmd_tail, ctrl->cmd_head); + amdvi_dump_cmds(softc); +} + +static void +amdvi_dump_cmds(struct amdvi_softc *softc) +{ + struct amdvi_ctrl *ctrl; + struct amdvi_cmd *cmd; + int off, i; + + ctrl = softc->ctrl; + device_printf(softc->dev, "Dump all the commands:\n"); + /* + * If h/w is stuck in completion, it is the previous command, + * start dumping from previous command onward. + */ + off = MOD_DEC(ctrl->cmd_head, sizeof(struct amdvi_cmd), + softc->cmd_max); + for (i = 0; off != ctrl->cmd_tail && + i < softc->cmd_max; i++) { + cmd = (struct amdvi_cmd *)((uint8_t *)softc->cmd + off); + printf(" [CMD%d, off:0x%x] opcode= 0x%x 0x%x" + " 0x%x 0x%lx\n", i, off, cmd->opcode, + cmd->word0, cmd->word1, cmd->addr); + off = (off + sizeof(struct amdvi_cmd)) % + (softc->cmd_max * sizeof(struct amdvi_cmd)); + } +} + +static int +amdvi_init_event(struct amdvi_softc *softc) +{ + struct amdvi_ctrl *ctrl; + + ctrl = softc->ctrl; + ctrl->event.len = 8; + softc->event_max = 1 << ctrl->event.len; + softc->event = malloc(sizeof(struct amdvi_event) * + softc->event_max, M_AMDVI, M_WAITOK | M_ZERO); + if ((uintptr_t)softc->event & PAGE_MASK) { + device_printf(softc->dev, "Event buffer not aligned on page."); + return (false); + } + ctrl->event.base = vtophys(softc->event) / PAGE_SIZE; + + /* Reset the pointers. */ + ctrl->evt_head = 0; + ctrl->evt_tail = 0; + + return (0); +} + +static inline void +amdvi_decode_evt_flag(uint16_t flag) +{ + + flag &= AMDVI_EVENT_FLAG_MASK; + printf("0x%b]\n", flag, + "\020" + "\001GN" + "\002NX" + "\003US" + "\004I" + "\005PR" + "\006RW" + "\007PE" + "\010RZ" + "\011TR" + ); +} + +/* See section 2.5.4 of AMD IOMMU spec ver 2.62.*/ +static inline void +amdvi_decode_evt_flag_type(uint8_t type) +{ + + switch (AMDVI_EVENT_FLAG_TYPE(type)) { + case 0: + printf("RSVD\n"); + break; + case 1: + printf("Master Abort\n"); + break; + case 2: + printf("Target Abort\n"); + break; + case 3: + printf("Data Err\n"); + break; + default: + break; + } +} + +static void +amdvi_decode_inv_dte_evt(uint16_t devid, uint16_t domid, uint64_t addr, + uint16_t flag) +{ + + printf("\t[IO_PAGE_FAULT EVT: devId:0x%x DomId:0x%x" + " Addr:0x%lx", + devid, domid, addr); + amdvi_decode_evt_flag(flag); +} + +static void +amdvi_decode_pf_evt(uint16_t devid, uint16_t domid, uint64_t addr, + uint16_t flag) +{ + + printf("\t[IO_PAGE_FAULT EVT: devId:0x%x DomId:0x%x" + " Addr:0x%lx", + devid, domid, addr); + amdvi_decode_evt_flag(flag); +} + +static void +amdvi_decode_dte_hwerr_evt(uint16_t devid, uint16_t domid, + uint64_t addr, uint16_t flag) +{ + + printf("\t[DEV_TAB_HW_ERR EVT: devId:0x%x DomId:0x%x" + " Addr:0x%lx", devid, domid, addr); + amdvi_decode_evt_flag(flag); + amdvi_decode_evt_flag_type(flag); +} + +static void +amdvi_decode_page_hwerr_evt(uint16_t devid, uint16_t domid, uint64_t addr, + uint16_t flag) +{ + + printf("\t[PAGE_TAB_HW_ERR EVT: devId:0x%x DomId:0x%x" + " Addr:0x%lx", devid, domid, addr); + amdvi_decode_evt_flag(flag); + amdvi_decode_evt_flag_type(AMDVI_EVENT_FLAG_TYPE(flag)); +} + +static void +amdvi_decode_evt(struct amdvi_event *evt) +{ + struct amdvi_cmd *cmd; + + switch (evt->opcode) { + case AMDVI_EVENT_INVALID_DTE: + amdvi_decode_inv_dte_evt(evt->devid, evt->pasid_domid, + evt->addr, evt->flag); + break; + + case AMDVI_EVENT_PFAULT: + amdvi_decode_pf_evt(evt->devid, evt->pasid_domid, + evt->addr, evt->flag); + break; + + case AMDVI_EVENT_DTE_HW_ERROR: + amdvi_decode_dte_hwerr_evt(evt->devid, evt->pasid_domid, + evt->addr, evt->flag); + break; + + case AMDVI_EVENT_PAGE_HW_ERROR: + amdvi_decode_page_hwerr_evt(evt->devid, evt->pasid_domid, + evt->addr, evt->flag); + break; + + case AMDVI_EVENT_ILLEGAL_CMD: + /* FALL THROUGH */ + case AMDVI_EVENT_CMD_HW_ERROR: + printf("\t[%s EVT]", (evt->opcode == AMDVI_EVENT_ILLEGAL_CMD) ? + "ILLEGAL CMD" : "CMD HW ERR"); + cmd = (struct amdvi_cmd *)PHYS_TO_DMAP(evt->addr); + printf("\tCMD opcode= 0x%x 0x%x 0x%x 0x%lx\n", + cmd->opcode, cmd->word0, cmd->word1, cmd->addr); + break; + + case AMDVI_EVENT_IOTLB_TIMEOUT: + printf("\t[IOTLB_INV_TIMEOUT devid:0x%x addr:0x%lx", + evt->devid, evt->addr); + break; + + case AMDVI_EVENT_INVALID_DTE_REQ: + printf("\t[INV_DTE devid:0x%x addr:0x%lx", + evt->devid, evt->addr); + break; + + case AMDVI_EVENT_INVALID_PPR_REQ: + case AMDVI_EVENT_COUNTER_ZERO: + printf("AMD-Vi: v2 events.\n"); + break; + + default: + printf("Unsupported AMD-Vi event:%d", evt->opcode); + } +} + +static void +amdvi_print_events(struct amdvi_softc *softc) +{ + struct amdvi_ctrl *ctrl; + struct amdvi_event *event; + int i, size; + + ctrl = softc->ctrl; + size = sizeof(struct amdvi_event); + for (i = 0; i < softc->event_max; i++) { + event = &softc->event[ctrl->evt_head / size]; + if (!event->opcode) + break; + device_printf(softc->dev, "\t[Event%d: Head:0x%x Tail:0x%x]\n", + i, ctrl->evt_head, ctrl->evt_tail); + amdvi_decode_evt(event); + ctrl->evt_head = MOD_INC(ctrl->evt_head, size, + softc->event_max); + } +} + +static int +amdvi_init_dte(struct amdvi_softc *softc) +{ + struct amdvi_ctrl *ctrl; + + ctrl = softc->ctrl; + ctrl->dte.base = vtophys(amdvi_dte) / PAGE_SIZE; + ctrl->dte.size = 0x1FF; /* 2MB device table. */ + + return (0); +} + +/* + * Not all capabilities of IOMMU are available in ACPI IVHD flag + * or EFR entry, read directly from device. + */ +static int +amdvi_print_pci_cap(device_t dev) +{ + struct amdvi_softc *softc; + uint32_t off, cap; + + + softc = device_get_softc(dev); + off = softc->cap_off; + + /* + * Section 3.7.1 of IOMMU sepc rev 2.0. + * Read capability from device. + */ + cap = amdvi_pci_read(softc, off); + + /* Make sure capability type[18:16] is 3. */ + KASSERT((((cap >> 16) & 0x7) == 0x3), + ("Not a IOMMU capability 0x%x@0x%x", cap, off)); + + softc->pci_cap = cap >> 24; + device_printf(softc->dev, "PCI cap 0x%x@0x%x feature:%b\n", + cap, off, softc->pci_cap, + "\020\001IOTLB\002HT\003NPCache\004EFR"); + + /* IOMMU spec Rev 2.0, section 3.7.2.1 */ + softc->pci_efr = softc->ctrl->ex_feature; + if (softc->pci_efr) { + device_printf(softc->dev, "PCI extended Feature:%b\n", + (int)softc->pci_efr, + "\020\001PreFSup\002PPRSup\003XTSup\004NXSup\006IASup" + "\007GASup\008HESup\009PCSup"); + device_printf(softc->dev, + "PCI HATS = %d GATS = %d GLXSup = %d, max PASID: 0x%x ", + (int)((softc->pci_efr >> 10) & 0x3), + (int)((softc->pci_efr >> 12) & 0x3), + (int)((softc->pci_efr >> 14) & 0x3), + (int)((softc->pci_efr >> 32) & 0x1F) + 1); + } + + return (0); +} + +static void +amdvi_event_intr(void *arg) +{ + struct amdvi_softc *softc; + struct amdvi_ctrl *ctrl; + + softc = (struct amdvi_softc *)arg; + ctrl = softc->ctrl; + device_printf(softc->dev, "EVT INTR %ld Status:0x%x" + " EVT Head:0x%x Tail:0x%x]\n", softc->event_intr_cnt++, + ctrl->status, ctrl->evt_head, ctrl->evt_tail); + printf(" [CMD Total 0x%lx] Tail:0x%x, Head:0x%x.\n", + softc->total_cmd, ctrl->cmd_tail, ctrl->cmd_head); + + amdvi_print_events(softc); +} + +static void +amdvi_free_evt_intr_res(device_t dev) +{ + + struct amdvi_softc *softc; + + softc = device_get_softc(dev); + if (softc->event_tag != NULL) { + bus_teardown_intr(dev, softc->event_res, softc->event_tag); + } + if (softc->event_res != NULL) { + bus_release_resource(dev, SYS_RES_IRQ, softc->event_rid, + softc->event_res); + } + bus_delete_resource(dev, SYS_RES_IRQ, softc->event_rid); + PCIB_RELEASE_MSI(device_get_parent(device_get_parent(dev)), + dev, 1, &softc->event_irq); +} + +static bool +amdvi_alloc_intr_resources(struct amdvi_softc *softc) +{ + device_t dev, pcib; + uint64_t msi_addr; + uint32_t msi_data, temp; + int err, msi_off; + + dev = softc->dev; + pcib = device_get_parent(device_get_parent(dev)); + softc->event_irq = -1; + softc->event_rid = 0; + /* + * Section 3.7.1 of IOMMU rev 2.0. With MSI, there is only one + * interrupt. XXX: Enable MSI/X support. + */ + + err = PCIB_ALLOC_MSI(pcib, dev, 1, 1, &softc->event_irq); + if (err) { + device_printf(dev, + "Couldn't find event MSI IRQ resource.\n"); + return (ENOENT); + } + err = bus_set_resource(dev, SYS_RES_IRQ, softc->event_rid, + softc->event_irq, 1); + if (err) { + device_printf(dev, "Couldn't set event MSI resource.\n"); + return (ENXIO); + } + softc->event_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &softc->event_rid, RF_ACTIVE); + if (!softc->event_res) { + device_printf(dev, + "Unable to allocate event INTR resource.\n"); + return (ENOMEM); + } + + if (bus_setup_intr(dev, softc->event_res, + INTR_TYPE_MISC | INTR_MPSAFE, NULL, amdvi_event_intr, + softc, &softc->event_tag)) { + device_printf(dev, "Fail to setup event intr\n"); + bus_release_resource(softc->dev, SYS_RES_IRQ, + softc->event_rid, softc->event_res); + softc->event_res = NULL; + return (ENXIO); + } + + bus_describe_intr(dev, softc->event_res, softc->event_tag, + "fault"); + + err = amdvi_find_pci_cap(softc, PCIY_MSI, &msi_off); + if (err) { + device_printf(dev, "Couldn't find MSI capability, err = %d.\n", + err); + return (err); + } + + err = PCIB_MAP_MSI(pcib, dev, softc->event_irq, &msi_addr, + &msi_data); + if (err) { + device_printf(dev, + "Event interrupt config failed, err=%d.\n", + err); + amdvi_free_evt_intr_res(softc->dev); + return (err); + } + + /* Configure MSI */ + amdvi_pci_write(softc, msi_off + PCIR_MSI_ADDR, msi_addr); + amdvi_pci_write(softc, msi_off + PCIR_MSI_ADDR_HIGH, + msi_addr >> 32); + amdvi_pci_write(softc, msi_off + PCIR_MSI_DATA_64BIT, msi_data); + + /* Now enable MSI interrupt. */ + temp = amdvi_pci_read(softc, msi_off); + temp |= (PCIM_MSICTRL_MSI_ENABLE << 16); /* MSI enable. */ + amdvi_pci_write(softc, msi_off, temp); + + return (0); +} + + +static void +amdvi_print_dev_cap(struct amdvi_softc *softc) +{ + struct ivhd_dev_cfg *cfg; + int i; + + cfg = softc->dev_cfg; + for (i = 0; i < softc->dev_cfg_cnt; i++) { + device_printf(softc->dev, "device [0x%x - 0x%x]" + "config:%b%s\n", cfg->start_id, cfg->end_id, + cfg->data, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Tue May 9 20:07:35 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5136D64B04 for ; Tue, 9 May 2017 20:07:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97413BBF; Tue, 9 May 2017 20:07:35 +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 v49K7YQO026734; Tue, 9 May 2017 20:07:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49K7YZc026733; Tue, 9 May 2017 20:07:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705092007.v49K7YZc026733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 9 May 2017 20:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r318103 - projects/clang500-import/lib/clang/headers X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:07:35 -0000 Author: dim Date: Tue May 9 20:07:34 2017 New Revision: 318103 URL: https://svnweb.freebsd.org/changeset/base/318103 Log: Add new LWP intrinsics header, and an option to install internal clang headers which have the same name as our system headers, and might conflict with them. (It is a work in progress to make these fully compatible.) Modified: projects/clang500-import/lib/clang/headers/Makefile Modified: projects/clang500-import/lib/clang/headers/Makefile ============================================================================== --- projects/clang500-import/lib/clang/headers/Makefile Tue May 9 19:54:33 2017 (r318102) +++ projects/clang500-import/lib/clang/headers/Makefile Tue May 9 20:07:34 2017 (r318103) @@ -52,6 +52,7 @@ INCS+= htmintrin.h INCS+= htmxlintrin.h INCS+= ia32intrin.h INCS+= immintrin.h +INCS+= lwpintrin.h INCS+= lzcntintrin.h INCS+= mm3dnow.h INCS+= mm_malloc.h @@ -85,6 +86,25 @@ INCS+= xsavesintrin.h INCS+= xtestintrin.h INCS+= ${GENINCS} +# Headers which possibly conflict with our own versions: +.if defined(INSTALL_CONFLICTING_CLANG_HEADERS) +INCS+= float.h +INCS+= intrin.h +INCS+= inttypes.h +INCS+= iso646.h +INCS+= limits.h +INCS+= stdalign.h +INCS+= stdarg.h +INCS+= stdatomic.h +INCS+= stdbool.h +INCS+= stddef.h +INCS+= stdint.h +INCS+= stdnoreturn.h +INCS+= tgmath.h +INCS+= unwind.h +INCS+= varargs.h +.endif + arm_neon.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td ${CLANG_TBLGEN} -gen-arm-neon \ -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ From owner-svn-src-projects@freebsd.org Tue May 9 20:15:00 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B154D64F10 for ; Tue, 9 May 2017 20:15:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24A851126; Tue, 9 May 2017 20:15:00 +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 v49KExf5030569; Tue, 9 May 2017 20:14:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49KExU8030568; Tue, 9 May 2017 20:14:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705092014.v49KExU8030568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 9 May 2017 20:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r318104 - projects/clang500-import/tools/build/mk X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:15:00 -0000 Author: dim Date: Tue May 9 20:14:58 2017 New Revision: 318104 URL: https://svnweb.freebsd.org/changeset/base/318104 Log: Update OptionalObsoleteFiles.inc for r318103. Modified: projects/clang500-import/tools/build/mk/OptionalObsoleteFiles.inc Modified: projects/clang500-import/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- projects/clang500-import/tools/build/mk/OptionalObsoleteFiles.inc Tue May 9 20:07:34 2017 (r318103) +++ projects/clang500-import/tools/build/mk/OptionalObsoleteFiles.inc Tue May 9 20:14:58 2017 (r318104) @@ -1383,6 +1383,7 @@ OLD_FILES+=usr/lib/clang/5.0.0/include/h OLD_FILES+=usr/lib/clang/5.0.0/include/htmxlintrin.h OLD_FILES+=usr/lib/clang/5.0.0/include/ia32intrin.h OLD_FILES+=usr/lib/clang/5.0.0/include/immintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/lwpintrin.h OLD_FILES+=usr/lib/clang/5.0.0/include/lzcntintrin.h OLD_FILES+=usr/lib/clang/5.0.0/include/mm3dnow.h OLD_FILES+=usr/lib/clang/5.0.0/include/mm_malloc.h