Revision Date Author Comments
# 8f3f94da 09-May-2024 Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

OpenPOWER: Replace Password with UserChallenge

This commit replaces the 'Password' field with 'UserChallenge' in the
Resource dump implementation of xyz.openbmc_project.Dump.Entry.Resource
interface

OpenPOWER: Replace Password with UserChallenge

This commit replaces the 'Password' field with 'UserChallenge' in the
Resource dump implementation of xyz.openbmc_project.Dump.Entry.Resource
interface.

The 'UserChallenge' is used to verify user authorization against an
Access Control List provided through PLDM. This ensures that dump
requests are processed only if the user-challenge is validated
successfully.

Test:
Successfully built with p10bmc

Change-Id: I1896c4645d1329e47556b8d75fff8cb6aae45945
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

show more ...


# 05ef8163 22-Nov-2022 Lei YU <yulei.sh@bytedance.com>

Correct the timing of emit_object_added

The deletion of the dump objects emits InterfacesRemoved signal, but the
interfaces removed in the signal does not contain the interfaces defined
in the base

Correct the timing of emit_object_added

The deletion of the dump objects emits InterfacesRemoved signal, but the
interfaces removed in the signal does not contain the interfaces defined
in the base class phosphor::dump::Entry:
```
xyz.openbmc_project.Common.OriginatedBy
xyz.openbmc_project.Common.Progress
xyz.openbmc_project.Dump.Entry
xyz.openbmc_project.Object.Delete
xyz.openbmc_project.Time.EpochTime
```

This results in the mapper still keeping the objects even if the object
is removed from DBus, and it becomes inconsistent between the DBus
objects and mapper.

Adjust the inheritance sequence, so that in destruction,
emit_object_removed() is called when all the interfaces are there, so
that all the interfaces could be included in the signal.

Without this change, the destructor sequence is (Taking BMCEntry as
example):
1. phosphor::dump::Entry is destructed, no signal is emitted;
2. phosphor::dump::bmc::EntryIfaces is destructed, signal is emitted,
but at this time, only the interfaces implemented by
phosphor::dump::bmc::EntryIfaces is included, which is the root cause of
the problem.

With the change, the destructor sequence is:
1. phosphor::dump::bmc::EntryIfaces is destructed, signal is emitted,
and all the interfaces are included in the signal;
2. phosphor::dump::Entry is destructed, no signal is emitted.

So all the interfaces implemented by BMCEntry is included in the
InterfacesRemoved signal, and thus the issue is fixed.

Tested: Before this change:
1. Create a dump, say /xyz/openbmc_project/dump/bmc/entry/2
2. Delete it
3. Mapper still list the above object although it does not
really exist.
With this fix, verify the above issue is fixed.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I76710fa9b8d23344cf979bd8f3bdcc331e663264

show more ...


# 64f8da9e 08-Dec-2021 Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

Implement GetFileHandle in dump entry interface

Certain applications need to offload the dump in various
ways, for example, performing DMA transfer of the dump to
the host memory. These applications

Implement GetFileHandle in dump entry interface

Certain applications need to offload the dump in various
ways, for example, performing DMA transfer of the dump to
the host memory. These applications require direct access
to the file to read from the BMC storage.

This commit introduces the GetFileHandle method in the
dump entry interface. This method provides direct access
to the Unix file handle of the dump entry, facilitating
more direct read operations on the dump file.
The returned file descriptor is read-only, which ensures
the integrity of the dump file.

The definition of the file handle is moved from the
specific 'bmc_dump_entry' class to the parent 'dump_entry'
class. This allows all dump types inheriting from
'dump_entry' to use this new method, thus increasing
its utility across various dump types.

The introduction of this method primarily benefits PLDM
for offloading the dump to the host, and bmcweb for
offloading the dump to Redfish clients. By providing
a file handle instead of exposing the file path,
it resolves potential access issues for applications
running in non-root contexts.

Test:
Created a dump and made sure it reached host
successfully
Executed with additional traces
Jun 21 10:56:09 pldmd[1856]: Requesting file handle
Jun 21 10:56:09 pldmd[1856]: File handle received fd=9
Jun 21 10:56:09 pldmd[1856]: Transfer data rc= 0
Jun 21 10:56:09 phosphor-dump-manager[480]: File handle \
request
Jun 21 10:56:09 phosphor-dump-manager[480]: returning fd=11
Jun 21 10:56:09 pldmd[1856]: File handle received fd=9
Jun 21 10:56:09 pldmd[1856]: File read rc=15

