惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

CUDA

招聘|外资对冲基金|机器学习工程师 [英伟达] [北京或者上海] [深度学习性能优化-CUDA] - V2EX 训练 SVC 声音模型 2060 12g 和 8G 的 3060TI 哪个快 - V2EX win11 使用 cuda 调用两个 gpu 计算时,自带任务管理器看不到 gpu2 的使用率? - V2EX Set Max_split_size_mb To Avoid Oom In Pytorch - V2EX [英伟达 NVIDIA] [上海/北京/深圳] [CUDA 相关岗位] - V2EX 如果实现 openmpi 和 cuda 编程的结合 - V2EX 怎么把显卡显存中的 rgba 图像渲染输出? - V2EX 如何实现 CUDA 的分布式并行运算? - V2EX 游戏本上用 cuda 是什么体验? - V2EX Tesla k20m 使用问题 - V2EX CUDA on WSL - V2EX 关于使用 GPU 生成随机数(cuda/opencl) - V2EX cuda 计算 titan v 为何比 rtx2080ti 更慢? - V2EX DeOldify - V2EX 不死心问一下笔记本 1050 支持 cudnn 吗? - V2EX Python+CUDA,大家有什么推荐的值得深入学习了解的项目或者著作么? - V2EX 写 CUDA,使用专业卡与游戏卡有什么区别? - V2EX 急求推荐个 5k 人民币左右的运算 GPU,能装 ubuntu 就行,跑深度学习用的,必须在 nvidia 运算能力表里面的卡 - V2EX OpenCL/CUDA/云存储求牛人指导,小伙伴们来围观 :) - V2EX 想了想用 WebGL 能不能做科学计算 - V2EX 有人用雷电转 PCI-e 设备外接显卡跑过 CUDA 的么? - V2EX 关于 GPU CUDA 编程的优化问题 - V2EX CPU or GPU? CUDA or OpenCL ? - V2EX
[cuda 函数劫持] cuda12.2 版本新增了一个函数 cuGetProcAddress_v2,请问如何进行劫持? - V2EX
TimeNewRome · 2023-11-11 · via CUDA

1. 函数签名复制:
首先,复制 cuGetProcAddress_v2_ptsz 的函数签名。这意味着你需要创建一个具有相同参数和返回类型的函数。
2. 创建自定义函数:

static inline CUresult custom_cuGetProcAddress_v2_ptsz(const char *symbol, void **funcPtr, int driverVersion, cuuint64_t flags, CUdriverProcAddressQueryResult *symbolStatus) {
// 在这里添加你的自定义逻辑,例如日志记录、参数修改等

// 调用原始函数
return cuGetProcAddress_v2_ptsz(symbol, funcPtr, driverVersion, flags, symbolStatus);
}

3. 替换函数调用:
现在,你需要在运行时将对原 cuGetProcAddress_v2_ptsz 的调用替换为对 custom_cuGetProcAddress_v2_ptsz 的调用。这通常可以通过以下方法之一实现:
• 修改动态链接库:如果是在 Windows 上,可能涉及到替换或修改 DLL 。
• 使用 LD_PRELOAD:在 Linux 上,可以使用 LD_PRELOAD 来劫持库函数。
• 直接修改函数指针:如果有机会修改指向 cuGetProcAddress_v2_ptsz 的函数指针,可以直接将其指向你的函数。
4. 测试和调试:
劫持后,需要在你的目标环境中进行充分测试,确保劫持成功且不会引入其他问题。

爱来自 GPTS