History log of /openbmc/phosphor-host-ipmid/user_channel/channel_layer.cpp (Results 1 – 16 of 16)
Revision Date Author Comments
# 3771f5f2 02-Nov-2023 PavanKumarIntel <pavanx.kumar.martha@intel.com>

Fix the bugs found in static analysis

This commit fixes the following static analyzer reported issues:

Operands don't affect result
some conditions are not required to check as its always true

Fix the bugs found in static analysis

This commit fixes the following static analyzer reported issues:

Operands don't affect result
some conditions are not required to check as its always true
Unsigned compared against 0
Unchecked return value from library
Uninitialized scalar variable

Change-Id: I0b1fd426794bb88f6eafcc817cef5dd2f655e1ba
Signed-off-by: PavanKumarIntel <pavanx.kumar.martha@intel.com>

show more ...


# 11d68897 20-Jan-2022 Willy Tu <wltu@google.com>

cleanup: Remove all warning errors for the Meson build support

Remove all the build warning to prepare for the meson build.
Meson build will be in
https://gerrit.openbmc-project.xyz/c/openbmc/phosph

cleanup: Remove all warning errors for the Meson build support

Remove all the build warning to prepare for the meson build.
Meson build will be in
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/47748

Tested:
Ipmi command works fine the cleanup.
```
$ systemctl status phosphor-ipmi-host
● phosphor-ipmi-host.service - Phosphor Inband IPMI
Loaded: loaded (/lib/systemd/system/phosphor-ipmi-host.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 1970-01-08 21:20:56 UTC; 21s ago
Main PID: 24987 (ipmid)
CGroup: /system.slice/phosphor-ipmi-host.service
└─24987 /tmp/ipmid

Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X002B79], Cmd:[0X30] for Ethstats Commands
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X00C2CF], Cmd:[0X30] for Ethstats Commands
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X002B79], Cmd:[0X32] for Sys Commands
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X002B79], Cmd:[0X02] for I2C
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X00C2CF], Cmd:[0X02] for I2C
Jan 08 21:20:56 $HOST ipmid[24987]: I2C_WHITELIST_CHECK is disabled, do not populate whitelist
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X00C2CF], Cmd:[0X04] for Manual Zone Control
Jan 08 21:20:56 $HOST systemd[1]: Started Phosphor Inband IPMI.
Jan 08 21:20:56 $HOST ipmid[24987]: Loading whitelist filter
Jan 08 21:20:56 $HOST ipmid[24987]: Set restrictedMode = true
(reverse-i-search)`ipmi': systemctl status phosphor-^Cmi-host