In th host:
Service Processor Dump:
Maximum file size: 0 (0x00000000) bytes (0 MBs)
Dumps this PHYP IPL: 1
Pending Dump:
Dump ID: 00000009
File size: 3749662 \
(0x000000000039371E) bytes (3 MBs)
SP dump sub type: 0x000000000000000F BMC
File name: \
BMCDUMP.1392A20.00000009.20230621105510
Dump create time: 06/21/2023 10:55:10.00
PHYP notify time: 06/21/2023 10:56:00.5918570000
LP recipient: 1
LP notify time: 06/21/2023 10:56:00.5918580000

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: If398940b655b4d90688273f0c76a20d4ead61992

show more ...


# 16eafec0 14-Feb-2023 Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

OpenPOWER: Remove duplicate OriginatedBy interface

The OriginatedBy interface is added to the base entry
class but again added to resource and system dump entries
which is causing issue while starti

OpenPOWER: Remove duplicate OriginatedBy interface

The OriginatedBy interface is added to the base entry
class but again added to resource and system dump entries
which is causing issue while starting the service.

Change-Id: I936dbccf9a7a2d26595cceea48daa4c67278c999
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

show more ...


# 74a1f39c 27-Oct-2021 Asmitha Karunanithi <asmitk01@in.ibm.com>

Implement OriginatedBy interface in dump entry dbus obj

This new interface "OriginatedBy" will be implemented
by all the dump entry dbus objects. It contains a property
"OriginatorId" which stores t

Implement OriginatedBy interface in dump entry dbus obj

This new interface "OriginatedBy" will be implemented
by all the dump entry dbus objects. It contains a property
"OriginatorId" which stores the unique id of the user that
has initiated the dump. The unique id in this case is a string
that contains the ip address of the client that initiated
the dump.

The dbus interface change for the same is at:
[1] https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/47057

Tested By:

[1] busctl call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/bmc xyz.openbmc_project.Dump.Create CreateDump a{sv} 2 "xyz.openbmc_project.Dump.Create.CreateParameters.OriginatorId" s "<unique-id>" "xyz.openbmc_project.Dump.Create.CreateParameters.OriginatorType" s "xyz.openbmc_project.Common.OriginatedBy.OriginatorTypes.Client" o "/xyz/openbmc_project/dump/bmc/entry/2"

[2] busctl --verbose call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/resource xyz.openbmc_project.Dump.Create CreateDump a{sv} 4 "com.ibm.Dump.Create.CreateParameters.VSPString" s "vsp" "com.ibm.Dump.Create.CreateParameters.Password" s "password" "com.ibm.Dump.Create.CreateParameters.OriginatorId" s "<unique-id>" "xyz.openbmc_project.Dump.Create.CreateParameters.OriginatorType" s "xyz.openbmc_project.Common.OriginatedBy.OriginatorTypes.Client"
MESSAGE "o" {
OBJECT_PATH "/xyz/openbmc_project/dump/resource/entry/1";
};

[3] busctl call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/system xyz.openbmc_project.Dump.Create CreateDump a{sv} 2 "com.ibm.Dump.Create.CreateParameters.OriginatorId" s "<unique-id>" "xyz.openbmc_project.Dump.Create.CreateParameters.OriginatorType" s "xyz.openbmc_project.Common.OriginatedBy.OriginatorTypes.Client" o "/xyz/openbmc_project/dump/system/entry/1"

Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I23c9f769fd39cd84e042d6effbb3d71c7af4e889

show more ...


# 9b18bf2d 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I7ae6214461bdf45c1a21fb702cc8bf5578d827c6

show more ...


# 73f64076 01-Apr-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: object: don't use 'bool' argument constructor

`sdbusplus::server::object_t` has long had an enum-based parameter for
signal action, but maintained a backwards compatible boolean mapping.

sdbusplus: object: don't use 'bool' argument constructor

`sdbusplus::server::object_t` has long had an enum-based parameter for
signal action, but maintained a backwards compatible boolean mapping.
It is time to remove this boolean to make it more observable which
actions are being used in applications. Map all `true` occurrences to
`action::defer_emit` or `action::emit_no_signals` as appropriate.

- DumpEntry: emit_no_signals (secondary object)
- {bmc,resource,system}::DumpEntry: defer_emit (primary object)
- Manager: defer_emit (primary object)

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I91990031384230550903a46332adc04d691a3cb9

show more ...


# 97c15686 02-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

cleanup sdbus CAMELCASE define

The transition from 4bc1c2be9a74e5d7651e1438ad32c6afe6e81244 is
complete so clean up the old defines.

Signed-off-by: Patrick Williams <patrick@stw

cleanup sdbus CAMELCASE define

