WO2022021596A1 - 显卡驱动校验方法、装置、终端和介质 - Google Patents

显卡驱动校验方法、装置、终端和介质 Download PDF

Info

Publication number
WO2022021596A1
WO2022021596A1 PCT/CN2020/118630 CN2020118630W WO2022021596A1 WO 2022021596 A1 WO2022021596 A1 WO 2022021596A1 CN 2020118630 W CN2020118630 W CN 2020118630W WO 2022021596 A1 WO2022021596 A1 WO 2022021596A1
Authority
WO
WIPO (PCT)
Prior art keywords
graphics card
driver
core
core driver
graphics
Prior art date
Application number
PCT/CN2020/118630
Other languages
English (en)
French (fr)
Inventor
单晋奎
Original Assignee
长沙景嘉微电子股份有限公司
长沙景美集成电路设计有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 长沙景嘉微电子股份有限公司, 长沙景美集成电路设计有限公司 filed Critical 长沙景嘉微电子股份有限公司
Publication of WO2022021596A1 publication Critical patent/WO2022021596A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver

Definitions

  • the present application relates to computer technology, and in particular, to a method, device, terminal and medium for verifying a graphics card driver.
  • the driver (hereinafter referred to as the driver) has the function of completing data transfer between the computer operating system and the hardware device, and is a bridge between the hardware device and the operating system.
  • the driver is equivalent to the interface of the hardware, and the operating system can only control the work of the hardware device through this interface; if the driver of a device is not installed correctly, the device cannot work normally. Therefore, the safety of the drive is very important.
  • the driver of the graphics card includes an in-kernel driver and an out-of-core driver.
  • Embodiments of the present application provide a graphics card driver verification method, device, terminal, and medium, which are used to overcome the problem that in-core drivers or out-of-core drivers of graphics cards in the related art are easily forged or tampered with.
  • a first aspect of the embodiments of the present application provides a graphics card driver verification method, where the graphics card driver includes a graphics card in-core driver and a graphics card out-of-core driver; the method includes:
  • the hardware information of the graphics card read in the graphics card core driver is correct, and when the graphics card core driver matches the read graphics card firmware information, a handshake channel between the graphics card core driver and the graphics card core driver is created;
  • a second aspect of an embodiment of the present application provides a graphics card driver, where the graphics card driver includes a graphics card in-core driver and a graphics card out-of-core driver; the device includes:
  • the first processing unit is used to read the hardware information of the graphics card in the graphics card core driver is correct, and when the graphics card core driver and the graphics card firmware information are matched, create the graphics card core driver and the graphics card out-core driver. the handshake channel;
  • the second processing unit is configured to return the test result when the test result determined by the external graphics card driver according to the test data sent by the internal graphics card driver and the preset test formula is incorrect, and when it is determined that the external graphics card driver returns the test result
  • the number of timeouts exceeds the set number of times, the handshake channel between the graphics card in-core driver and the graphics card out-of-core driver is closed, it is determined that the graphics card out-of-core driver is abnormal, and the graphics card driver is controlled to end running.
  • a third aspect of the embodiments of the present application provides a terminal, including:
  • a fourth aspect of the embodiments of the present application provides a computer-readable storage medium on which a computer program is stored; the computer program is executed by a processor to implement the aforementioned method.
  • This embodiment provides a graphics card driver verification method, device, terminal, and medium.
  • a graphics card driver verification method By establishing a handshake channel for a graphics card in-core driver and a graphics card out-of-core driver, and by detecting the handshake communication between the graphics card in-core driver and the graphics card out-of-core driver for confirmation
  • the effectiveness of the graphics card driver is beneficial to timely discovering the abnormality of the graphics card driver, to end the operation of the graphics card driver in time, and to prevent the graphics card driver from being tampered with or forged.
  • FIG. 1 is a schematic flowchart of a method provided by an exemplary embodiment
  • FIG. 2 is a schematic flowchart of a method provided by another exemplary embodiment
  • FIG. 3 is a schematic flowchart of a schematic flowchart of an in-kernel driver signature provided by an exemplary embodiment
  • FIG. 4 is a schematic flowchart of detecting a driver in a graphics card core provided by an exemplary embodiment
  • FIG. 5 is a schematic flowchart of checking the handshake between the graphics card in-core driver and the graphics card out-of-core driver provided by an exemplary embodiment
  • FIG. 6 is a structural block diagram of an apparatus provided by an exemplary embodiment.
  • a driver of a graphics card (hereinafter referred to as a graphics card driver) includes an in-core driver and an out-of-core driver.
  • a graphics card driver includes an in-core driver and an out-of-core driver.
  • the in-core driver or the out-of-core driver of the graphics card can be easily forged or tampered, which is not conducive to the security of the terminal.
  • this embodiment provides a graphics card driver verification method, device, terminal and medium, which can confirm the validity of the graphics card driver through the uninterrupted handshake communication when the graphics card in-core driver and the out-of-core driver are running, thereby ensuring the validity of the graphics card driver. It is helpful to discover the abnormality of the graphics card driver in time and prevent the graphics card driver from being tampered with or forged.
  • FIG. 1 is a schematic flowchart of a method provided by an exemplary embodiment.
  • the graphics card driver includes a graphics card in-core driver and a graphics card out-of-core driver, and the method includes:
  • the hardware information of the graphics card read in the graphics card core driver is correct, and when the graphics card core driver matches the read graphics card firmware information, create a handshake channel between the graphics card core driver and the graphics card out-of-core driver;
  • step S101 when the driver in the graphics card core is running, the hardware information of the graphics card is read from the driver in the graphics card core, and the hardware information of the graphics card is obtained from the graphics card firmware or other positions; When the hardware information obtained from the graphics card is the same, make sure that the hardware information of the graphics card read from the graphics card kernel driver is correct. When the hardware information read from the driver in the graphics card kernel is different from the hardware information obtained from the graphics card, it is determined that the hardware information of the graphics card is abnormal, and the graphics card driver is controlled to end running.
  • the hardware information of the graphics card includes at least one of the following: a device ID, a graphics card model, a manufacturer, and the like. Of course, in other examples, the hardware information read from the driver in the graphics card core may also be compared with the hardware information of the graphics card obtained from locations such as the memory of the electronic device.
  • the graphics card firmware information may include a firmware version, and if the firmware version is a version supported by the graphics card out-of-core driver, it is determined that the graphics card in-core driver matches the graphics card firmware information.
  • a handshake channel between the graphics card in-core driver and the graphics card out-of-core driver is created.
  • the graphics card in-core driver and the graphics card out-of-core driver can transmit data through the handshake channel.
  • the graphics card in-core driver may send inspection data to the graphics card out-core driver; the graphics card out-core driver may return the inspection result obtained according to the inspection data to the graphics card in-core driver.
  • the counter for counting the timeout times of handshake between the graphics card in-core driver and the graphics card out-of-core driver is cleared to zero.
  • create a timer whose timing time is the set time, and the timing time of the timer is the set time.
  • the timer starts to count, and the counter is incremented by 1 each time the timer finishes timing, until the driver in the graphics card core receives the inspection result returned by the driver outside the graphics card core.
  • the implementation process of the handshake between the graphics card in-core driver and the graphics card out-of-core driver can be as follows: the graphics card in-core driver can send inspection data to the graphics card out-of-core driver through the handshake channel; after receiving the inspection data, the graphics card out-of-core driver passes the preset inspection formula. The test data is calculated to obtain the test result, and the obtained test result is sent to the driver in the graphics card core.
  • the graphics card kernel driver determines whether the received test result is correct.
  • the in-core driver of the graphics card can process the test data to obtain the corresponding result.
  • the corresponding result processed by the driver in the graphics card is the same or matched with the inspection result returned by the driver outside the graphics card, it is determined that the driver in the graphics card has received the graphics card.
  • the inspection result returned by the out-of-core driver is correct, otherwise, it is determined that the inspection result returned by the out-of-core driver of the graphics card is incorrect.
  • the driver in the graphics card core can also determine the corresponding result according to a preset test formula, and the driver in the graphics card core can match the corresponding result processed by it with the inspection result returned by the driver outside the graphics card core, determine the graphics card core.
  • the test result returned by the internal driver to the out-of-core driver of the graphics card is correct; if the corresponding result processed by the in-core driver of the graphics card does not match the test result returned by the out-of-core driver of the graphics card, it is determined that the in-core driver of the graphics card has received the out-of-core driver of the graphics card.
  • the returned test result is incorrect.
  • the preset test formula may be a hash function or other common formulas.
  • the verification data written by the graphics card in-core driver to the graphics card out-of-core driver can be regular data; for example, the verification data written by the graphics card in-core driver increases each time, or the graphics card in-core driver writes other regular data. , which can be set according to actual needs.
  • the counter is cleared to start the next round of counting.
  • the in-core driver of the graphics card When it is determined that the in-core driver of the graphics card receives an incorrect test result returned by the out-of-core driver of the graphics card, obtain the number of timeouts for the test result returned by the out-of-core driver of the graphics card.
  • the driver's handshake channel determines that the out-of-core driver of the graphics card is abnormal, and controls the graphics card driver to end the operation.
  • the time difference between the time when the out-of-core driver of the graphics card returns the inspection result and the time when the driver in the graphics card core sends the inspection data reaches the set time, it is confirmed that the out-of-core driver of the graphics card returns the inspection result overtime.
  • the setting parameters such as the setting time and the setting times can be set according to actual needs, which are not specifically limited in this embodiment.
  • the graphics card in-core driver may write test data to the graphics card out-of-core driver through the handshake channel, and when the graphics card in-core driver receives feedback data obtained by the graphics card out-of-core driver according to the test data, the graphics card in-core driver and the graphics card core are determined.
  • the handshake channel of the external driver exists; otherwise, it is determined that the handshake channel of the graphics card in-core driver and the graphics card out-of-core driver does not exist.
  • the driver outside the graphics card core reads the verification data written by the driver in the graphics card core.
  • determine that the handshake channel between the graphics card in-core driver and the graphics card out-of-core driver is abnormal terminate the communication between the graphics card in-core driver and the graphics card out-of-core driver, and control the graphics card driver to end running.
  • the graphics card driver verification method provided in this embodiment can confirm the validity of the graphics card driver through the uninterrupted handshake communication when the graphics card in-core driver and the out-of-core driver are running, thereby facilitating timely detection of graphics card driver abnormalities and preventing graphics card drivers from being corrupted. falsified or forged.
  • FIG. 2 is a schematic flowchart of a method provided by another exemplary embodiment.
  • the method further includes the step of judging the legitimacy of the driver in the graphics card core, as shown in FIG. 2 , which specifically includes:
  • step S201 exemplarily, the key signature is obtained by pre-signing the driver in the graphics card core according to the acquired signature key.
  • the signature key of the driver in the core of the graphics card is obtained from the manufacturer of the operating system, the driver in the graphics card is signed according to the obtained signature key, and the signed driver file in the core of the graphics card is released, so that the manufacturer of the operating system can able to obtain.
  • the operating system decrypts the obtained key signature according to the signature key of the driver in the graphics card core; if the decryption is successful, it is confirmed that the key signature of the driver in the graphics card core is valid, and the operating system can load the driver in the graphics card core; If unsuccessful, confirm that the key signature of the graphics card in-core driver is invalid, go to step S202, confirm that the current graphics card in-core driver is an illegal driver, the operating system refuses to load the current graphics card in-core driver, controls the graphics card driver to end running, and executes step S203.
  • the kernel of the operating system loads the in-core driver of the graphics card
  • the validity of the in-kernel driver is checked through the key signature. , which can detect the abnormality of the graphics card driver in time, which is beneficial to prevent the graphics card driver from being tampered with or forged.
  • FIG. 3 is a schematic flowchart of a schematic flowchart of an in-core driver signature provided by an exemplary embodiment
  • FIG. 4 is a schematic flowchart of a graphics card in-core driver detection provided by an exemplary embodiment
  • FIG. 5 is an exemplary implementation The example provides a flow chart for checking the handshake between the graphics card in-core driver and the graphics card out-of-core driver.
  • the in-kernel driver is signed; the details may include:
  • step S404 If valid, jump to step S404; if invalid, jump to step S403;
  • checking the handshake between the graphics card in-core driver and the graphics card out-of-core driver can include:
  • the hardware information of the graphics card can be read from the in-core driver of the graphics card;
  • step S504 If not correct, go to step S504; if correct, go to step S505;
  • step S516 If it does not match, jump to step S516;
  • the in-core driver of the graphics card is triggered to write a series of regular data to the out-of-core driver; the data will be received by step S523;
  • step S510 trigger the execution of the timer timeout operation in step S510, and add 1 to the "timeout count" set in step S508;
  • step S512 determine whether the data received in step S512 is correct
  • step S508 If correct, go to step S508; if incorrect, go to step S514;
  • step S508 If it does not reach 5 times, then jump to step S508; if it reaches 5 times, then jump to step S515;
  • the inspection process also includes:
  • step S523 When it is determined that the handshake channel exists, jump to step S523; when it is determined that the handshake channel does not exist, jump to step S526;
  • S523. Trigger the out-of-core driver of the graphics card to read the regular data of the in-core driver of the graphics card;
  • S525 Trigger the graphics card out-of-core driver to send return data to the graphics card in-core driver
  • the kernel of the operating system loads the in-core driver of the graphics card
  • the validity of the in-kernel driver is checked through the key signature, and when it is confirmed that the in-core driver of the graphics card is an illegal driver, it refuses to load the in-core driver of the graphics card. Therefore, the abnormality of the graphics card driver can be found in time, which is beneficial to prevent the graphics card driver from being tampered with or forged; the validity of the graphics card driver can be confirmed through the uninterrupted handshake communication between the graphics card in-core driver and the out-of-core driver during operation, which is conducive to timely Discovering the abnormality of the graphics card driver is helpful to further prevent the graphics card driver from being tampered with or forged.
  • This embodiment also provides a graphics card driving device, which is an embodiment of a product corresponding to the foregoing method embodiment, and its function and implementation process may be the same as or similar to the foregoing embodiment, which will not be repeated in this embodiment.
  • FIG. 6 is a structural block diagram of an apparatus provided by an exemplary embodiment.
  • the graphics card driver includes a graphics card in-core driver and a graphics card out-of-core driver; the device includes:
  • the first processing unit 61 is used to read the hardware information of the graphics card in the graphics card core driver is correct, and when the graphics card core driver matches the read graphics card firmware information, create a handshake channel between the graphics card core driver and the graphics card core driver. ;
  • the second processing unit 62 is configured to, when the verification result determined by the driver outside the graphics card core according to the verification data sent by the driver in the graphics card and the preset verification formula is incorrect, and when it is determined that the number of timeouts of the verification result returned by the driver outside the graphics card core exceeds the set value When the number of times, close the handshake channel between the graphics card in-core driver and the graphics card out-of-core driver, determine that the graphics card out-of-core driver is abnormal, and control the graphics card driver to end the operation.
  • the first processing unit 61 is further configured to: when the hardware information of the graphics card read in the graphics card kernel driver is incorrect, determine that the graphics card hardware information is abnormal, and control the graphics card driver to end running.
  • the first processing unit 61 is further configured to: when the in-core driver of the graphics card does not match the read graphics card firmware information, determine that the out-of-core driver of the graphics card is abnormal, and control the graphics card driver to end running.
  • the second processing unit 62 is also used for:
  • the trigger counter is incremented by one each time the timer completes one round of timing.
  • the second processing unit 62 is also used for:
  • the apparatus further includes a third processing unit for:
  • the device further includes a fourth processing unit for:
  • the graphics card driver provided in this embodiment can confirm the validity of the graphics card driver through the uninterrupted handshake communication when the graphics card in-core driver and the out-of-core driver are running, thereby facilitating timely discovery of graphics card driver abnormalities and preventing graphics card drivers from being tampered with or tampering with. forgery.
  • the kernel of the operating system loads the in-core driver of the graphics card
  • the validity of the in-kernel driver is checked through the key signature, and when it is confirmed that the in-core driver of the graphics card is an illegal driver, it refuses to load the in-core driver of the graphics card, so that it can be discovered in time.
  • the abnormality of the graphics card driver is further beneficial to prevent the graphics card driver from being tampered with or forged.
  • This embodiment provides a terminal device, including:
  • the computer program is stored in the memory and configured to be executed by the processor to implement the corresponding method.
  • the memory is used to store the computer program, and the processor executes the computer program after receiving the execution instruction.
  • the method executed by the apparatus defined by the flow process disclosed in the foregoing corresponding embodiments may be applied to the processor, or implemented by the processor.
  • the memory may include high-speed random access memory (RAM: Random Access Memory), and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
  • RAM Random Access Memory
  • non-volatile memory such as at least one disk memory.
  • the memory can realize the communication connection between the network element of the system and at least one other network element through at least one communication interface (which can be wired or wireless), and can use the Internet, a wide area network, a local network, a metropolitan area network, and the like.
  • a processor may be an integrated circuit chip with signal processing capabilities.
  • each step of the method disclosed in the first embodiment may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit ( ASIC), off-the-shelf programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC application-specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • Corresponding methods, steps, and logical block diagrams disclosed in the embodiments of the present invention can be implemented or executed.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in conjunction with the embodiments of the present invention may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor.
  • the software unit may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • This embodiment provides a computer-readable storage medium on which a computer program is stored; the computer program is executed by a processor to perform a corresponding method.
  • the specific implementation can refer to the method embodiment, which is not repeated here.
  • each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executables for implementing the specified logical function(s) instruction.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • the apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)
  • Storage Device Security (AREA)