$ ipmitool mc info
Device ID : 32
Device Revision : 1
Firmware Revision : 0.00
IPMI Version : 2.0
Manufacturer ID : 7244
Manufacturer Name : Quanta Computer Inc.
Product ID : 14426 (0x385a)
Product Name : Unknown (0x385A)
Device Available : yes
Provides Device SDRs : yes
Additional Device Support :
Sensor Device
SEL Device
FRU Inventory Device
Chassis Device
Aux Firmware Rev Info :
0x00
0x00
0x00
0x00
```

Change-Id: I372c9433a274bc633a24d213b7a1bc205531e33d
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 785223a6 10-Apr-2020 srikanta mondal <srikantax.mondal@intel.com>

Removal of OEM privilege setting for User

Issue: Set OEM user Privilege is success for Set user access command

Fix: Set user access - provided fix to deny set OEM user privilege

Removal of OEM privilege setting for User

Issue: Set OEM user Privilege is success for Set user access command

Fix: Set user access - provided fix to deny set OEM user privilege
for all channel.

Tested:
Before:
Command: ipmitool raw 0x06 0x43 0x93 0x07 0x05 0x00 // Set user access
Response: // Success

After:
Command: ipmitool raw 0x06 0x43 0x93 0x07 0x05 0x00 // Set user access
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x43 rsp=0xcc): Invalid data field in request

Signed-off-by: srikanta mondal <srikantax.mondal@intel.com>
Change-Id: Iec38bd15d087a34b2178b8b578dc599817b7e3d1

show more ...


# 0e2dbee2 26-Dec-2019 jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>

Fix for Callback privilege

Issue: Not returning proper error when user privilege is Callback

Returning proper error codes.

Tested:
Command: ipmitool raw 0x06 0x40 0x3

Fix for Callback privilege

Issue: Not returning proper error when user privilege is Callback

Returning proper error codes.

Tested:
Command: ipmitool raw 0x06 0x40 0x3 0x42 0x41 //SetChannelAccess
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x40 rsp=0xcc): Invalid data field in request
Command: ipmitool raw 0x06 0x40 0x3 0x42 0xc2 //SetChannelAccess
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x40 rsp=0x83): Unknown (0x83)
Command: ipmitool user priv 2 0x01 1
Response: IPMI command failed: Invalid data field in request
Set Privilege Level command failed (user 2)
Command: ipmitool raw 0x06 0x38 1 1 //Get Channel Auth Capabilities
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x38 rsp=0xcc): Invalid data field in request
Command: ipmitool raw 0x06 0x40 0x1 0x42 0x81 //SetChannelAccess
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x40 rsp=0xcc): Invalid data field in request
Command: ipmitool raw 0x06 0x43 0x1 2 1 0 //Set User Access Command
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x43 rsp=0xcc): Invalid data field in request
Command: ipmitool raw 0x06 0x43 0x2 1 2 0 //Set User Access Command
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x43 rsp=0xff): Unspecified error
Command: ipmitool raw 0x06 0x42 0x02 //Get Channel Info Command
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x42 rsp=0x82): Unknown (0x82)
Command: ipmitool raw 0x06 0x4E 0x02 //Get Channel Payload Support
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x4e rsp=0xff): Unspecified error
Command: ipmitool raw 0x06 0x4E 0x0F //Get Channel Payload Support
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x4e rsp=0xcc): Invalid data field in request
Command: ipmitool raw 0x06 0x4F 0x02 0x00 //Get Channel Payload Version
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x4f rsp=0xcc): Invalid data field in request
Command: ipmitool raw 0x06 0x4C 0x02 0x01 0x02 0x00 0x00 0x00
//Set User Payload Access
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x4c rsp=0xcc): Invalid data field in request
Command: ipmitool raw 0x06 0x44 0x02 0x02 //Get User Access Command
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x44 rsp=0xcc): Invalid data field in request
Command: ipmitool raw 0x06 0x44 0x01 0x11 //Get User Access Command
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x44 rsp=0xc9): Parameter out of range
Command: ipmitool raw 0x06 0x4D 0x02 0x02 //Get User Payload Access
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x4d rsp=0xcc): Invalid data field in request
Command: ipmitool raw 0x06 0x40 0x3 0x44 0x43
// set channel access for Non-volatile priv limit
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x40 rsp=0x83): Unknown (0x83)
Command: ipmitool raw 0x06 0x40 0x1 0x85 0x82
// set channel access for volatile priv limit
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x40 rsp=0x83): Unknown (0x83)

Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I4ff6fb5ae9a604e6b38fb92c249416605ec27cb5

show more ...


# e4e633ea 14-May-2019 Sumanth Bhat <sumanth.bhat@linux.intel.com>

Initialize Cipher Suite Privilege Levels cfg file

IPMI Spec 13.17 provides a way to pick a "highest level matching
proposed algorithms" during RMCPP Open Session Request, and effective

Initialize Cipher Suite Privilege Levels cfg file

IPMI Spec 13.17 provides a way to pick a "highest level matching
proposed algorithms" during RMCPP Open Session Request, and effective
privilege levels are decided taking Cipher Suite Privilege Levels into
account. This patch ships default Cipher Suite Privilege Levels file
from root filesystem. By default, admin privileges are
given to all Cipher Suites across all channels.

Tested:
1. By default, cs_privilege_levels.json is present in location
/usr/share/ipmi-providers/
Provided support from below patch.
https://gerrit.openbmc-project.xyz/#/c/openbmc/meta-phosphor/+/28923/
2. File data is as expected and persistent across reboots.
3. Manually deleted the json file while phosphor-ipmi-host was running
and rebooted and the file was re-created.

Change-Id: I526b8708f63659210768c77e8e19fa5a76df1f0d
Signed-off-by: Sumanth Bhat <sumanth.bhat@linux.intel.com>
Signed-off-by: vijayabharathix shetty <vijayabharathix.shetty@intel.com>

show more ...


# b541a5a5 18-Jul-2019 NITIN SHARMA <nitin1x.sharma@intel.com>

user_channel:Change fun ret&cmd cc as per New Std

Modified ipmi function return status code and
command completion codes as per new standard.

Tested:
verified using ipmitool

user_channel:Change fun ret&cmd cc as per New Std

Modified ipmi function return status code and
command completion codes as per new standard.

Tested:
verified using ipmitool commands.
1. create new user
Command : ipmitool user set name 5 user5
Response: //user created successfully
Command: ipmitool user set password 5 0penBmc\' //set password
Response: Set User Password command successful (user 5)

2. Set password
Command : ipmitool user set password 5 0penBmc\'
Response: Set User Password command successful (user 5)

3. set channel access
Command: ipmitool channel setaccess 1 5 callin=on ipmi=on link=on
privilege=4
Response: Set User Access (channel 1 id 5) successful.

4. get channel access
Command: ipmitool channel getaccess 1 5
Response:
Maximum User IDs : 15
Enabled User IDs : 5

User ID : 5
User Name : user5
Fixed Name : No
Access Available : call-in / callback
Link Authentication : enabled
IPMI Messaging : enabled
Privilege Level : ADMINISTRATOR
Enable Status : disabled

5. User list
Command: ipmitool user list 1
Response:
ID Name Callin Link Auth IPMI Msg Channel Priv Limit
1 root false true true ADMINISTRATOR
2 putty_operator true true true OPERATOR
3 ipmi_admin true true true ADMINISTRATOR
4 user2 false true true OPERATOR
5 user5 true true true ADMINISTRATOR
6 true false false NO ACCESS
7 true false false NO ACCESS
8 true false false NO ACCESS
9 true false false NO ACCESS
10 true false false NO ACCESS
11 true false false NO ACCESS
12 true false false NO ACCESS
13 true false false NO ACCESS
14 true false false NO ACCESS
15 true false false NO ACCESS

Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Signed-off-by: NITIN SHARMA <nitin1x.sharma@intel.com>
Change-Id: I5f2c32f50edc2de204ac361364e21a61a4bcf237

show more ...


# 0b979b61 15-May-2019 Vernon Mauery <vernon.mauery@linux.intel.com>

Remove unused function convertCurrentChannelNum(uint8_t)

convertCurrentChannelNum(uint8_t) was deprecated in favor of an
actual working implementation. It was stubbed out for a while to

Remove unused function convertCurrentChannelNum(uint8_t)

convertCurrentChannelNum(uint8_t) was deprecated in favor of an
actual working implementation. It was stubbed out for a while to
provide a broken, backwards-compatible interface, but now that all
of those have been removed in favor of the new interface that
actually works: convertCurrentChannelNum(uint8_t, uint8_t), the
old function can be removed.

Tested: Builds without any errors (means the old interface was removed)

Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Change-Id: I3796e890c7cc34333116b71a97db268abf5f0e89

show more ...


# 6fd812d1 12-Apr-2019 Ayushi Smriti <smriti.ayushi@intel.com>

Add get channel payload version command

Implement get channel payload version command (IPMI specification
section 24.9). As per the specification, this command is basically a
hard-co

Add get channel payload version command

Implement get channel payload version command (IPMI specification
section 24.9). As per the specification, this command is basically a
hard-coded value that says we are using IPMI 2.0.

Tested:
ipmitool raw 6 0x4F 3 1 // Command
10 // Response

Change-Id: Id16723e7257361814b98f3c14d759f2919ad4c03
Signed-off-by: Ayushi Smriti <smriti.ayushi@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# 735ee953 15-Feb-2019 Vernon Mauery <vernon.mauery@linux.intel.com>

look up channel from D-Bus connection

With a single IPMI execution queue and multiple bridges, it is important
for the queue to be able to map the incoming D-Bus message to a channel.

look up channel from D-Bus connection

With a single IPMI execution queue and multiple bridges, it is important
for the queue to be able to map the incoming D-Bus message to a channel.
Each bridge should request a well-known name of the form
"xyz.openbmc_project.Ipmi.Channel.<name>" where name is the name field
in the /usr/share/ipmi-providers/channel_config.json file.

The mapping is done by registering a name change listener on D-Bus and
then doing some name lookups via the D-Bus interface to match well-known
names to unique names. Then, each incoming messages comes from a
unique-named sender and can be resolved to which channel it came from.

For now, any unmapped channels will show up as INTRABMC, which is not
ideal, but should not break things until the bridges can be converted to
the correct name and D-Bus API.

Tested-by: run ipmid, start and stop bridges named
xyz.openbmc_project.Ipmi.Channel.<NAME> and see the messages
show that a new channel has been mapped. Then, with commands
that use the ipmi::Context, the correct channel shows up.

Change-Id: I3e6bbfbf2e068020e07eeafe64eb09d70c03dc65
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# 55768e35 02-Mar-2019 Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

Cleanup: Get rid of duplicate getChannelName()

Get rid of duplicate getChannelName function. Use
the one with uint8_t channelNum.

Tested-by:
1. Verified RMCP+ session establ

Cleanup: Get rid of duplicate getChannelName()

Get rid of duplicate getChannelName function. Use
the one with uint8_t channelNum.

Tested-by:
1. Verified RMCP+ session establishement works with newly
created user

Change-Id: Iac22ec665ece97d4f9471cfb40220b472bdf01e8
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

show more ...


# 74a2102e 13-Dec-2018 Johnathan Mantey <johnathanx.mantey@intel.com>

IPMI channel to NIC device mapping modified within JSON config file

The IPMI to NIC channel mapping was done using a hard coded scheme.
The scheme used generic channel names which were t

IPMI channel to NIC device mapping modified within JSON config file

The IPMI to NIC channel mapping was done using a hard coded scheme.
The scheme used generic channel names which were then mapped to
specific device names. The hard coded generic to specific naming
convention is removed, and the JSON file contains the device name
directly.

Change-Id: Ibc6821cae5a26f2666467aba5346d364053f2582
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>

show more ...


# 73906b9c 04-Jan-2019 Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

Use network interface name as channel name

Use network interface name as channel name for the LAN
channels. Mapper related to convert IPMI LAN reference to
network interface is not n

Use network interface name as channel name

Use network interface name as channel name for the LAN
channels. Mapper related to convert IPMI LAN reference to
network interface is not needed anymore, and the same has been
removed.

Unit-test:
verified ipmitool channel info for channel 1 & 2 and made sure
it works fine as expected.

Change-Id: Id87e2924a2a21a846507d6378b1b615000280f06
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

show more ...


# 58317120 28-Nov-2018 Vernon Mauery <vernon.mauery@linux.intel.com>

ipmid: channel: add max transfer size property

Each channel can have a different maximum transfer size. This should be
exposed so that it is easier to tell how many bytes it is possible

ipmid: channel: add max transfer size property

Each channel can have a different maximum transfer size. This should be
exposed so that it is easier to tell how many bytes it is possible to
send or receive on a given channel.

Change-Id: Ie277eb7a802edc1deeefe201a7560d371920f519
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# a39208e0 08-Dec-2018 Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

Add self channel number conversion function

Support for self channel number conversion added. This will
be used by IPMI commands like GetUserAccess, GetChannelInfo etc.
to query the

Add self channel number conversion function

Support for self channel number conversion added. This will
be used by IPMI commands like GetUserAccess, GetChannelInfo etc.
to query the details for the channel in which the command is
requested. Self channel number 0xE will be converted to proper
channel number by this function

Unit-Test:
Performed that commands received through ipmid channel are marked
as channel 0xF and through netipmid as 0x1, when channel number
0xE is used

Change-Id: I53820558faf4439d9909d52e4e98d71c38e714b4
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

show more ...


# a45cb34f 03-Dec-2018 Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

Update const uint8_t& to const uint8_t

Update const uint8_t& to const uint8_t usage. Passing by reference
for small types are costly than passing it by value and hence the
change is

Update const uint8_t& to const uint8_t

Update const uint8_t& to const uint8_t usage. Passing by reference
for small types are costly than passing it by value and hence the
change is done

Unit-Test
1. Performed build and verified regular user account creation
and RMCP+ login

Change-Id: Ic2dd76795749148f82564677dde2a5db08520454
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

show more ...


# 071f3f2f 24-May-2018 AppaRao Puli <apparao.puli@intel.com>

IPMI Channel commands implementation

IPMI Channel commands implemenation - squashed

commit e9a75d8dd6e89d17381f0310c7930586c6b79996
Author: AppaRao Puli <apparao.puli@intel.com>

IPMI Channel commands implementation

IPMI Channel commands implemenation - squashed

commit e9a75d8dd6e89d17381f0310c7930586c6b79996
Author: AppaRao Puli <apparao.puli@intel.com>
Date: Thu Jul 5 14:47:22 2018 +0530

Channel layer separation

De-coupling the channel management from ipmi channel commands
implementation. This gives flexibility to load only needed
stuff in different modules(host-ipmi or netipmid)

Change-Id: Ib334562beb9325f7768ed6a15475cae15af17b19
Signed-off-by: AppaRao Puli <apparao.puli@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

commit 726ddf2af678ea6773f4b4b918fbd49be8c83e6a
Author: AppaRao Puli <apparao.puli@intel.com>
Date: Thu May 24 16:45:30 2018 +0530

IPMI Channel commands implementation

Following IPMI channel commands are implemented.
1) Set channel access (0x40)
2) Get channel access (0x41)
3) Get channel info (0x42)

Also added code supported for LAN configuration parameters
1) Authentication Type Support (selector #1)
2) Authentication Type Enables (selector #2)

Change-Id: Ic4156378c7756eca383dc3da52114fd119346ca6
Signed-off-by: AppaRao Puli <apparao.puli@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

Change-Id: Ic4156378c7756eca383dc3da52114fd119346ca6
Signed-off-by: AppaRao Puli <apparao.puli@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

show more ...