The transition from 4bc1c2be9a74e5d7651e1438ad32c6afe6e81244 is
complete so clean up the old defines.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I85cde2d7a6962a3858cd24ea6d510cf8e0429ade

show more ...


# 4bc1c2be 10-May-2021 Patrick Williams <patrick@stwcx.xyz>

use new sdbus++ camelcase

Change I17a8d7479556596a3cf252b3f4eae9c8df547189 will change
how sdbus++ generates names which start with an acronym.
Prepare for this by keying off the SDB

use new sdbus++ camelcase

Change I17a8d7479556596a3cf252b3f4eae9c8df547189 will change
how sdbus++ generates names which start with an acronym.
Prepare for this by keying off the SDBUSPP_NEW_CAMELCASE
define to use the new format.

Changes:
vSPString -> vspString

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Idec24c3e2d58abca39fe236051f28567b626e260

show more ...


# 0af74a5e 08-Apr-2021 Jayanth Othayoth <ojayanth@in.ibm.com>

Update clang-format

Update to the latest OpenBMC clang-format.

Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Change-Id: I54010d3c756af4c85786285644038d449730612b


# 3fc6df48 08-Apr-2021 Jayanth Othayoth <ojayanth@in.ibm.com>

c++17: drop experimental::filesystem

Use the real filesystem library, and drop support for building with
experimental under c++14.

Signed-off-by: Jayanth Othayoth <ojayanth@in.i

c++17: drop experimental::filesystem

Use the real filesystem library, and drop support for building with
experimental under c++14.

Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Change-Id: I730c0d6dce53b5e0aa0867cddb7f325cdb9b45fc

show more ...


# 4c63ce5e 18-Dec-2020 Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

Add support for resource dump delete.

Add support for deleting resource dumps in host memory.
Change requestDelete to accept dump type.
Update system dump delete to pass dump type.

Add support for resource dump delete.

Add support for deleting resource dumps in host memory.
Change requestDelete to accept dump type.
Update system dump delete to pass dump type.

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I8dcf85a2b38da15ff8451003c11232e340c4ca89

show more ...


# 2f8e276c 11-Feb-2021 Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

Move emit_object_added to respective dump entry classes

The emit_object_added was added in the base entry class so
all information was not present in the InterfaceAdded.
In the below

Move emit_object_added to respective dump entry classes