Abstract

一种显卡驱动校验方法、装置、终端和介质,涉及计算机技术,用于克服相关技术中显卡的核内驱动或核外驱动极易被伪造或篡改的问题。所述方法,包括:在显卡核内驱动中读取显卡的硬件信息正确,且在所述显卡核内驱动与读取显卡固件信息匹配时,创建所述显卡核内驱动与显卡核外驱动的握手通道(S101);在所述显卡核外驱动根据所述显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果错误时,且在确定所述显卡核外驱动返回检验结果超时次数超过设定次数时,关闭所述显卡核内驱动与显卡核外驱动的握手通道,确定所述显卡核外驱动异常,控制所述显卡驱动结束运行(S102)。

Description

显卡驱动校验方法、装置、终端和介质 技术领域
本申请涉及计算机技术,尤其是涉及一种显卡驱动校验方法、装置、终端和介质。
背景技术
驱动程序(以下简称为驱动)具有在计算机操作系统与硬件设备之间完成数据传送的功能,是硬件设备和操作系统之间的桥梁。驱动相当于硬件的接口,操作系统只能通过这个接口,才能控制硬件设备的工作;假如某设备的驱动未能正确安装,则该设备便不能正常工作。因此,驱动的安全性十分重要。
在linux操作系统中,显卡的驱动包括核内驱动及核外驱动。发明人在研究过程中发现,显卡的核内驱动或核外驱动极易被伪造或篡改,不利于电子设备等终端的安全。
发明内容
本申请实施例中提供一种显卡驱动校验方法、装置、终端和介质,用于克服相关技术中显卡的核内驱动或核外驱动极易被伪造或篡改的问题。
本申请实施例第一方面提供一种显卡驱动校验方法,所述显卡驱动包括显卡核内驱动及显卡核外驱动;所述方法包括:
在显卡核内驱动中读取显卡的硬件信息正确,且在所述显卡核内驱动与读取显卡固件信息匹配时,创建所述显卡核内驱动与显卡核外驱动的握手通道;
在所述显卡核外驱动根据所述显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果错误时,且在确定所述显卡核外驱动返回检验结果超时次数超过设定次数时,关闭所述显卡核内驱动与显卡核外驱动的握手通道,确定所述显卡核外驱动异常,控制所述显卡驱动结束运行。
本申请实施例第二方面提供一种显卡驱动装置,所述显卡驱动包括显卡核内驱动及显卡核外驱动;所述装置包括:
第一处理单元,用于在显卡核内驱动中读取显卡的硬件信息正确,且在所述显卡核内驱动与读取显卡固件信息匹配时,创建所述显卡核内驱动与显卡核外驱动的握手通道;
第二处理单元,用于在所述显卡核外驱动根据所述显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果错误时,且在确定所述显卡核外驱动返回检验结果超时次数超过设定次数时,关闭所述显卡核内驱动与显卡核外驱动的握手通道,确定所述显卡核外驱动异常,控制所述显卡驱动结束运行。
本申请实施例第三方面提供一种终端,包括:
存储器;
处理器;以及
计算机程序;
其中,所述计算机程序存储在所述存储器中,并被配置为由所述处理器执行以实现如前述所述的方法。
本申请实施例第四方面提供一种计算机可读存储介质,其上存储有计算机程序;所述计算机程序被处理器执行以实现如前述所述的方法。
本实施例提供一种显卡驱动校验方法、装置、终端和介质,通过为显卡核内驱动及显卡核外驱动建立握手通道,通过检测显卡核内驱动与显卡核外驱动的握手通信情况来确认显卡驱动的有效性,从而利于及时发现显卡驱动的异常,利于及时结束显卡驱动的运行,利于防止显卡驱动被篡改或伪造。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1为一示例性实施例提供的方法的流程示意图;
图2为另一示例性实施例提供的方法的流程示意图;
图3为一示例性实施例提供的对核内驱动签名的流程示意图的流程示意图;
图4为一示例性实施例提供的对显卡核内驱动进行检测的流程示意图;
图5为一示例性实施例提供的对显卡核内驱动和显卡核外驱动的握手进行检验的流程示意图;
图6为一示例性实施例提供的装置的结构框图。
具体实施方式
为了使本申请实施例中的技术方案及优点更加清楚明白,以下结合附图对本申请的示例性实施例进行进一步详细的说明,显然,所描述的实施例仅是本申请的一部分实施例,而不是所有实施例的穷举。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
在linux操作系统下,显卡的驱动程序(以下简称为显卡驱动)包括核内驱动及核外驱动。相关技术中,由于显卡的核内驱动及核外驱动自身架构的缺陷所致,显卡的核内驱动或核外驱动极易被伪造或篡改,不利于终端的安全。
为了克服上述技术问题,本实施例提供一种显卡驱动校验方法、装置、终端和介质,能够通过显卡核内驱动与核外驱动运行时的不间断握手通信来确认显卡驱动的有效性,从而利于及时发现显卡驱动的异常,利于防止显卡驱动被篡改或伪造。
下面结合附图对本实施例提供的显卡驱动校验方法的功能及实现过程进行举例说明。
图1为一示例性实施例提供的方法的流程示意图。
如图1,本实施例提供的显卡驱动校验方法,显卡驱动包括显卡核内驱动及显卡核外驱动,方法包括:
S101、在显卡核内驱动中读取显卡的硬件信息正确,且在显卡核内驱动与读取显卡固件信息匹配时,创建显卡核内驱动与显卡核外驱动的握手通道;
S102、在显卡核外驱动根据显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果错误时,且在确定显卡核外驱动返回检验结果超时次数超过设定次数时,关闭显卡核内驱动与显卡核外驱动的握手通道,确定显卡核外驱动异常,控制显卡驱动结束运行。
在步骤S101中,在显卡核内驱动运行时,从显卡核内驱动中读取显卡的硬件信息,从显卡固件或其它位置获取显卡的硬件信息;在从显卡核内驱动读取的硬件信息与从显卡获取的硬件信息相同时,确定在显卡核内驱动中读取显卡的硬件信息正确。在从显卡核内驱动读取的硬件信息与从显卡获取的硬件信息不相同时,确定显卡硬件信息异常,控制显卡驱动结束运行。其中,显卡的硬件信息包括如下至少一种:设备ID、显卡型号、制造厂商等。当然,在其它示例中,也可将从显卡核内驱动读取的硬件信息与电子设备的存储器等位置获取的显卡的硬件信息进行比较。
在确定在显卡核内驱动中读取显卡的硬件信息正确之后,读取显卡固件信息,判断显卡核内驱动与显卡固件信息是否匹配;在读取的显卡固件信息与显卡核内驱动不匹配时,确定显卡核外驱动异常,控制显卡驱动结束运行。其中,显卡固件信息可以包括固件版本,若固件版本为显卡核外驱动所支持的版本,则确定显卡核内驱动与显卡固件信息匹配。在确定显卡核内驱动与显卡固件信息匹配时,创建显卡核内驱动与显卡核外驱动的握手通道。显卡核内驱动与显卡核外驱动可通过该握手通道传输数据。示例性地,显卡核内驱动可向显卡核外驱动发送检验数据;显卡核外驱动可将根据检验数据得到的检验结果返回给显卡核内驱动。
在建立握手通道后,将用于对显卡核内驱动与显卡核外驱动之间握手的超时次数进行计数的计数器清零。在建立握手通道后,创建定时时间为设定时间的定时器,定时器的定时时间为设定时间。在显卡核内驱动发送检验数据之后,定时器开始计时,定时器每完成一次计时,计数器加1,直至显卡核内驱动接收到显卡核外驱动返回的检验结果。
显卡核内驱动与显卡核外驱动握手的实现过程可以为:显卡核内驱动可通过握手通道向显卡核外驱动发送检验数据;显卡核外驱动在接收到检验数据之后,通过预先设置的检验公式对检验数据进行计算得到检验结果,将得到的检验结果发送给显卡核内驱动。
显卡核内驱动判断收到的检验结果是否正确。显卡核内驱动可对检验数据进行处理得到相应结果,在显卡核内驱动可将其处理得到的相应结果与显卡核外驱动返回的检验结果相同或相匹配时,确定显卡核内驱动收到显卡核外驱动返回的检验结果正确,否则,确定显卡核内驱动收到显卡核外驱动返回的检验结果不正确。
示例性地,在显卡核内驱动也可根据预设的检验公式确定出相应结果,显卡核内驱动可将其处理得到的相应结果与显卡核外驱动返回的检验结果相匹配时,确定显卡核内驱动收到显卡核外驱动返回的检验结果正确;显卡核内驱动可将其处理得到的相应结果与显卡核外驱动返回的检验结果不匹配时,确定显卡核内驱动收到显卡核外驱动返回的检验结果不正确。在具体实现时,预设的检验公式可以为哈希函数或者其它共公式,本实施例此次对于检验公式的具体内容不做限定,可根据实际需要来设置。显卡核内驱动向显卡核外驱动写入的检验数据可以为有规律的数据;例如,显卡核内驱动每次写入的检验数据递增,或者,显卡核内驱动写入的具有其它规律的数据,具体可根据实际需要来设置。
在显卡核外驱动根据显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果正确时,将计数器清零,开始下一轮的计数。
在确定显卡核内驱动收到显卡核外驱动返回的检验结果不正确时,获取显卡核外驱动返回检验结果的超时次数,在超时次数超过设定次数时,关闭显卡核内驱动与显卡核外驱动的握手通道,确定显卡核外驱动异常,控制显卡驱动结束运行。其中,在显卡核外驱动返回检验结果的时间与显卡核内驱动发送检验数据之间的时间差达到设定时间时,确认显卡核外驱动返回检验结果超时。
在显卡核外驱动根据显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果错误,且在确定显卡核外驱动返回检验结果超时次数未超过设定次数时,将计数器清零,开始下一轮的计数。
在上述示例中,设定时间、设定次数等设定参数可根据实际需要来设置,本实施例此处不做具体限定。
可选地,在显卡核内驱动向显卡核外驱动写入检验数据之前,也即显卡核外驱动读取显卡核内驱动写入的检验数据之前,需启动图形桌面,加载显卡核外驱动,判断握手通道是否存在。示例性地,显卡核内驱动可通过握手通道向显卡核外驱动写入测试数据,在显卡核内驱动收到显卡核外驱动根据测试数据得到的反馈数据时,确定显卡核内驱动与显卡核外驱动的握手通道存在;否则,确定显卡核内驱动与显卡核外驱动的握手通道不存在。
在确认握手通道存在时,显卡核外驱动读取显卡核内驱动写入的检验数据。在确认握手通道不存在时,确定显卡核内驱动与显卡核外驱动的握手通道异常,终止显卡核内驱动与显卡核外驱动之间的通信,控制显卡驱动结束运行。
本实施例提供的显卡驱动校验方法,能够通过显卡核内驱动与核外驱动运行时的不间断握手通信来确认显卡驱动的有效性,从而利于及时发现显卡驱动的异常,利于防止显卡驱动被篡改或伪造。
图2为另一示例性实施例提供的方法的流程示意图。
在其中一种可能的实现方式中,该方法还包括判断显卡核内驱动的合法性的步骤,如图2所示,具体包括:
S201、在加载显卡核内驱动时,检测显卡核内驱动的密钥签名是否有效;
S202、在显卡核内驱动的密钥签名有效时,加载显卡核内驱动;
S203、在显卡核内驱动的密钥签名失效时,确定显卡核内驱动异常,控制显卡驱动结束运行。
在步骤S201中,示例性地,密钥签名为预先根据获取的签名密钥对显卡核内驱动进行签名得到的。具体地,从操作系统的厂商获取下卡核内驱动的签 名密钥,根据获取的签名密钥对显卡核内驱动进行签名,将签名后的显卡核内驱动文件发布,以使操作系统的厂商能够获取。
获取显卡核内驱动的密钥签名,判断显卡核内驱动的密钥签名是否有效。示例性地,操作系统根据显卡核内驱动的签名密钥对获取的密钥签名进行解密;若解密成功则确认显卡核内驱动的密钥签名有效,操作系统可加载显卡核内驱动;若解密不成功则确认显卡核内驱动的密钥签名失效,执行步骤S202,确认当前的显卡核内驱动为非法驱动,操作系统拒绝加载当前的显卡核内驱动,控制显卡驱动结束运行,执行步骤S203。
本示例中,在操作系统的内核加载显卡核内驱动时,通过密钥签名对核内驱动的有效性进行检测,在确认显卡核内驱动为非法驱动时,拒绝加载该显卡核内驱动,从而,能够及时发现显卡驱动的异常,利于防止显卡驱动被篡改或伪造。
图3为一示例性实施例提供的对核内驱动签名的流程示意图的流程示意图;图4为一示例性实施例提供的对显卡核内驱动进行检测的流程示意图;图5为一示例性实施例提供的对显卡核内驱动和显卡核外驱动的握手进行检验的流程示意图。
下面结合图3、图4及图5对本实施例提供的方法的实现过程进行举例说明。
如图3所示,对核内驱动进行签名;具体可包括:
S301、从操作系统厂商获取显卡核内驱动的签名密钥;
也即,从操作系统厂商获取核内驱动签名用的密钥文件;
S302、使用密钥对显卡核内驱动进行签名;
也即,通过获取的密钥文件对显卡核内驱动文件签名;
S303、发布签名后的显卡核内驱动;
也即,将签名的显卡核内驱动文件提供给操作系统厂商。
如图4所示,加载显卡核内驱动时,检测显卡核内驱动是否有效;具体可 包括:
S401、启动操作系统;
S402、检测显卡核内驱动的签名是否有效;
若有效则跳转至步骤S404;若无效,则跳转至步骤S403;
S403、提示非法驱动,拒绝加载,并“结束”;
S404、加载显卡核内驱动。
如图5所示,对显卡核内驱动和显卡核外驱动的握手进行检验,可以包括:
S501、运行显卡核内驱动;
S502、读取显卡硬件信息;
具体地,可从显卡核内驱动中读取显卡硬件信息;
S503、判断硬件信息是否正确;
若不正确,则跳转至步骤S504;若正确,则跳转至步骤S505;
S504、提示显卡硬件信息异常,并“结束”;
S505、读取显卡固件信息;
S506、判断显卡固件信息是否匹配;
若不匹配,跳转到步骤S516;
S507、创建显卡核内驱动与核外驱动的握手通道;
S508、超时计数清零;
具体地,将显卡核内驱动与核外驱动的超时计数清零;
S509、向核外驱动写一串有规律的数据;
具体地,触发显卡核内驱动向核外驱动写一串有规律的数据;该数据将被步骤S523接收;
S510、创建一个30秒超时的定时器;
S511、超时计数加1;
具体地,触发执行步骤S510的定时器超时操作,将步骤S508设置的“超时计数加1”;
S512、接收显卡核外驱动发来的数据;
具体地,触发显卡核内驱动接收显卡核外驱动发来的数据;即步骤S525发送的数据;
S513、判断核外驱动发送的数据是否正确;
也即,判断步骤S512接收的数据是否正确;
若正确,跳转到步骤S508;若不正确,跳转到步骤S514;
S514、判断超时计数的次数是否大于5次;
若未达到5次,则跳转到步骤S508;若达到5次,则跳转到步骤S515;
S515、关闭显卡核内驱动与核外驱动的握手通道;
S516、显卡核外驱动异常,终止响应;并“结束”。
该检验过程还包括:
S520、启动图形桌面;
S521、加载显卡核外驱动;
S522、判断握手通道是否存在;
在确定握手通道存在时,跳转至步骤S523;在确定握手通道不存在时跳转至步骤S526;
S523、触发显卡核外驱动读取显卡核内驱动的有规律数据;
S524、触发显卡核外驱动根据设定公式计算返回数据;
S525、触发显卡核外驱动向显卡核内驱动发送返回数据;
S526、确认显卡核内驱动、显卡核外驱动的握手通道异常,终止通信,并“结束”。
采用本示例提供的方法,在操作系统的内核加载显卡核内驱动时,通过密钥签名对核内驱动的有效性进行检测,在确认显卡核内驱动为非法驱动时,拒绝加载该显卡核内驱动,从而,能够及时发现显卡驱动的异常,利于利于防止显卡驱动被篡改或伪造;能够通过显卡核内驱动与核外驱动运行时的不间断握手通信来确认显卡驱动的有效性,从而利于及时发现显卡驱动的异常,利于进 一步防止显卡驱动被篡改或伪造。
本实施例还提供一种显卡驱动装置,该装置是与前述方法实施例对应的产品的实施例,其功能及实现过程可与前述实施例相同或者相似,本实施例此处不再赘述。
图6为一示例性实施例提供的装置的结构框图。
如图6所示,本实施例提供一种显卡驱动装置,显卡驱动包括显卡核内驱动及显卡核外驱动;装置包括:
第一处理单元61,用于在显卡核内驱动中读取显卡的硬件信息正确,且在显卡核内驱动与读取显卡固件信息匹配时,创建显卡核内驱动与显卡核外驱动的握手通道;
第二处理单元62,用于在显卡核外驱动根据显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果错误时,且在确定显卡核外驱动返回检验结果超时次数超过设定次数时,关闭显卡核内驱动与显卡核外驱动的握手通道,确定显卡核外驱动异常,控制显卡驱动结束运行。
在其中一种可能的实现过程中,第一处理单元61还用于:在显卡核内驱动中读取显卡的硬件信息不正确时,确定显卡硬件信息异常,控制显卡驱动结束运行。
在其中一种可能的实现过程中,第一处理单元61还用于:在显卡核内驱动与读取显卡固件信息不匹配时,确定显卡核外驱动异常,控制显卡驱动结束运行。
在其中一种可能的实现过程中,第二处理单元62还用于:
将用于对显卡核内驱动与显卡核外驱动之间的超时次数进行计数的计数器清零;
在显卡核内驱动向显卡核外驱动写检验数据时,创建定时时间为设定时间的定时器;
在显卡核内驱动向显卡核外驱动写检验数据之后,且在未接收到显卡核外 驱动的检验结果之前,定时器每完成一轮计时,触发计数器加一。
在其中一种可能的实现过程中,第二处理单元62还用于:
在显卡核外驱动根据显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果正确时,将计数器清零;
在显卡核外驱动根据显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果错误,且在确定显卡核外驱动返回检验结果超时次数未超过设定次数时,将计数器清零。
在其中一种可能的实现过程中,该装置还包括第三处理单元,用于:
判断显卡核内驱动与显卡核外驱动的握手通道是否存在;在握手通道不存在时,确定显卡核内驱动与显卡核外驱动的握手通道异常,终止显卡核内驱动与显卡核外驱动之间的通信,控制显卡驱动结束运行。
在其中一种可能的实现过程中,该还包括第四处理单元,用于:
在加载显卡核内驱动时,检测显卡核内驱动的密钥签名是否有效;
在显卡核内驱动的密钥签名有效时,加载显卡核内驱动;
在显卡核内驱动的密钥签名失效时,确定显卡核内驱动异常,控制显卡驱动结束运行。
本实施例提供的显卡驱动装置,能够通过显卡核内驱动与核外驱动运行时的不间断握手通信来确认显卡驱动的有效性,从而利于及时发现显卡驱动的异常,利于防止显卡驱动被篡改或伪造。在操作系统的内核加载显卡核内驱动时,通过密钥签名对核内驱动的有效性进行检测,在确认显卡核内驱动为非法驱动时,拒绝加载该显卡核内驱动,从而,能够及时发现显卡驱动的异常,进一步利于利于防止显卡驱动被篡改或伪造。
本实施例提供一种终端设备,包括:
存储器;
处理器;以及
计算机程序;
其中,计算机程序存储在存储器中,并被配置为由处理器执行以实现相应的方法。
存储器用于存储计算机程序,处理器在接收到执行指令后,执行计算机程序,前述相应实施例揭示的流过程定义的装置所执行的方法可以应用于处理器中,或者由处理器实现。
存储器可能包含高速随机存取存储器(RAM:Random Access Memory),也可能还包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器可通过至少一个通信接口(可以是有线或者无线)实现该系统网元与至少一个其他网元之间的通信连接,可以使用互联网,广域网,本地网,城域网等。
处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,实施例一揭示的方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的相应方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件单元组合执行完成。软件单元可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
本实施例提供一种计算机可读存储介质,其上存储有计算机程序;计算机程序被处理器执行以相应的方法。其具体实现可参见方法实施例,在此不再赘 述。
需要说明的是:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对步骤、数字表达式和数值并不限制本发明的范围。在这里示出和描述的所有示例中,除非另有规定,任何具体值应被解释为仅仅是示例性的,而不是作为限制,因此,示例性实施例的其他示例可以具有不同的值。
附图中的流程图和框图显示了根据本发明的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个单元、程序段或代码的一部分,单元、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一 个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (16)

  1. 一种显卡驱动校验方法,所述显卡驱动包括显卡核内驱动及显卡核外驱动,其特征在于,所述方法包括:
    在显卡核内驱动中读取显卡的硬件信息正确,且在所述显卡核内驱动与读取显卡固件信息匹配时,创建所述显卡核内驱动与显卡核外驱动的握手通道;
    在所述显卡核外驱动根据所述显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果错误时,且在确定所述显卡核外驱动返回检验结果超时次数超过设定次数时,关闭所述显卡核内驱动与显卡核外驱动的握手通道,确定所述显卡核外驱动异常,控制所述显卡驱动结束运行。
  2. 根据权利要求1所述的方法,其特征在于,还包括:在显卡核内驱动中读取显卡的硬件信息不正确时,确定显卡硬件信息异常,控制所述显卡驱动结束运行。
  3. 根据权利要求1所述的方法,其特征在于,还包括:在所述显卡核内驱动与读取显卡固件信息不匹配时,确定所述显卡核外驱动异常,控制所述显卡驱动结束运行。
  4. 根据权利要求1所述的方法,其特征在于,在所述创建所述显卡核内驱动与显卡核外驱动的握手通道之后,还包括:
    将用于对所述所述显卡核外驱动返回检验结果超时次数进行计数的计数器清零;
    所述方法还包括:
    在所述显卡核内驱动向显卡核外驱动写检验数据时,创建定时时间为设定时间的定时器;
    在所述显卡核内驱动向显卡核外驱动写检验数据之后,且在未接收到所述显卡核外驱动的检验结果之前,所述定时器每完成一轮计时,触发所述计数器加一。
  5. 根据权利要求1所述的方法,其特征在于,还包括:
    在所述显卡核外驱动根据所述显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果正确时,将所述计数器清零;
    在所述显卡核外驱动根据所述显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果错误,且在确定所述显卡核外驱动返回检验结果超时次数未超过设定次数时,将所述计数器清零。
  6. 根据权利要求1所述的方法,其特征在于,在所述显卡核外驱动根据所述显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果错误之前,还包括:
    判断所述显卡核内驱动与显卡核外驱动的握手通道是否存在;在所述握手通道不存在时,确定所述显卡核内驱动与显卡核外驱动的握手通道异常,终止所述显卡核内驱动与显卡核外驱动之间的通信,控制所述显卡驱动结束运行。
  7. 根据权利要求1所述的方法,其特征在于,还包括:
    在加载所述显卡核内驱动时,检测所述显卡核内驱动的密钥签名是否有效;其中,所述密钥签名为预先根据获取的签名密钥对显卡核内驱动进行签名得到的;
    在所述显卡核内驱动的密钥签名有效时,加载所述显卡核内驱动;
    在所述显卡核内驱动的密钥签名失效时,确定所述显卡核内驱动异常,控制所述显卡驱动结束运行。
  8. 一种显卡驱动装置,所述显卡驱动包括显卡核内驱动及显卡核外驱动,其特征在于,所述装置包括:
    第一处理单元,用于在显卡核内驱动中读取显卡的硬件信息正确,且在所述显卡核内驱动与读取显卡固件信息匹配时,创建所述显卡核内驱动与显卡核外驱动的握手通道;
    第二处理单元,用于在所述显卡核外驱动根据所述显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果错误时,且在确定所述显卡核外驱动返回检验结果超时次数超过设定次数时,关闭所述显卡核内驱动与显卡核外驱 动的握手通道,确定所述显卡核外驱动异常,控制所述显卡驱动结束运行。
  9. 根据权利要求8所述的装置,其特征在于,所述第一处理单元还用于:在显卡核内驱动中读取显卡的硬件信息不正确时,确定显卡硬件信息异常,控制所述显卡驱动结束运行。
  10. 根据权利要求8所述的装置,其特征在于,所述第一处理单元还用于:在所述显卡核内驱动与读取显卡固件信息不匹配时,确定所述显卡核外驱动异常,控制所述显卡驱动结束运行。
  11. 根据权利要求8所述的装置,其特征在于,所述第二处理单元还用于:
    将用于对所述显卡核内驱动与所述显卡核外驱动之间的超时次数进行计数的计数器清零;
    在所述显卡核内驱动向显卡核外驱动写检验数据时,创建定时时间为设定时间的定时器;
    在所述显卡核内驱动向显卡核外驱动写检验数据之后,且在未接收到所述显卡核外驱动的检验结果之前,所述定时器每完成一轮计时,触发所述计数器加一。
  12. 根据权利要求8所述的装置,其特征在于,所述第二处理单元还用于:
    在所述显卡核外驱动根据所述显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果正确时,将所述计数器清零;
    在所述显卡核外驱动根据所述显卡核内驱动发送的检验数据及预设的检验公式确定的检验结果错误,且在确定所述显卡核外驱动返回检验结果超时次数未超过设定次数时,将所述计数器清零。
  13. 根据权利要求8所述的装置,其特征在于,还包括第三处理单元,用于:
    判断所述显卡核内驱动与显卡核外驱动的握手通道是否存在;在所述握手通道不存在时,确定所述显卡核内驱动与显卡核外驱动的握手通道异常,终止所述显卡核内驱动与显卡核外驱动之间的通信,控制所述显卡驱动结束运行。
  14. 根据权利要求8所述的装置,其特征在于,还包括第四处理单元,用于:
    在加载所述显卡核内驱动时,检测所述显卡核内驱动的密钥签名是否有效;
    在所述显卡核内驱动的密钥签名有效时,加载所述显卡核内驱动;
    在所述显卡核内驱动的密钥签名失效时,确定所述显卡核内驱动异常,控制所述显卡驱动结束运行。
  15. 一种终端,其特征在于,包括:
    存储器;
    处理器;以及
    计算机程序;
    其中,所述计算机程序存储在所述存储器中,并被配置为由所述处理器执行以实现如权利要求1-7任一项所述的方法。
  16. 一种计算机可读存储介质,其特征在于,其上存储有计算机程序;所述计算机程序被处理器执行以实现如权利要求1-7任一项所述的方法。
