好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > 解決docker使用GDB,無法進入斷點的問題

解決docker使用GDB,無法進入斷點的問題

熱門標簽:中國地圖標注上各個省 新鄉牧野400電話申請 撫州市城區地圖標注 智能電銷機器人真的有用么 電銷智能機器人試用 百度地圖底圖標注 高德地圖標注足跡怎么打標 企業辦理400電話收費標準 激光標記地圖標注

問題

docker里運行gdb,打了斷點,卻無法進入斷點

原因

docker為了保證主機安全,docker開了很多安全設置,其中包括ASLR(Address space layout randomization),即docker里的內存地址和主機內存地址是不一樣的。

ASLR會導致GDB這種依賴地址的程序無法正常運作。

解決方法

使用docker的超級權限,加入--privileged(兩個橫線,markdown語法

如:

docker run --privileged ……

GDB即可正常運作

超級權限會關閉很多安全設置,可以更充分的使用docker能力

例如,docker里再開docker都可以了,呵呵。

補充知識:docker ptrace: Operation not permitted. 處理方法

docker中gdb在進行進程debug時,會報錯:

(gdb) attach 30721

Attaching to process 30721

ptrace: Operation not permitted.

原因就是因為ptrace被Docker默認禁止的問題。考慮到應用分析的需要,可以有以下幾種方法解決:

1、關閉seccomp

docker run --security-opt seccomp=unconfined

2、采用超級權限模式

docker run --privileged

3、僅開放ptrace限制

docker run --cap-add sys_ptrace

當然從安全角度考慮,如只是想使用gdb進行debug的話,建議使用第三種。

安全計算模式(secure computing mode,seccomp)是 Linux 內核功能,可以使用它來限制容器內可用的操作。

Docker 的默認 seccomp 配置文件是一個白名單,它指定了允許的調用。

下表列出了由于不在白名單而被有效阻止的重要(但不是全部)系統調用。該表包含每個系統調用被阻止的原因。

Syscall Description
acct Accounting syscall which could let containers disable their own resource limits or process accounting. Also gated by CAP_SYS_PACCT.
add_key Prevent containers from using the kernel keyring, which is not namespaced.
adjtimex Similar to clock_settime and settimeofday, time/date is not namespaced. Also gated by CAP_SYS_TIME.
bpf Deny loading potentially persistent bpf programs into kernel, already gated by CAP_SYS_ADMIN.
clock_adjtime Time/date is not namespaced. Also gated by CAP_SYS_TIME.
clock_settime Time/date is not namespaced. Also gated by CAP_SYS_TIME.
clone Deny cloning new namespaces. Also gated by CAP_SYS_ADMIN for CLONE_* flags, except CLONE_USERNS.
create_module Deny manipulation and functions on kernel modules. Obsolete. Also gated by CAP_SYS_MODULE.
delete_module Deny manipulation and functions on kernel modules. Also gated by CAP_SYS_MODULE.
finit_module Deny manipulation and functions on kernel modules. Also gated by CAP_SYS_MODULE.
get_kernel_syms Deny retrieval of exported kernel and module symbols. Obsolete.
get_mempolicy Syscall that modifies kernel memory and NUMA settings. Already gated by CAP_SYS_NICE.
init_module Deny manipulation and functions on kernel modules. Also gated by CAP_SYS_MODULE.
ioperm Prevent containers from modifying kernel I/O privilege levels. Already gated by CAP_SYS_RAWIO.
iopl Prevent containers from modifying kernel I/O privilege levels. Already gated by CAP_SYS_RAWIO.
kcmp Restrict process inspection capabilities, already blocked by dropping CAP_PTRACE.
kexec_file_load Sister syscall of kexec_load that does the same thing, slightly different arguments. Also gated by CAP_SYS_BOOT.
kexec_load Deny loading a new kernel for later execution. Also gated by CAP_SYS_BOOT.
keyctl Prevent containers from using the kernel keyring, which is not namespaced.
lookup_dcookie Tracing/profiling syscall, which could leak a lot of information on the host. Also gated by CAP_SYS_ADMIN.
mbind Syscall that modifies kernel memory and NUMA settings. Already gated by CAP_SYS_NICE.
mount Deny mounting, already gated by CAP_SYS_ADMIN.
move_pages Syscall that modifies kernel memory and NUMA settings.
name_to_handle_at Sister syscall to open_by_handle_at. Already gated by CAP_SYS_NICE.
nfsservctl Deny interaction with the kernel nfs daemon. Obsolete since Linux 3.1.
open_by_handle_at Cause of an old container breakout. Also gated by CAP_DAC_READ_SEARCH.
perf_event_open Tracing/profiling syscall, which could leak a lot of information on the host.
personality Prevent container from enabling BSD emulation. Not inherently dangerous, but poorly tested, potential for a lot of kernel vulns.
pivot_root Deny pivot_root, should be privileged operation.
process_vm_readv Restrict process inspection capabilities, already blocked by dropping CAP_PTRACE.
process_vm_writev Restrict process inspection capabilities, already blocked by dropping CAP_PTRACE.
ptrace Tracing/profiling syscall, which could leak a lot of information on the host. Already blocked by dropping CAP_PTRACE.
query_module Deny manipulation and functions on kernel modules. Obsolete.
quotactl Quota syscall which could let containers disable their own resource limits or process accounting. Also gated by CAP_SYS_ADMIN.
reboot Don't let containers reboot the host. Also gated by CAP_SYS_BOOT.
request_key Prevent containers from using the kernel keyring, which is not namespaced.
set_mempolicy Syscall that modifies kernel memory and NUMA settings. Already gated by CAP_SYS_NICE.
setns Deny associating a thread with a namespace. Also gated by CAP_SYS_ADMIN.
settimeofday Time/date is not namespaced. Also gated by CAP_SYS_TIME.
socket, socketcall Used to send or receive packets and for other socket operations. All socket and socketcall calls are blocked except communication domains AF_UNIX, AF_INET, AF_INET6, AF_NETLINK, and AF_PACKET.
stime Time/date is not namespaced. Also gated by CAP_SYS_TIME.
swapon Deny start/stop swapping to file/device. Also gated by CAP_SYS_ADMIN.
swapoff Deny start/stop swapping to file/device. Also gated by CAP_SYS_ADMIN.
sysfs Obsolete syscall.
_sysctl Obsolete, replaced by /proc/sys.
umount Should be a privileged operation. Also gated by CAP_SYS_ADMIN.
umount2 Should be a privileged operation. Also gated by CAP_SYS_ADMIN.
unshare Deny cloning new namespaces for processes. Also gated by CAP_SYS_ADMIN, with the exception of unshare –user.
uselib Older syscall related to shared libraries, unused for a long time.
userfaultfd Userspace page fault handling, largely needed for process migration.
ustat Obsolete syscall.
vm86 In kernel x86 real mode virtual machine. Also gated by CAP_SYS_ADMIN.
vm86old In kernel x86 real mode virtual machine. Also gated by CAP_SYS_ADMIN.

以上這篇解決docker使用GDB,無法進入斷點的問題就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

標簽:忻州 西安 邯鄲 海西 臨汾 辛集 南通 延安

巨人網絡通訊聲明:本文標題《解決docker使用GDB,無法進入斷點的問題》,本文關鍵詞  解決,docker,使用,GDB,無法,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《解決docker使用GDB,無法進入斷點的問題》相關的同類信息!
  • 本頁收集關于解決docker使用GDB,無法進入斷點的問題的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 侠女被和尚征服| 性拳头宫颈被拽出玩小说| 韩国毛片电影| 金瓶艳史1994真做| 无码精品黑人一区二区三区满天星 | 91精品国产亚洲Av高清小黄文| 国产精品一区久久 吴梦梦| 国产乱子伦真实china| 欧美韩国精品另类综合| 欧美高清老少配性啪啪| 久久精品亚洲AV无码乱码三区| 爽?好紧?宝贝别夹大巴图片| 国内熟女精品熟女A片小说| 乡村乱情小雷| 和黑帮大佬的365天免费在看第3部| 色情乱婬A片久久久爽爽| 欧美最猛性XXXⅩ丝袜| 忘穿内裤让同桌摸出水| 国外性视频| 成人精品一区二区三区不卡免费看| 男男做爰猛烈啪啪高| 高+H+肉自慰放荡爽全文动漫| 美女的隐私视频网站下载| 公公轻一点| 午夜国产一区二区| 含羞草免费观看电视剧的背景故事 | 小货sao边洗澡边cao你口述| 日韩欧美国产在线一区三上| 出轨娇妻嗯嗯奶好大| 国产精品免费视频能看| 成人精品国产| 处破女处破高潮免费看| 国产三级做爰在线播放五魁| 摸乳动态图| 男人桶美女| 男男Gay互吃呜巴吞精| 少妇婬荡呻吟久久久久久野花谷| 野外农村妇女一级A片不看了| xxxx日本免费高清视频| 曰鲁夜鲁鲁狠狠综合| 婷婷色婷婷|