The emit_object_added was added in the base entry class so
all information was not present in the InterfaceAdded.
In the below example the VSP String and password are null
To fix this moved emit_object_added to derived classes
so InterfaceAdded signal will come only after the creation
of complete object.
Without fix:
Sender=:1.41 Path=/xyz/openbmc_project/dump Interface=org.freedesktop.DBus.ObjectManager Member=InterfacesAdded
UniqueName=:1.41
MESSAGE "oa{sa{sv}}" {
OBJECT_PATH "/xyz/openbmc_project/dump/resource/entry/1";
ARRAY "{sa{sv}}" {
DICT_ENTRY "sa{sv}" {
STRING "org.freedesktop.DBus.Peer";
ARRAY "{sv}" {
};
};
DICT_ENTRY "sa{sv}" {
STRING "org.freedesktop.DBus.Introspectable";
ARRAY "{sv}" {
};
};
DICT_ENTRY "sa{sv}" {
STRING "org.freedesktop.DBus.Properties";
ARRAY "{sv}" {
};
};
DICT_ENTRY "sa{sv}" {
STRING "xyz.openbmc_project.Time.EpochTime";
ARRAY "{sv}" {
DICT_ENTRY "sv" {
STRING "Elapsed";
VARIANT "t" {
UINT64 0;
};
};
};
};
DICT_ENTRY "sa{sv}" {
STRING "xyz.openbmc_project.Object.Delete";
ARRAY "{sv}" {
};
};
DICT_ENTRY "sa{sv}" {
STRING "xyz.openbmc_project.Dump.Entry";
ARRAY "{sv}" {
DICT_ENTRY "sv" {
STRING "Size";
VARIANT "t" {
UINT64 0;
};
};
DICT_ENTRY "sv" {
STRING "Offloaded";
VARIANT "b" {
BOOLEAN false;
};
};
DICT_ENTRY "sv" {
STRING "OffloadUri";
VARIANT "s" {
STRING "";
};
};
};
};
DICT_ENTRY "sa{sv}" {
STRING "xyz.openbmc_project.Common.Progress";
ARRAY "{sv}" {
DICT_ENTRY "sv" {
STRING "Status";
VARIANT "s" {
STRING "xyz.openbmc_project.Common.Progress.OperationStatus.InProgress";
};
};
DICT_ENTRY "sv" {
STRING "StartTime";
VARIANT "t" {
UINT64 1612968832;
};
};
DICT_ENTRY "sv" {
STRING "CompletedTime";
VARIANT "t" {
UINT64 0;
};
};
};
};
DICT_ENTRY "sa{sv}" {
STRING "com.ibm.Dump.Entry.Resource";
ARRAY "{sv}" {
DICT_ENTRY "sv" {
STRING "SourceDumpId";
VARIANT "u" {
UINT32 0;
};
};
DICT_ENTRY "sv" {
STRING "VSPString";
VARIANT "s" {
STRING "";
};
};
DICT_ENTRY "sv" {
STRING "Password";
VARIANT "s" {
STRING "";
};
};
};
};
};
};
With Fix:
Type=signal Endian=l Flags=1 Version=1 Cookie=68
Sender=:1.286 Path=/xyz/openbmc_project/dump Interface=org.freedesktop.DBus.ObjectManager Member=InterfacesAdded
UniqueName=:1.286
MESSAGE "oa{sa{sv}}" {
OBJECT_PATH "/xyz/openbmc_project/dump/resource/entry/4";
ARRAY "{sa{sv}}" {
DICT_ENTRY "sa{sv}" {
STRING "org.freedesktop.DBus.Peer";
ARRAY "{sv}" {
};
};
DICT_ENTRY "sa{sv}" {
STRING "org.freedesktop.DBus.Introspectable";
ARRAY "{sv}" {
};
};
DICT_ENTRY "sa{sv}" {
STRING "org.freedesktop.DBus.Properties";
ARRAY "{sv}" {
};
};
DICT_ENTRY "sa{sv}" {
STRING "xyz.openbmc_project.Time.EpochTime";
ARRAY "{sv}" {
DICT_ENTRY "sv" {
STRING "Elapsed";
VARIANT "t" {
UINT64 0;
};
};
};
};
DICT_ENTRY "sa{sv}" {
STRING "xyz.openbmc_project.Object.Delete";
ARRAY "{sv}" {
};
};
DICT_ENTRY "sa{sv}" {
STRING "xyz.openbmc_project.Dump.Entry";
ARRAY "{sv}" {
DICT_ENTRY "sv" {
STRING "Size";
VARIANT "t" {
UINT64 0;
};
};
DICT_ENTRY "sv" {
STRING "Offloaded";
VARIANT "b" {
BOOLEAN false;
};
};
DICT_ENTRY "sv" {
STRING "OffloadUri";
VARIANT "s" {
STRING "";
};
};
};
};
DICT_ENTRY "sa{sv}" {
STRING "xyz.openbmc_project.Common.Progress";
ARRAY "{sv}" {
DICT_ENTRY "sv" {
STRING "Status";
VARIANT "s" {
STRING "xyz.openbmc_project.Common.Progress.OperationStatus.InProgress";
};
};
DICT_ENTRY "sv" {
STRING "StartTime";
VARIANT "t" {
UINT64 1612972013;
};
};
DICT_ENTRY "sv" {
STRING "CompletedTime";
VARIANT "t" {
UINT64 0;
};
};
};
};
DICT_ENTRY "sa{sv}" {
STRING "com.ibm.Dump.Entry.Resource";
ARRAY "{sv}" {
DICT_ENTRY "sv" {
STRING "SourceDumpId";
VARIANT "u" {
UINT32 4294967295;
};
};
DICT_ENTRY "sv" {
STRING "VSPString";
VARIANT "s" {
STRING "vsp";
};
};
DICT_ENTRY "sv" {
STRING "Password";
VARIANT "s" {
STRING "pass0";
};
};
};
};
};
};

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I7c5a42bf1df9b38ad4cd086571c34dbef62da1b4

show more ...


# 341d683d 15-Jan-2021 Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

Change the the namespace of OpenPOWER dumps.

Change the namespace of OpenPOWER dumps to openpower
instead of phosphor.

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm

Change the the namespace of OpenPOWER dumps.

Change the namespace of OpenPOWER dumps to openpower
instead of phosphor.

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I0b99da60cb19f3cf559ce40c971b3ba6f4888238

show more ...


# 62337a92 22-Nov-2020 Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

Add Resource dump support

To build use option -Dhost-transport=pldm and
-Dopenpower-dumps-extension=enabled
Add support for resource dump operations like
creation and offloading.

Add Resource dump support

To build use option -Dhost-transport=pldm and
-Dopenpower-dumps-extension=enabled
Add support for resource dump operations like
creation and offloading.
Tests:(Dump manager tests)
Created dump entry.
Faked notify to check whether progress is turning to completed.

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: Ifeec5670a7806d7ee1b572158b4fff7dc14729a6

show more ...