VideoMemory, SystemMemory And AGPMemory

APP签名验证全栈破解:Frida Hook绕过+算法逆向+Python一键调用(附可运行脚本) 做过APP逆向和爬虫的同学,肯定都被签名验证折磨过:改了一行代码重新打包,APP直接闪退;抓包看到接口有个sign参数,翻遍JS找不到加密逻辑;好不容易找到加密函数,一调用就崩溃。客户端APK签名校验服务端接口签名验证。前者防止你篡改APP,后者防止你伪造请求。很多人卡在第一步,改完APK就闪退,根本没机会碰接口。本文基于真实项目实战,分享一套通用的签名验证破解方案。从客户端APK签名校验的Frida Hook绕过,到服务端sign算法的逆向还原,最后用Python实现一键调用。 阅读详情
原帖在下文,笔记:

DxFlag:
像D3DUSAGE_DYNAMIC,  D3DPOOL_DEFAULT,  D3DPOOL_MANAGED,  D3DPOOL_SYSTEMMEM这些都是给driver一些提示说我们想这样用这些资源(静态的,动态的。。。),到底这些资源会被如何管理还是driver来说了算。
一些倾向是:
POOL:
  • D3DPOOL_DEFAULT:会根据usage来放置资源,基本是video mem和AGP mem
  • D3DPOOL_MANAGED:会在systemmemory中有备份,必要的时候copy到video/AGP mem
  • D3DPOOL_SYSTEMMEM:纯system memory中的资源,基本不用来做和GPU直接相关的事情,做一些类似UpdateSurface的事情。