PCT/CN2020/118630 2020-07-30 2020-09-29 显卡驱动校验方法、装置、终端和介质 WO2022021596A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010752108.1A CN111930595B (zh) 2020-07-30 2020-07-30 显卡驱动校验方法、装置、终端和介质
CN202010752108.1 2020-07-30

Publications (1)

Publication Number Publication Date
WO2022021596A1 true WO2022021596A1 (zh) 2022-02-03

Family

ID=73314899

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/118630 WO2022021596A1 (zh) 2020-07-30 2020-09-29 显卡驱动校验方法、装置、终端和介质

Country Status (2)

Country Link
CN (1) CN111930595B (zh)
WO (1) WO2022021596A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111930595B (zh) * 2020-07-30 2022-03-15 长沙景嘉微电子股份有限公司 显卡驱动校验方法、装置、终端和介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090049214A1 (en) * 2007-08-14 2009-02-19 Hong Fu Jin Precision Industry (Shenzhen) Co., Ltd. Graphics card test method
CN107342065A (zh) * 2017-08-31 2017-11-10 惠科股份有限公司 显示装置的驱动方法、驱动装置和显示装置
CN107729069A (zh) * 2017-10-12 2018-02-23 浪潮(北京)电子信息产业有限公司 一种安全启动显卡的方法、装置、计算机可读存储介质
CN109299607A (zh) * 2018-08-24 2019-02-01 珠海奔图电子有限公司 驱动程序安全检测方法、装置和图像形成系统
CN111352822A (zh) * 2018-12-21 2020-06-30 神讯电脑(昆山)有限公司 驱动程序检测系统及其检测方法
CN111930595A (zh) * 2020-07-30 2020-11-13 长沙景嘉微电子股份有限公司 显卡驱动校验方法、装置、终端和介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1536596B1 (de) * 2003-11-28 2007-07-04 Delphi Technologies, Inc. Treibermodul und Verfahren zur Konfiguration eines Treibermoduls
US8056093B1 (en) * 2006-12-07 2011-11-08 Nvidia Corporation Asynchronous kernel processing for a graphics processing system
CN105373747A (zh) * 2015-12-09 2016-03-02 上海斐讯数据通信技术有限公司 防止系统被篡改的文件生成方法、文件验证方法及系统
CN108170441A (zh) * 2017-12-25 2018-06-15 珠海市君天电子科技有限公司 驱动程序安装方法、装置、驱动程序安装客户端及服务器
CN108958768A (zh) * 2018-06-26 2018-12-07 浪潮(北京)电子信息产业有限公司 一种gpu固件更新方法、装置、设备及计算机可读存储介质
CN109189638A (zh) * 2018-08-20 2019-01-11 郑州云海信息技术有限公司 一种gpu驱动检测方法、装置、终端及存储介质
CN112015476B (zh) * 2019-05-31 2023-11-07 龙芯中科技术股份有限公司 显卡驱动方法、装置、电子设备以及存储介质
CN110472429A (zh) * 2019-08-20 2019-11-19 闻泰通讯股份有限公司 数据校验方法、装置、电子设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090049214A1 (en) * 2007-08-14 2009-02-19 Hong Fu Jin Precision Industry (Shenzhen) Co., Ltd. Graphics card test method
CN107342065A (zh) * 2017-08-31 2017-11-10 惠科股份有限公司 显示装置的驱动方法、驱动装置和显示装置
CN107729069A (zh) * 2017-10-12 2018-02-23 浪潮(北京)电子信息产业有限公司 一种安全启动显卡的方法、装置、计算机可读存储介质
CN109299607A (zh) * 2018-08-24 2019-02-01 珠海奔图电子有限公司 驱动程序安全检测方法、装置和图像形成系统
CN111352822A (zh) * 2018-12-21 2020-06-30 神讯电脑(昆山)有限公司 驱动程序检测系统及其检测方法
CN111930595A (zh) * 2020-07-30 2020-11-13 长沙景嘉微电子股份有限公司 显卡驱动校验方法、装置、终端和介质

