Server in-band management method, device, electronic device and readable storage medium
By receiving and processing specific IPMI instructions, the server ignores the instructions of the KCS interface and turns off the firmware upgrade function, which solves the problem of server security risks in the cloud computing environment, reduces the risk of non-operation and maintenance personnel, and improves management security.
Patent Information
- Application Number
- CN202011120415.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-19
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-10-19
AI Technical Summary
There are security risks in the server in-band management method, especially in cloud computing environments, non-operation and maintenance personnel may misoperate the server, increasing the risk.
By receiving the IPMI command that indicates the activation of in-band security control, the server ignores any command from the KCS interface and turns off the BMC firmware upgrade function to reduce the risk of operations by non-operation and maintenance personnel.
It effectively reduces the risk of the server being operated by non-operation and maintenance personnel, and improves the security and management stability of the server.
Smart Images

Figure CN112256300B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a server in-band management method, device, electronic device and readable storage medium. Background Art
[0002] In-band management of servers refers to the management and maintenance of servers in the server's operating system without verification measures such as usernames and passwords. Ordinary users can manage servers in-band by sending a variety of Intelligent Platform Management Interface (IPMI) instructions, where a variety of IPMI instructions are transmitted through the Low Pin Count Bus (LPC Bus) and sent to the Baseboard Management Controller (BMC) through the Keyboard Controller Style Interface (KCS) interface. A variety of IPMI instructions can correspond to in-band management operations such as turning on and off the server, setting server power-on policies, and creating users with administrator rights.
[0003] When users send IPMI commands, there is no need to verify their identity. Any IPMI commands sent by users through the KCS interface will be received and executed by the BMC. However, this in-band management method will bring security risks to the management and maintenance of the server. Especially in today's widespread application of cloud computing, each high-performance server will virtualize multiple hosts for different users, which greatly increases the risk of servers being operated by non-operation and maintenance personnel. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a server in-band management method, device, electronic device and readable storage medium to reduce the risk of the server being operated by non-operation and maintenance personnel.
[0005] In a first aspect, an embodiment of the present application provides a server in-band management method, which is applied to a baseboard management controller BMC, and the method includes: receiving a first setting IPMI instruction sent by an external device, wherein the first setting IPMI instruction includes information representing the start of in-band security management; according to the first setting IPMI instruction, ignoring any instructions received from a keyboard controller interface KCS interface.
[0006] In the above implementation, the server can receive IPMI instructions sent by an external device, and determine whether the IPMI instructions represent the start of in-band security management. If so, the server can ignore any instructions received from the KCS interface. Since ordinary users perform in-band management actions on the server by sending IPMI instructions, and the IPMI instructions are received and executed by the BMC through the KCS interface; therefore, ignoring any instructions received from the KCS interface can avoid ordinary users' in-band management actions on the server, thereby reducing the risk of the server being operated by non-operation and maintenance personnel.
[0007] In one possible design, after receiving the first setting IPMI instruction sent by the external device, the method further includes: controlling the BMC to disable an upgrade function of the BMC firmware according to the first setting IPMI instruction.
[0008] In the above implementation, after determining that the external device sends an IPMI instruction that carries information indicating the start of in-band security control, in addition to ignoring any instructions received from the KCS interface, the action of shutting down the upgrade function of the BMC firmware can also be executed. If non-operation and maintenance personnel upgrade the BMC firmware through the PCIE bus and upgrade it to a software version that does not support the above-mentioned in-band security control, the KCS interface will be able to receive IPMI instructions, increasing the risk of the server being operated by non-operation and maintenance personnel. Therefore, controlling the BMC to shut down the upgrade function of the BMC firmware can further reduce the risk of the server being operated by non-operation and maintenance personnel.
[0009] In one possible design, after ignoring any instructions received from the keyboard controller type interface KCS interface according to the first setting IPMI instruction, the method further includes: receiving a second setting IPMI instruction sent by an external device, wherein the second setting IPMI instruction includes information representing the stopping of in-band security management and control; and stopping ignoring instructions received from the KCS interface according to the second setting IPMI instruction.
[0010] In the above implementation, after receiving the second IPMI setting instruction sent by the external device, the behavior of ignoring the instruction received from the KCS interface can also be stopped. The server can switch to ignore the instruction received from the KCS interface or stop ignoring the instruction received from the KCS interface according to the first IPMI setting instruction and the second IPMI setting instruction. When it is necessary to ignore the instruction received from the KCS interface, the first IPMI setting instruction is received, and it is ignored according to the first IPMI setting instruction; when it is necessary to stop ignoring the instruction received from the KCS interface, the second IPMI setting instruction is received, and according to the second IPMI setting instruction, the ignoring of the IPMI instruction received from the KCS interface is stopped. The above method can make the in-band management of the server more flexible.
[0011] In a possible design, the controlling the BMC to shut down the upgrade function of the BMC firmware includes: rewriting a preset value of a target register in the BMC from a first value to a second value, so that the BMC prohibits a software tool from upgrading the BMC firmware through a PCIE bus.
[0012] In the above implementation, prohibiting the upgrade of the BMC firmware can be achieved by rewriting the preset value of a register in the BMC from the first value to the second value. The upgrade of the BMC firmware can also be prohibited by other methods. For example, the IPMI instruction can directly include information indicating that the upgrade of the BMC firmware is prohibited. The specific method of prohibiting the upgrade of the BMC firmware should not be understood as a limitation to the present application.
[0013] In one possible design, after controlling the BMC to turn off the upgrade function of the BMC firmware according to the first setting IPMI instruction, the method further includes: receiving a second setting IPMI instruction sent by an external device, wherein the second setting IPMI instruction includes information representing the stopping of in-band security management and control; according to the second setting IPMI instruction, stopping ignoring any instructions received from the KCS interface, and controlling the BMC to turn on the upgrade function of the BMC firmware.
[0014] In the above implementation, the server can also receive a second IPMI instruction sent by an external device that carries information indicating the stopping of in-band security control, and after receiving the second IPMI instruction, stop ignoring any instructions received from the KCS interface, and control the BMC to enable the previously disabled BMC firmware upgrade function. The server can switch the BMC firmware upgrade function on or off according to the first IPMI instruction and the second IPMI instruction, and when the BMC firmware upgrade function needs to be turned off, turn it off; when the BMC firmware upgrade function needs to be turned on, turn it on. The above method can make the server in-band management more flexible.
[0015] In one possible design, the controlling the BMC to enable the upgrade function of the BMC firmware includes: changing the preset value of the target register from the second value back to the first value, so that the BMC enables the software tool to upgrade the BMC firmware through the PCIE bus.
[0016] In the above implementation, when the upgrade function of the BMC firmware is turned off, it is achieved by changing the preset value from the first value to the second value; therefore, when the upgrade function of the BMC firmware is turned on, it can be achieved by changing the preset value from the second value back to the first value. It should be understood that the function of upgrading the BMC firmware can also be turned on in other ways, for example, the second setting IPMI instruction can directly include information indicating that the BMC firmware is allowed to be upgraded, and the specific way of allowing the BMC firmware to be upgraded should not be understood as a limitation to the present application.
[0017] In one possible design, after receiving the first setting IPMI instruction sent by the external device, and before ignoring any instruction received from the keyboard controller type interface KCS interface according to the first setting IPMI instruction, the method also includes: verifying the legality of the first setting IPMI instruction.
[0018] In order to further improve the security of the in-band management of the server, the first setting IPMI instruction may be verified to determine that the first setting IPMI instruction comes from an operation and maintenance personnel rather than an ordinary user.
[0019] In one possible design, receiving a first setting intelligent platform management interface (IPMI) instruction sent by an external device includes: receiving a communication message including the first setting IPMI instruction through a network interface.
[0020] In the above-mentioned implementation mode, the IPMI instructions that control the in-band management of the server should be avoided from being passed through the KCS interface. Otherwise, after ignoring the IPMI instructions received from the KCS interface, the IPMI instructions carrying the indication of stopping ignoring the IPMI instructions received from the KCS interface will be ignored. The IPMI instructions received by the server that can control the in-band management of the server can come from the communication message transmitted through the network interface. Optionally, the first setting IPMI instruction can also come from the I2C bus. It should be understood that, in the case where the IPMI instructions that control the in-band management of the server are not passed through the KCS interface, the channel through which the IPMI instructions are sent to the server should not be understood as a limitation on the present application.
[0021] In the second aspect, an embodiment of the present application provides a server in-band management device, which is applied to BMC, and the device includes: a first instruction receiving module, which is used to receive a first setting IPMI instruction sent by an external device, wherein the first setting IPMI instruction includes information representing the startup of in-band security management and control; an instruction ignoring module, which is used to ignore any instruction received from the keyboard controller type interface KCS interface according to the first setting IPMI instruction.
[0022] In the above implementation, the server can receive IPMI instructions sent by an external device, and determine whether the IPMI instructions represent the start of in-band security management. If so, the server can ignore any instructions received from the KCS interface. Since ordinary users perform in-band management actions on the server by sending IPMI instructions, and the IPMI instructions are received and executed by the BMC through the KCS interface; therefore, ignoring any instructions received from the KCS interface can avoid ordinary users' in-band management actions on the server, thereby reducing the risk of the server being operated by non-operation and maintenance personnel.
[0023] In one possible design, the device also includes: an upgrade function shutdown module, which is used to control the BMC to shut down the upgrade function of the BMC firmware according to the first set IPMI instruction.
[0024] In the above implementation, after determining that the external device sends an IPMI instruction that carries information indicating the start of in-band security control, in addition to ignoring any instructions received from the KCS interface, the action of shutting down the upgrade function of the BMC firmware can also be executed. If non-operation and maintenance personnel upgrade the BMC firmware through the PCIE bus and upgrade it to a software version that does not support the above-mentioned in-band security control, the KCS interface will be able to receive IPMI instructions, increasing the risk of the server being operated by non-operation and maintenance personnel. Therefore, controlling the BMC to shut down the upgrade function of the BMC firmware can further reduce the risk of the server being operated by non-operation and maintenance personnel.
[0025] In one possible design, the device also includes: a second instruction receiving module, used to receive a second setting IPMI instruction sent by an external device, wherein the second setting IPMI instruction includes information representing the stopping of in-band security management and control; and a stop ignoring module, used to stop ignoring any instructions received from the KCS interface according to the second setting IPMI instruction.
[0026] In the above implementation, after receiving the second IPMI setting instruction sent by the external device, the behavior of ignoring the instruction received from the KCS interface can also be stopped. The server can switch to ignore the instruction received from the KCS interface or stop ignoring the instruction received from the KCS interface according to the first IPMI setting instruction and the second IPMI setting instruction. When it is necessary to ignore the instruction received from the KCS interface, the first IPMI setting instruction is received, and it is ignored according to the first IPMI setting instruction; when it is necessary to stop ignoring the instruction received from the KCS interface, the second IPMI setting instruction is received, and according to the second IPMI setting instruction, the ignoring of the IPMI instruction received from the KCS interface is stopped. The above method can make the in-band management of the server more flexible.
[0027] In a possible design, the upgrade function shutdown module is specifically used to rewrite the preset value of the target register in the BMC from a first value to a second value, so that the BMC prohibits the software tool from upgrading the BMC firmware through the PCIE bus.
[0028] In the above implementation, prohibiting the upgrade of the BMC firmware can be achieved by rewriting the preset value of a register in the BMC from the first value to the second value. The upgrade of the BMC firmware can also be prohibited by other methods. For example, the IPMI instruction can directly include information indicating that the upgrade of the BMC firmware is prohibited. The specific method of prohibiting the upgrade of the BMC firmware should not be understood as a limitation to the present application.
[0029] In one possible design, the device also includes: a security control stop module, used to receive a second setting IPMI instruction sent by an external device, wherein the second setting IPMI instruction includes information representing the stopping of in-band security control; an upgrade function enabling module, used to stop ignoring any instructions received from the KCS interface according to the second setting IPMI instruction, and control the BMC to enable the upgrade function of the BMC firmware.
[0030] In the above implementation, the server can also receive a second IPMI instruction sent by an external device that carries information indicating the stopping of in-band security control, and after receiving the second IPMI instruction, stop ignoring any instructions received from the KCS interface, and control the BMC to enable the previously disabled BMC firmware upgrade function. The server can switch the BMC firmware upgrade function on or off according to the first IPMI instruction and the second IPMI instruction, and when the BMC firmware upgrade function needs to be turned off, turn it off; when the BMC firmware upgrade function needs to be turned on, turn it on. The above method can make the server in-band management more flexible.
[0031] In a possible design, the upgrade function activation module is specifically used to change the preset value of the target register from the second value back to the first value, so that the BMC activates the function of the software tool to upgrade the firmware of the BMC through the PCIE bus.
[0032] In the above implementation, when the upgrade function of the BMC firmware is turned off, it is achieved by changing the preset value from the first value to the second value; therefore, when the upgrade function of the BMC firmware is turned on, it can be achieved by changing the preset value from the second value back to the first value. It should be understood that the function of upgrading the BMC firmware can also be turned on in other ways, for example, the second setting IPMI instruction can directly include information indicating that the BMC firmware is allowed to be upgraded, and the specific way of allowing the BMC firmware to be upgraded should not be understood as a limitation to the present application.
[0033] In one possible design, the device also includes an instruction verification module for verifying the legitimacy of the first setting IPMI instruction.
[0034] In one possible design, the first instruction receiving module is specifically used to receive a communication message including the first setting IPMI instruction through a network interface.
[0035] In the above-mentioned implementation mode, the IPMI instructions that control the in-band management of the server should be avoided from being passed through the KCS interface. Otherwise, after ignoring the IPMI instructions received from the KCS interface, the IPMI instructions carrying the indication of stopping ignoring the IPMI instructions received from the KCS interface will be ignored. The IPMI instructions received by the server that can control the in-band management of the server can come from the communication message transmitted through the network interface. Optionally, the first setting IPMI instruction can also come from the I2C bus. It should be understood that, in the case where the IPMI instructions that control the in-band management of the server are not passed through the KCS interface, the channel through which the IPMI instructions are sent to the server should not be understood as a limitation on the present application.
[0036] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of the above method.
[0037] In a fourth aspect, the present application provides a readable storage medium having an executable program stored thereon, and the executable program is executed by a processor to execute the method described in the first aspect or any optional implementation of the first aspect.
[0038] In a fifth aspect, the present application provides an executable program product, which, when running on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0039] In order to make the above-mentioned objectives, features and advantages to be achieved by the embodiments of the present application more obvious and understandable, the following specifically cites preferred embodiments and describes them in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A schematic diagram of the process of the server in-band management method provided by an embodiment of the present application is shown;
[0042] Figure 2 A flow chart showing some steps of the server in-band management method provided by an embodiment of the present application is shown;
[0043] Figure 3 A flow chart showing some steps of the server in-band management method provided by an embodiment of the present application is shown;
[0044] Figure 4 A schematic diagram of a flow chart of a server in-band management method provided by another embodiment of the present application is shown;
[0045] Figure 5 A schematic structural block diagram of a server in-band management device provided in an embodiment of the present application is shown;
[0046] Figure 6 A possible structure of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0047] In the comparative embodiment, ordinary users can perform in-band management of the server by sending multiple IPMI instructions to the server. The above multiple IPMI instructions are transmitted through the LPC bus and sent to the BMC through the KCS interface. In-band management of the server includes: turning on and off the server, setting the server power-on policy, creating a user with administrator rights, etc. Different operations correspond to different IPMI instructions.
[0048] When ordinary users send the above-mentioned IPMI commands to achieve in-band management of the server, there is no need to verify the user's identity. Any IPMI command transmitted through the KCS interface will be received and executed by the BMC. However, this in-band management method will bring security risks to the management and maintenance of the server.
[0049] In the embodiment of the present application, the operation and maintenance personnel can send an IPMI instruction carrying information representing the startup of in-band security control to the server via an external device, so that the BMC of the server can ignore any instructions received from the KCS interface, avoid ordinary users' in-band management actions on the server, and thus reduce the risk of the server being operated by non-operation and maintenance personnel.
[0050] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0051] See also Figure 1 , Figure 1 The server in-band management method provided by the embodiment of the present application is shown, and the method can be executed by an electronic device, and the electronic device can be a server. The method specifically includes the following steps S110 to S120:
[0052] Step S110: receiving a first setting intelligent platform management interface (IPMI) instruction sent by an external device, wherein the first setting IPMI instruction includes information indicating starting in-band security control.
[0053] Receiving an IPMI instruction sent by an external device may specifically include: receiving the IPMI instruction via a two-wire serial (Inter-Integrated Circuit, referred to as I2C) bus; or receiving a communication message including the IPMI instruction via a network interface, and the communication message may specifically be a network communication message based on the User Datagram Protocol (User Datagram Protocol, referred to as UDP).
[0054] It should be understood that, when the IPMI instructions for controlling the in-band management of the server are not passed through the KCS interface, the channel through which the IPMI instructions are sent to the server should not be understood as a limitation on the present application.
[0055] IPMI instructions that control the in-band management of the server should avoid being passed through the KCS interface. Otherwise, after ignoring the IPMI instructions received from the KCS interface, the IPMI instructions that carry the indication of stopping ignoring received from the KCS interface will be ignored. It should be understood that, in the case where the IPMI instructions that control the in-band management of the server are not passed through the KCS interface, the channel through which the IPMI instructions are sent to the server should not be understood as a limitation to the present application.
[0056] The first IPMI setting instruction can be customized by the server staff or operation and maintenance personnel and is not known by ordinary users. The first IPMI setting instruction is sent to the server to start the in-band security control action of the server.
[0057] Optionally, in a specific implementation, after step S110, the following step may be further included: verifying the legality of the first setting IPMI instruction. The above step may be implemented in the following manner:
[0058] The identity information corresponding to the first set IPMI instruction is pre-stored in the server. After receiving an IPMI instruction sent by an external device, the server can obtain the identity information of the IPMI instruction, and compare the identity information of the currently received IPMI instruction with the identity information of the first set IPMI instruction pre-stored in the server. If the two are consistent, it can be determined that the source of the currently received first set IPMI instruction is legal. The identity information can be user name and password information.
[0059] In another specific implementation manner, the verification of the legality of the first setting IPMI instruction may also be implemented in the following manner:
[0060] The MAC addresses of the terminal devices held by each operation and maintenance personnel are pre-stored in the server. After receiving a communication message carrying the first set IPMI instruction sent by an external device, the server can obtain the source MAC address corresponding to the communication message, and compare the source MAC address with multiple MAC addresses pre-stored in the server one by one to determine whether the source MAC address is consistent with one of the multiple MAC addresses. If so, it can be determined that the first set IPMI instruction comes from the operation and maintenance personnel and the source is legal.
[0061] Step S120: Ignore any instruction received from the keyboard controller type interface KCS interface according to the first set IPMI instruction.
[0062] The server can receive the IPMI command sent by the external device and determine whether the IPMI command carries information indicating the start of in-band security control. If so, the server can ignore any command received from the KCS interface.
[0063] In a specific implementation, ignoring any instruction received from the keyboard controller interface KCS interface may be performed as follows:
[0064] The IPMI processing module in the BMC parses the received IPMI command data packet, obtains the interface type field corresponding to the interface from which the IPMI command data packet comes, and determines whether the interface from which the IPMI command data packet comes is a KCS interface based on the interface type field. If so, the IPMI command data packet is discarded.
[0065] Since ordinary users perform in-band management actions on the server by sending IPMI commands, the IPMI commands sent by ordinary users for in-band management actions will be received and executed by the BMC through the KCS interface. Therefore, ignoring any commands received from the KCS interface can avoid ordinary users' in-band management actions on the server, thereby reducing the risk of the server being operated by non-operation and maintenance personnel.
[0066] See also Figure 2 In a specific implementation, after step S120, the method may further include the following steps S130 to S140:
[0067] Step S130: receiving a second setting IPMI instruction sent by an external device, wherein the second setting IPMI instruction includes information indicating stopping in-band security management and control.
[0068] The second setting IPMI instruction may be an IPMI instruction corresponding to the first setting IPMI instruction, and the first setting IPMI instruction and the second setting IPMI instruction may be IPMI instructions of the same type but with different parameters.
[0069] Optionally, in a specific implementation manner, the validity of the second setting IPMI instruction is verified by:
[0070] The identity information corresponding to the second set IPMI instruction is pre-stored in the server. After receiving an IPMI instruction sent by an external device, the server can obtain the identity information of the IPMI instruction, and compare the identity information of the currently received IPMI instruction with the identity information of the second set IPMI instruction pre-stored in the server. If the two are consistent, it can be determined that the source of the currently received second set IPMI instruction is legal.
[0071] In another specific implementation manner, the verification of the legality of the second setting IPMI instruction may also be implemented in the following manner:
[0072] The MAC addresses of the terminal devices held by each operation and maintenance personnel are pre-stored in the server. After receiving a communication message carrying the second setting IPMI instruction sent by an external device, the server can obtain the source MAC address corresponding to the communication message, and compare the source MAC address with multiple MAC addresses pre-stored in the server one by one to determine whether the source MAC address is consistent with one of the multiple MAC addresses. If so, it can be further determined whether there is a first setting IPMI instruction from the same MAC address. If so, it can be determined that the source of the second setting IPMI instruction is legal.
[0073] Step S140: according to the second set IPMI instruction, stop ignoring the instructions received from the KCS interface.
[0074] After receiving the second IPMI setting instruction sent by the external device, the behavior of ignoring the instruction received from the KCS interface can also be stopped. The server can switch to ignore the instruction received from the KCS interface according to the first IPMI setting instruction and the second IPMI setting instruction, or stop ignoring the instruction received from the KCS interface. The above method can make the server in-band management more flexible.
[0075] In a specific implementation, after step S110, the method may further include: controlling the BMC to disable the upgrade function of the BMC firmware according to the first set IPMI instruction.
[0076] Without disabling the BMC firmware upgrade function, if non-operation and maintenance personnel upgrade the BMC firmware to a software version that does not support the above-mentioned in-band security control, the KCS interface can receive IPMI commands again. Therefore, controlling the BMC to disable the BMC firmware upgrade function can further reduce the risk of the server being operated by non-operation and maintenance personnel.
[0077] Optionally, disabling the BMC firmware upgrade function may specifically only disable upgrade methods without verification process, such as upgrading BMC firmware via PCIE, while BMC firmware upgrade methods with verification process, such as upgrading BMC firmware via network, may not be disabled.
[0078] Optionally, controlling the BMC to disable the upgrade function of the BMC firmware may be specifically implemented in the following manner:
[0079] The preset value of the target register in the BMC is rewritten from the first value to the second value, so that the BMC prohibits the software tool from upgrading the firmware of the BMC through the PCIE bus.
[0080] The target register may be the SCU_MISC_CONTROL register of the ASPEED 2500 chip, the preset value may be the four bits 25, 24, 23, and 22 of the SCU_MISC_CONTROL register, and the software tool may be socflash. Specifically, the four bits 25, 24, 23, and 22 of the SCU_MISC_CONTROL register of the ASPEED 2500 chip may be changed from 0 to 1.
[0081] Optionally, in another specific implementation manner, controlling the BMC to disable the upgrade function of the BMC firmware may be implemented in the following manner:
[0082] The first setting IPMI instruction may directly carry information indicating prohibition of upgrading the BMC firmware. After receiving the first setting IPMI instruction, the server parses the first setting IPMI instruction, obtains the information indicating prohibition of upgrading the BMC firmware, and executes the operation of prohibiting upgrading the BMC firmware.
[0083] After the step of controlling the BMC to disable the upgrade function of the BMC firmware according to the first set IPMI instruction, the method may further include the following steps S210 to S220:
[0084] Step S210, receiving a second setting IPMI instruction sent by an external device, wherein the second setting IPMI instruction includes information representing stopping in-band security control.
[0085] Step S220: according to the second set IPMI instruction, stop ignoring any instruction received from the KCS interface, and control the BMC to enable the upgrade function of the BMC firmware.
[0086] The server can also receive a second IPMI command sent by an external device that carries information indicating the stopping of in-band security control, and after receiving the second IPMI command, stop ignoring any command received from the KCS interface, and control the BMC to enable the previously disabled BMC firmware upgrade function. The server can switch the BMC firmware upgrade function on or off according to the first IPMI command and the second IPMI command. The above method can make the server in-band management more flexible.
[0087] Optionally, step S220 specifically includes the following steps: changing the preset value of the target register from the second value back to the first value, so that the BMC enables the software tool to upgrade the firmware of the BMC through the PCIE bus.
[0088] Specifically, the four bits 25, 24, 23, and 22 of the SCU_MISC_CONTROL register of the ASPEED 2500 chip can be changed from 1 to 0.
[0089] Optionally, in another specific implementation manner, controlling the BMC to enable the upgrade function of the BMC firmware may be implemented in the following manner:
[0090] The IPMI instruction may directly carry information indicating that the BMC firmware is allowed to be upgraded. After receiving the IPMI instruction, the server parses the IPMI instruction, obtains the information indicating that the BMC firmware is allowed to be upgraded, and executes an operation to allow the BMC firmware to be upgraded.
[0091] Optionally, see Figure 5 In a specific embodiment, the server in-band management method provided in the embodiment of the present application may specifically include the following steps S310 to S340:
[0092] Step S310: receiving a first IPMI setting instruction sent by an external device, wherein the first IPMI setting instruction includes information indicating starting in-band security control.
[0093] Step S320: according to the first set IPMI instruction, ignore any instruction received from the keyboard controller type interface KCS interface, and control the BMC to disable the upgrade function of the BMC firmware.
[0094] Optionally, after determining that the received IPMI instruction is the first setting IPMI instruction, the following two actions may be performed simultaneously: ignoring any instruction received from the keyboard controller type interface KCS interface according to the first setting IPMI instruction; and controlling the BMC to disable the upgrade function of the BMC firmware.
[0095] The command received from the KCS interface is ignored, and the upgrade function of the BMC firmware is disabled, so that unscrupulous users are prevented from bypassing the above-mentioned ignoring of the command received from the KCS interface by upgrading the BMC firmware, and in-band management can be implemented more comprehensively and perfectly.
[0096] Step S330: receiving a second IPMI setting instruction sent by an external device, wherein the second IPMI setting instruction includes information indicating stopping in-band security management and control.
[0097] Step S340: according to the second set IPMI instruction, stop ignoring any instruction received from the KCS interface, and control the BMC to enable the upgrade function of the BMC firmware.
[0098] After determining that the received IPMI instruction is the second set IPMI instruction, the following two actions can be performed simultaneously: stop ignoring any instructions received from the KCS interface; control the BMC to enable the upgrade function of the BMC firmware. Stopping ignoring the instructions received from the KCS interface and enabling the upgrade function of the BMC firmware can fully restore the original functions of the server.
[0099] See also Figure 5 , Figure 5 The server in-band management device provided in an embodiment of the present application is shown, and the device 400 includes:
[0100] The first instruction receiving module 410 is configured to receive a first setting intelligent platform management interface (IPMI) instruction sent by an external device, wherein the first setting IPMI instruction includes information indicating starting in-band security management and control.
[0101] The instruction ignoring module 420 is used to ignore any instruction received from the keyboard controller type interface KCS interface according to the first set IPMI instruction.
[0102] The first instruction receiving module 410 is specifically configured to receive a communication message including the first setting IPMI instruction through a network interface.
[0103] The device also includes:
[0104] The instruction verification module is used to verify the legality of the first setting IPMI instruction.
[0105] The upgrade function closing module is used to control the BMC to close the upgrade function of the BMC firmware according to the first set IPMI instruction. The upgrade function closing module is specifically used to rewrite the preset value of the target register in the BMC from the first value to the second value, so that the BMC prohibits the software tool from upgrading the BMC firmware through the PCIE bus.
[0106] The stop security control module is used to receive a second setting IPMI instruction sent by an external device, wherein the second setting IPMI instruction includes information indicating the stop of in-band security control.
[0107] The upgrade function enabling module is used to control the BMC to enable the upgrade function of the BMC firmware according to the second set IPMI instruction.
[0108] The upgrade function activation module is specifically used to change the preset value of the target register from the second value back to the first value, so that the BMC activates the function of the software tool to upgrade the firmware of the BMC through the PCIE bus.
[0109] The second instruction receiving module is used to receive a second setting IPMI instruction sent by an external device, wherein the second setting IPMI instruction includes information indicating stopping in-band security management and control.
[0110] The stop ignoring module is used to stop ignoring any instructions received from the KCS interface according to the second setting IPMI instruction.
[0111] The server in-band management device provided in the embodiment of the present application corresponds to the same as the server in-band management method provided above, and will not be described in detail here.
[0112] Figure 6 Schematic diagram of a block diagram of an electronic device is shown. The electronic device 500 may include a memory 510, a storage controller 520, a processor 530, a peripheral interface 540, and an input / output unit 550. A person skilled in the art may understand that Figure 6 The structure shown is only for illustration and does not limit the structure of the electronic device 500. For example, the electronic device 500 may also include Figure 6 More or fewer components as shown, or with Figure 6 Different configurations are shown.
[0113] The above-mentioned memory 510, storage controller 520, processor 530, peripheral interface 540, and input / output unit 550 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The above-mentioned processor 530 is used to execute the executable module stored in the memory.
[0114] The memory 510 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 510 is used to store programs, and the processor 530 executes the program after receiving the execution instruction. The method executed by the electronic device 500 defined by the process disclosed in any embodiment of the present application can be applied to the processor 530 or implemented by the processor 530.
[0115] The processor 530 may be an integrated circuit chip with signal processing capabilities. The processor 530 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0116] The above-mentioned peripheral interface 540 couples various input / output devices to the processor 530 and the memory 510. In some embodiments, the peripheral interface 540, the processor 530 and the memory controller 520 can be implemented in a single chip. In some other examples, they can be implemented by separate chips.
[0117] The input and output unit 550 is used to provide input data to the user. The input and output unit 550 can be, but is not limited to, a mouse and a keyboard.
[0118] The present application also provides a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are read and executed by a computer processor, the server in-band management method provided by the present application is executed. For example, the computer-readable storage medium can be implemented as Figure 6 The memory 510 in the electronic device 500.
[0119] The computer program product of the server in-band management method provided in the embodiment of the present application includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the server in-band management method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0120] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0121] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0122] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0123] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0124] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A server in-band management method, characterized in that: A baseboard management controller BMC applied to a server, the method comprising: The server receives a first setting intelligent platform management interface IPMI instruction sent by an external device, wherein the first setting IPMI instruction includes information indicating the start of in-band security control; Ignore any command received from the keyboard controller type interface KCS interface according to the first set IPMI command; After receiving the first IPMI setting instruction sent by the external device, the method further includes: controlling the BMC to disable the upgrade function of the BMC firmware according to the first IPMI setting instruction; The receiving of a first setting intelligent platform management interface IPMI instruction sent by an external device includes: receiving a communication message including the first setting IPMI instruction through a network interface; The step of ignoring any instruction received from the keyboard controller type interface KCS interface according to the first set IPMI instruction includes: the server determines whether the IPMI instruction sent by the external device carries the information representing the startup in-band security control, and if so, parses the received IPMI instruction data packet through the IPMI processing module in the BMC, obtains the interface type field corresponding to the interface from which the IPMI instruction data packet comes, and discards the IPMI instruction data packet when it is determined according to the interface type field that the interface from which the IPMI instruction data packet comes is the KCS interface; The controlling the BMC to disable the upgrade function of the BMC firmware according to the first set IPMI instruction includes: the server parsing the first set IPMI instruction, obtaining information indicating that the upgrade of the BMC firmware is prohibited, and executing an operation of prohibiting the upgrade of the BMC firmware.
2. The method according to claim 1, characterized in that After ignoring any instruction received from the keyboard controller type interface KCS interface according to the first setting IPMI instruction, the method further includes: Receiving a second setting IPMI instruction sent by an external device, wherein the second setting IPMI instruction includes information indicating stopping in-band security control; According to the second setting IPMI instruction, stop ignoring any instructions received from the KCS interface.
3. The method according to claim 1, characterized in that After controlling the BMC to disable the upgrade function of the BMC firmware according to the first set IPMI instruction, the method further includes: Receiving a second setting IPMI instruction sent by an external device, wherein the second setting IPMI instruction includes information indicating stopping in-band security control; According to the second set IPMI instruction, stop ignoring any instruction received from the KCS interface, and control the BMC to enable the upgrade function of the BMC firmware.
4. The method according to claim 1, characterized in that: After receiving the first setting IPMI instruction sent by the external device and before ignoring any instruction received from the keyboard controller type interface KCS interface according to the first setting IPMI instruction, the method further includes: The legality of the first setting IPMI instruction is verified.
5. A server in-band management device, characterized in that: A baseboard management controller BMC applied to a server, the device comprising: A first instruction receiving module is used to receive a first setting intelligent platform management interface IPMI instruction sent by an external device, wherein the first setting IPMI instruction includes information representing the start of in-band security control; An instruction ignoring module, used for ignoring any instruction received from the keyboard controller type interface KCS interface according to the first set IPMI instruction; An upgrade function closing module, used for controlling the BMC to close the upgrade function of the BMC firmware according to the first set IPMI instruction; The receiving of a first setting intelligent platform management interface IPMI instruction sent by an external device comprises: receiving a communication message including the first setting IPMI instruction through a network interface; The method of ignoring any instruction received from the keyboard controller type interface KCS interface according to the first set IPMI instruction includes: determining whether the IPMI instruction sent by the external device carries information representing the startup in-band security control, and if so, parsing the received IPMI instruction data packet through the IPMI processing module in the BMC, obtaining the interface type field corresponding to the interface from which the IPMI instruction data packet comes, and discarding the IPMI instruction data packet when it is determined according to the interface type field that the interface from which the IPMI instruction data packet comes is the KCS interface; The controlling the BMC to disable the upgrade function of the BMC firmware according to the first set IPMI instruction includes: parsing the first set IPMI instruction, obtaining information indicating that the upgrade of the BMC firmware is prohibited, and executing an operation of prohibiting the upgrade of the BMC firmware.
6. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of any one of the methods described in claims 1 to 4.
7. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are executed.