Usage:会给driver有效的提示来分配哪块内存了。

      AGP memory
      是bios来决定分配的,这里有一个查看器, http://developer.nvidia.com/object/agp_memoryapp.html
      我的系统上分配了500+M的AGP memory,分配出去的memory会从系统内存划掉,cpu端就不能拿这个来做graphics以外的事情了。
      AGP是uncached memory,也就是cpu端读写都不快,但是快于cpu读写video memory,gpu读取也不快,慢于video memory

      Lock
      driver会用类似“buffer renaming”的方式来优化lock,这样discard这样的flag对于lock的效率还是有很好的影响的。

      从这里最先看到:http://www.cnitblog.com/playerwing/archive/2007/10/05/34407.html
      然后转到原帖:http://www.gamedev.net/topic/388869-whats-the-difference-between-these-2-things/
      hose two identifiers are hints to the driver for how the buffer will be used, to optimize how the card accesses the data. They make sense even without AGP memory.
      On systems with AGP memory, there are three classes of memory:
      1) System Memory. This is cached, and reasonably fast to read from and write to with the CPU. However, it typically needs an additional copy before the graphics card can use it. System and scratch pool memory goes here.
      2) AGP Memory. This is still CPU-local RAM, but it is not cached. This means that it's slow to read from, and it's slow to write to, UNLESS you write sequentially, without doing too much other memory traffic inbetween, and overwrite every byte, so that the write combiners don't need to fetch lines from RAM to do a combine. Thus, generating software-transformed vertices as a stream into this buffer might still be fast. For the GPU, the AGP memory is directly accessible, so no additional copy is needed. Dynamic pool memory goes here.
      3) Video Memory. This is RAM that's local to the GPU. It typically has insanely high throughput. It is accessible over the bus for the CPU, but going over the bus is really slow; typically both for reading and for writing. Thus writing directly into this memory (or even worse, reading out of it), is not recommended. Default pool memory goes here.
      On systems with PCI-Express, some of the AGP vs system memory differences are reduced, but the usage hints you're giving the driver ("I will change the data by writing it sequentially" vs "I will not change the data much") are still useful for optimizing performance.
      Video memory is the memory chips physically located on the card. The card can easily access this memory, while reading it from the CPU is extremely slow.
      AGP memory a part of your main memory on the motherboard that has been set aside for talking to the graphics card. The card and your CPU can access this memory at a decent speed.
      This pageshows that your BIOS "AGP aperture size" controls the size of your AGP memory, and explains how "reducing the AGP aperture size won't save you any RAM. Again, what setting the AGP aperture size does is limit the amount of RAM the AGP bus can appropriate when it needs to. It is not used unless absolutely necessary. So, setting a 64MB AGP aperture doesn't mean 64MB of your RAM will be used up as AGP memory. It will only limit the maximum amount that can be used by the AGP bus to 64MB (with a usable AGP memory size of only 26MB)."
      1) video memory can mean one of two things depending on the context the term is used in:
      a. video memory is generally any memory which is used by the graphics chip.
      b. video memory (correctly "local video memory") is memory that exists on the graphic card itself (i.e. RAM chips that live on the graphics card, they are 'local' to the graphics chip).
      2) AGP memory is main memory on your system motherboard that has been specially assigned for graphics use. The "AGP Aperture" setting in your system BIOS controls this assignment. The more you have assigned for AGP use, the less you have for general system use. AGP memory is sometimes also known as "non-local video memory".
      3a) 'Local' video memory is very fast for the graphics chip to read from and write to because it is 'local' to the graphics chip.
      3b) 'Local' video memory is extremely slow to read from using for the system CPU, and reasonably slow to write to using the system CPU. 
      This is for a number of reasons; partly because the memory is physically on a different board (the graphics card) to the CPU (i.e. it's not 'local' for the CPU); partly because that memory isn't cached at all for reads using the CPU, and only burst cached for writes; partly due to the way data transfers over bus standards such as AGP must be done.
      4a) AGP memory is reasonably fast for the graphics chip to read from or write to, but not as fast as local video memory.
      4b) AGP memory is fairly slow to read from using the system CPU because it is marked as "Write Combined" so any reads don't benefit from the L2 and L1 caches (i.e. each read is effectively a cache-miss). 
      AGP memory is however faster than local video memory to read from using the CPU since it is local to the CPU.
      4c) AGP memory is reasonably fast to write to using the system CPU. Although not fully cached, "Write Combined" memory uses a small buffer that collects sequential writes to memory (32 or 64 bytes IIRC) and writes them out in one go. This is why sequential access of vertex data using the CPU is preferable for performance.
      5) D3DUSAGE_DYNAMIC is only a hint to the display driver about how you intend using that resource, usually it will give you AGP memory, but it isn't guaranteed (so don't rely it!).
      6) Generally, for vertex buffers which you need to Lock() and update using the CPU regularly at runtime should be D3DUSAGE_DYNAMIC, and all others should be static.
      7) Graphics drivers use techniques such as "buffer renaming" where multiple copies of the buffer are created and cycled through to reduce the chance of stalls when dynamic resources are locked. This is why it's essential to use the D3DLOCK_DISCARD and D3DLOCK_NOOVERWRITE locking flags correctly if you want good performance. It's also one of the many reasons you shouldn't rely on the data pointer from a Lock() after the resource has been unlocked.
      8) General advice for good performance:
      - treat all graphics resources as write-only for the CPU, particularly those in local video memory. CPU reads from graphics resources is a recipe for slowness.
      - CPU writes to locked graphics resources should be done sequentially.
      - it's better to write all of a vertex out to memory with the CPU than it is to skip elements of it. Skipping can harm the effectiveness of write combining, and even cause hidden reads in some situations (and reads are bad - see above).
      since the "local video memory" is fast for video card to manipulate, and the video card dedicated to GRAPHICS PROCESS,why bother to use the "AGP memory"?
      is that only because the "local video memory" may be not enough for graphic data storage?
      what role does the CPU play in the process of graphics??
      Yes. That's one of the main reasons. AGP comes from a time (~10 years ago!) when a typical graphics card would have, say, 2MB of local video memory and a typical PC system had 64-128MB of main system memory, so it made sense to set some system memory aside for situations where there wasn't enough local memory.
      In these days of monster graphics cards with 512MB of local video memory, it's less likely used as an overflow.
      Another reason is dynamic graphics data - any data that needs to be regularly modified with the CPU is usually better off in AGP memory (it's write combined, but it's local to the CPU too, so uses less CPU time to access)
      Not very much these days. Mostly application-side jobs like writing vertex data into locked buffers, object culling, traversing scene graphs, loading resources into main memory, things like that. 
      On the D3D and device driver side: handling the D3D API, swizzling and other conversion when some types of resources are locked/unlocked [I believe some GPUs can even do their own swizzling now though], and setting up the command buffer for the GPU.
      Before hardware T&L, the CPU also handled all vertex processing.
      The fact that modern GPUs now handle so much of the graphics pipeline makes avoiding unnecessary serialization between CPU and GPU all the more important (i.e. stalls where one has a resource locked and the other wants to use it), thus things like buffer renaming. Serialization between CPU and GPU throws away the GPUs processing ability.
      基于机器学习的网络安全态势感知模型研究与实现 基于机器学习的网络安全态势感知模型研究与实现 1. 背景介绍 1.1 网络安全态势感知的重要性 在当今互联网时代,网络安全已经成为一个至关重要的话题。随着网络攻击手段的不断升级和演变,传统的被动防御方式已经难以满足日益 阅读详情

      相关推荐

      SPEI计算避坑指南:gma中Distribution和FitMethod参数怎么选?

      本文深入探讨了在SPEI计算中如何科学选择gma库中的Distribution和FitMethod参数,帮助研究者避开常见陷阱。详细分析了LogLogistic、Gamma和Pearson3三种分布的适用场景,以及LMoment与MLE拟合方法的优缺点,为气象干旱研究提供实用指南。

      weixin_30308101的博客 255

      显存(Video Memory)

      闲话 在从事图形优化工作之前,一直对显存(Video Memory)充满了好奇,很想了解其管理方式、基本原理、与内存的区别等,但一直没有时间和机会去研究,现在工作需要,逐渐开始接触和了解,这里也顺便记录,以免后续忘记。 什么显存? 显存,即Video Memory,简单来说,就是位于显卡的内存,其主要用途当然是用作图形显示了,现在的家用pc中基本都配置了独立显卡,即使是集成显卡,也有一定的显存,否则一些游戏玩起来可能就费劲了。 为什么需要显存? 随着计算机硬件的飞速发展,现代的CPU、内存能力已经

      z1026544682的专栏 5362

      NXP MCU CAN波特率(位时间)配置详解

      1. 概述 本文将会详细讲解如何设置NXP MCU的CAN波特率、位时间、采样点等属性。 波特率即CAN总线传输频率,位时间是波特率的倒数,例如波特率是500K,那么位时间 = 1 / 500000 = 0.000002s = 2000ns。 我们先来看一下S32K144单片机的EB中与CAN总线波特率相关的可配置参数有哪些: ...

      weixin_42967006的博客 9700

      Linux内存管理(3):内存探测与初始化

      1、内存探测     linux在被bootloader加载到内存后, cpu最初执行的内核代码是arch/x86/boot/header.S汇编文件中的_start例程,设置好头部header,其中包括大量的bootloader参数。接着是其中的start_of_setup例程,这个例程在做了一些准备工作后会通过call main跳转到arch/x86/boot/main.c:main()函数

      Jack Zhou的专栏 5828

      模拟IC实战:从零构建放大器并完成零极点仿真分析

      本文提供了一份模拟IC设计实战指南,手把手教你从零开始,在Cadence Virtuoso中搭建一个单级共源放大器。通过详细的原理图绘制、直流工作点检查,并重点完成了零极点仿真分析,直观展示了电路频率响应与参数调整的关系,帮助初学者快速建立动手实践能力与电路直觉。

      github5actions的博客 488

      Simulink开发项1000例实战专栏--实例64:基于Simulink构建一个储能系统模型

      通过引入储能系统,太阳能电站能够实现在白天储存多余的能量,在夜晚释放能量,平滑负荷曲线,提高电网的稳定性和可靠性。本项目的目标是基于Simulink平台,构建一个完整的储能系统模型,并通过仿真验证其在电网调峰中的应用效果。通过引入储能系统,工业园区能够实现在负荷高峰期释放能量,在负荷低谷期储存能量,平滑负荷曲线,降低用电成本,提高电网的稳定性和可靠性。通过引入储能系统,风力发电场能够实现在负荷高峰期释放能量,在负荷低谷期储存能量,平滑负荷曲线,提高电网的稳定性和可靠性。

      xiaoheshang_123的博客 518

      深入理解计算机基础——virtual memory

      页表 页表:记录虚拟地址到物理地址的映射 unallocated:未分配的 cached:缓存在内存中的(有效位=1) uncached:未缓存在内存中的 page hit:查找的页存在于cache中 page fault:查找的页不在cache中 内存保护 通过permission bits进行保护 虚拟地址翻译 1.CPU向MMU请求虚拟地址对应的物理地址 2.MMU查找cache中有没有对应的page table entry 3.如果page hit,则返回对应的page table en

      I_ren的博客 630

      QT6实现USB摄像头接入显示与抓拍功能实现

      QT实现USB摄像头接入显示 一、UVC协议简介 UVC全称是USB Video Class(USB视频类),是一种标准化的USB视频设备通信协议,它定义了摄像头与主机之间的数据传输协议和格式。 UVC协议的出现,解决了摄像头厂商之间互不兼容,以及摄像头应用开发与平台之间的散乱问题。 UVC标准是由USB-IF主导制定的,目前最新的版本是UVC 1.5,UVC的缺省设置类容易实现,不需要额外的驱动程序。

      热土程序园,利他愉己~ 3422

      UE学习笔记——UE5显示:Video memory has been exhausted

      UE5显示:Video memory has been exhausted的问题解决方法。

      lzldream2009的博客 1万+

      2024年ERP管理系统职业技能大赛软件测试赛项-测试报告

      【说明本次测试的最终测试结果总结、测试过程中遇到的重要问题以及如何解决、被测系统的质量结论、个人的收获以及团队的得失等】【说明编写本测试报告的目的和实际读者】【说明本次测试实际人员安排及主要职责】【说明本次测试使用的测试用例设计方法】【说明本次测试使用的测试方法】【针对本次测试进行Bug汇总】【针对本次测试进行用例汇总】【说明本项目的背景情况】【说明本次测试的实际。

      Code is fun. 794

      【转录调控网络】代谢组学与其他组学的联合分析经典模式简介

      多组学联合分析经典模式转录组学&代谢组学联合分析 转录组学&代谢组学联合分析 转录组是获得生物体内基因表达的重要方法,代谢组是生物体表型的基础和直接体现者。 转录组测序可以得到大量差异表达基因和调控代谢通路,但由于基因与表型之间很难之间关联,导致关键的信号通路难以确定,因此往往达不到预期的研究目的。代谢产物是生物体在内外调控下基因转录的最终结果,是生物体表型的物质基础。 在系统生物学研究时代,生物过程复杂多变,基因调控网络复杂。针对特定的生理、病理等表型进行研究,利用转录组的数据获得大量差异

      小哲的博客 6204

      关于 Cached Physical Memory 和 Uncached Physical Memory

      摘至:http://techpubs.sgi.com/library/dynaweb_docs/0640/SGI_Developer/books/DevDrvrO2_PG/sgi_html/ch01.html Cached Physical Memory—kseg0 When address bits 31:29 contain 100, access is directed to phy

      闲云孤鹤 2740

      基于STM32设计的智能水产养殖系统(2025)_359

      本设计提出并实现了一种基于STM32F103RCT6微控制器的智能水产养殖控制系统,针对传统水产养殖中人工依赖高、环境参数监测滞后、控制手段单一等问题,集成了TDS水质检测、水温检测、水位监测、自动喂食、自动充氧、换水控制与加热保温等功能。系统采用ESP8266模块实现WIFI联网,通过MQTT协议将关键数据上传至华为云物联网平台,支持Android手机APP和Windows上位机远程监测与控制。同时,系统具备本地LCD数据显示与蜂鸣器异常报警功能,支持本地按键控制操作。整套系统功能完善,响应灵敏,运行稳定

      634

      System mem和AGP mem和video mem

      https://blog.csdn.net/xiajun07061225/article/details/7288365 这个人写了学习图形学相关的流程,可以都看一遍 图形学,GPU编程,经常遇到这三种存储区,下面总结下: system memory, 是main memory,就是电脑内存条上的,一般很大,显卡不能访问 video memory, 显卡的显示,速度最...

      小老鼠的博客 620

      Probability and Statistics - 4th edition

      Probability and Statistics - 4th edition

      大中型超市收银系统(可直接运行)

      光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

      关于D3D资源的创建

      1 Resource的创建与存放。 如何创建3D资源对3D应用的性能影响比较大,因此3D应用开发者最好对这部分深入了解,以便配合D3D Runtime和Display Driver把不同类型、不同用途的Resource创建在最合适的地方。 在创建D3D资源时,可以存放到三种类型的Memory:System Memory,AGP Memory, Video Memory. ...

      weixin_30376323的博客 209

      OV9734 DATASHEET,完整规格书

      OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

      转载一篇介绍D3DPOOL和Lock的文章

      <br />  D3D RUTIME的内存类型,分为3种,VIDEO MEMORY(VM)、AGP MEMORY(AM)和SYSTEM MEMORY(SM),<br />所有D3D资源都创建在这3种内存之中,在创建资源时,我们可以指定如下存储标志,<br />D3DPOOL_DEFAULT、D3DPOOL_MANAGED、D3DPOOL_SYSTEMMEM和D3DPOOL_SCRATCH。<br />VM就是位于显卡上的显存,CPU只能通过AGP或PCI-E总线访问到,读写速度都是非常慢的,<br />CP

      rabbit729的专栏 1462

      介绍D3DPOOL和Lock

      D3D RUTIME的内存类型,分为3种,VIDEO MEMORY(VM)、AGP MEMORY(AM)和SYSTEM MEMORY(SM), 所有D3D资源都创建在这3种内存之中,在创建资源时,我们可以指定如下存储标志, D3DPOOL_DEFAULT、D3DPOOL_MANAGED、D3DPOOL_SYSTEMMEM和D3DPOOL_SCRATCH。 VM就是位于显卡上的显存,CPU只能

      poem_of_sunshine的专栏 1903

      深入理解Direct3D9

      深入理解D3D9对图形程序员来说意义重大,我把以前的一些学习笔记都汇总起来,希望对朋友们有些所帮助,因为是零散笔记,思路很杂,还请包涵。 其实只要你能完美理解D3DLOCK、D3DUSAGE、D3DPOOL、LOST DEVICE、QUERY、Present()、B

      lhc717的专栏 1088

      (转)D3D Lock Pool

      转自:http://www.cnblogs.com/lsmdiao0812/archive/2010/10/12/1848444.html D3D RUTIME的内存类型,分为3种,VIDEO MEMORY(VM)、AGP MEMORY(AM)和SYSTEM MEMORY(SM),所有D3D资源都创建在这3种内存之中,在创建资源时,我们可以指定如下存储标志,D3DPOOL_DEFAULT、D3D...

      weixin_30918633的博客 85

      D3D RUTIME MEMORY & DrawPrimitive

      D3D RUTIME MEMORY & DrawPrimitive 带着昨晚很多疑问,今天认真的查阅的很多资料,D3D RUTIME MEMORY分为VIDEO MEMORY(VM)、AGP MEMORY(AM)和SYSTEM MEMORY(SM),在创建资源的时指定的POOL将绝对资源存放的地方,D3D提供了常见的几种方式D3DPOOL_DEFAULT、D3DPOOL_MANAGE

      linuxheik的专栏 834

      D3D Lock Pool

      一 pool   D3D RUTIME的内存类型,分为3种,VIDEO MEMORY(VM)、AGP MEMORY(AM)和SYSTEM MEMORY(SM),所有D3D资源都创建在这3种内存之中,在创建资源时,我们可以指定如下存储标志,D3DPOOL_DEFAULT、D3DPOOL_MANAGED、D3DPOOL_SYSTEMMEM和D3DPOOL_SCRATCH。VM就是位于显卡上的显存,...

      weixin_34061042的博客 221

      D3DPOOL详解

      定义资源缓存的存储位置。   VIDEO MEMORY(VM): 显卡上的显存,CPU只能通过AGP或PCI-E总线访问,读写速度都是非常慢的,CPU连续写VM稍微快于读,因为CPU写VM时会在CACHE中分配32或64个字节(取决于CACHE LINE长度)的写缓冲,当缓冲满后会一次性写入VM。 SYSTEM MEMORY(SM): 就是系统内存,存放在System Memory上的R

      自由理想的足迹 5497
      上一篇: 引用可以被引向NULL
      下一篇: FromCarmackTwitter
      安柏霖
      安柏霖 领域专家: 学术研究与理论基础技术领域 领域专家: 学术研究与理论基础技术领域
      博客等级 码龄20年 1789粉丝 891原创
      评论 4
      成就一亿技术人!
      拼手气红包6.0元
      还能输入1000个字符
       
       条评论被折叠 查看
      添加红包

      请填写红包祝福语或标题

      个

      红包个数最小为10个

      元

      红包金额最低5元

      当前余额3.43元 前往充值 >
      需支付:10.00元
      成就一亿技术人!
      领取后你会自动成为博主和红包主的粉丝 规则
      hope_wisdom
      发出的红包
      实付元
      使用余额支付
      点击重新获取
      扫码支付
      钱包余额 0

      抵扣说明:

      1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
      2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

      余额充值
      ⌂ 换网址