Also Published As

Publication number Publication date
CN111930595A (zh) 2020-11-13
CN111930595B (zh) 2022-03-15

Similar Documents

Publication Publication Date Title
US8255578B2 (en) Preventing access to a device from an external interface
US20110161645A1 (en) Content securing system
WO2022021596A1 (zh) 显卡驱动校验方法、装置、终端和介质
JP2020126576A (ja) Biosの復旧と更新の方法およびシステム
US20220171855A1 (en) Electronic control device and security verification method for electronic control device
TW201928991A (zh) 透通附接之快閃記憶體安全性
US9563500B2 (en) Storage integrity validator
JP2002070636A (ja) 車載電子制御装置、データ書換システム、データ書換方法、及び記憶媒体
JP3711871B2 (ja) Pciバスの障害解析容易化方式
JP6483461B2 (ja) 管理方法、管理プログラム、管理装置、管理システムおよび情報処理方法
JP6580279B2 (ja) テスト装置、テスト方法およびテストプログラム
US20200050799A1 (en) Storage device and data tampering detection method
CN107933499B (zh) 一种基于peps系统的钥匙id验证方法及相关装置
US11231878B2 (en) Content modification control
US20160283718A1 (en) Information processing device and information processing method
US9400758B2 (en) Reset method and network device
KR102019483B1 (ko) 이동식 저장 장치 및 그의 보안 방법
JP2011095837A (ja) フェールセーフシステム
WO2005114353A1 (ja) プログラム実行制御装置及びプログラム実行制御方法
CN111368264A (zh) 应用程序的验证方法、电脑装置及其主机板
WO2021059478A1 (ja) 情報処理装置、情報処理方法、及び、プログラムが記録された非一時的なコンピュータ可読媒体
JP2006214599A (ja) 空気調和機
JP2002047998A (ja) 車両用制御装置
CN116846911A (zh) 一种物联网操作系统低代码平台表单数据同步方法和装置
CN115374430A (zh) 信息泄露检测方法及装置、存储介质和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20947311

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 060723)

122 Ep: pct application non-entry in european phase

Ref document number: 20947311

Country of ref document: EP

Kind code of ref document: A1