cae58415 | 15-Jul-2025 |
Bagas Sanjaya <bagasdotme@gmail.com> |
Documentation: ioctl-number: Don't repeat macro names
Don't repeat mentioning macro names (_IO, _IOW, _IOR, and _IOWR) to keep the wording effective.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.
Documentation: ioctl-number: Don't repeat macro names
Don't repeat mentioning macro names (_IO, _IOW, _IOR, and _IOWR) to keep the wording effective.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250715024258.16882-3-bagasdotme@gmail.com
show more ...
|
67ffcabd | 15-Jul-2025 |
Bagas Sanjaya <bagasdotme@gmail.com> |
Documentation: ioctl-number: Shorten macros table
The macros table has three columns: the second one is "an" and the third one writes "an ioctl with ... parameters". Simplify the table by adding hea
Documentation: ioctl-number: Shorten macros table
The macros table has three columns: the second one is "an" and the third one writes "an ioctl with ... parameters". Simplify the table by adding heading row that indicates macro name and accepted parameters.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250715024258.16882-2-bagasdotme@gmail.com
show more ...
|
44bdcff5 | 14-Jul-2025 |
Bagas Sanjaya <bagasdotme@gmail.com> |
Documentation: ioctl-number: Correct full path to papr-physical-attestation.h
Commit 03c9d1a5a30d93 ("Documentation: Fix description format for powerpc RTAS ioctls") fixes Sphinx warning by chopping
Documentation: ioctl-number: Correct full path to papr-physical-attestation.h
Commit 03c9d1a5a30d93 ("Documentation: Fix description format for powerpc RTAS ioctls") fixes Sphinx warning by chopping arch/ path component of papr-physical-attestation.h to fit existing "Include File" column. Now that the column has been widened just enough for that header file, add back its arch/ path component.
Reviewed-by: Haren Myneni <haren@linux.ibm.com> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250714015711.14525-4-bagasdotme@gmail.com
show more ...
|
15afd5de | 14-Jul-2025 |
Bagas Sanjaya <bagasdotme@gmail.com> |
Documentation: ioctl-number: Extend "Include File" column width
Extend width of "Include File" column to fit full path to papr-physical-attestation.h in later commit.
Reviewed-by: Haren Myneni <har
Documentation: ioctl-number: Extend "Include File" column width
Extend width of "Include File" column to fit full path to papr-physical-attestation.h in later commit.
Reviewed-by: Haren Myneni <haren@linux.ibm.com> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250714015711.14525-3-bagasdotme@gmail.com
show more ...
|
86900ab6 | 17-Apr-2025 |
Haren Myneni <haren@linux.ibm.com> |
powerpc/pseries: Add a char driver for physical-attestation RTAS
The RTAS call ibm,physical-attestation is used to retrieve information about the trusted boot state of the firmware and hypervisor on
powerpc/pseries: Add a char driver for physical-attestation RTAS
The RTAS call ibm,physical-attestation is used to retrieve information about the trusted boot state of the firmware and hypervisor on the system, and also Trusted Platform Modules (TPM) data if the system is TCG 2.0 compliant.
This RTAS interface expects the caller to define different command structs such as RetrieveTPMLog, RetrievePlatformCertificat and etc, in a work area with a maximum size of 4K bytes and the response buffer will be returned in the same work area.
The current implementation of this RTAS function is in the user space but allocation of the work area is restricted with the system lockdown. So this patch implements this RTAS function in the kernel and expose to the user space with open/ioctl/read interfaces.
PAPR (2.13+ 21.3 ibm,physical-attestation) defines RTAS function: - Pass the command struct to obtain the response buffer for the specific command. - This RTAS function is sequence RTAS call and has to issue RTAS call multiple times to get the complete response buffer (max 64K). The hypervisor expects the first RTAS call with the sequence 1 and the subsequent calls with the sequence number returned from the previous calls.
Expose these interfaces to user space with a /dev/papr-physical-attestation character device using the following programming model:
int devfd = open("/dev/papr-physical-attestation"); int fd = ioctl(devfd, PAPR_PHY_ATTEST_IOC_HANDLE, struct papr_phy_attest_io_block); - The user space defines the command struct and requests the response for any command. - Obtain the complete response buffer and returned the buffer as blob to the command specific FD. size = read(fd, buf, len); - Can retrieve the response buffer once or multiple times until the end of BLOB buffer.
Implemented this new kernel ABI support in librtas library for system lockdown
Signed-off-by: Haren Myneni <haren@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20250416225743.596462-8-haren@linux.ibm.com
show more ...
|
8aa9efc0 | 17-Apr-2025 |
Haren Myneni <haren@linux.ibm.com> |
powerpc/pseries: Add papr-platform-dump character driver for dump retrieval
ibm,platform-dump RTAS call in combination with writable mapping /dev/mem is issued to collect platform dump from the hype
powerpc/pseries: Add papr-platform-dump character driver for dump retrieval
ibm,platform-dump RTAS call in combination with writable mapping /dev/mem is issued to collect platform dump from the hypervisor and may need multiple calls to get the complete dump. The current implementation uses rtas_platform_dump() API provided by librtas library to issue these RTAS calls. But /dev/mem access by the user space is prohibited under system lockdown.
The solution should be to restrict access to RTAS function in user space and provide kernel interfaces to collect dump. This patch adds papr-platform-dump character driver and expose standard interfaces such as open / ioctl/ read to user space in ways that are compatible with lockdown.
PAPR (7.3.3.4.1 ibm,platform-dump) provides a method to obtain the complete dump: - Each dump will be identified by ID called dump tag. - A sequence of RTAS calls have to be issued until retrieve the complete dump. The hypervisor expects the first RTAS call with the sequence 0 and the subsequent calls with the sequence number returned from the previous calls. - The hypervisor returns "dump complete" status once the complete dump is retrieved. But expects one more RTAS call from the partition with the NULL buffer to invalidate dump which means the dump will be removed in the hypervisor. - Sequence of calls are allowed with different dump IDs at the same time but not with the same dump ID.
Expose these interfaces to user space with a /dev/papr-platform-dump character device using the following programming model:
int devfd = open("/dev/papr-platform-dump", O_RDONLY); int fd = ioctl(devfd,PAPR_PLATFORM_DUMP_IOC_CREATE_HANDLE, &dump_id) - Restrict user space to access with the same dump ID. Typically we do not expect user space requests the dump again for the same dump ID. char *buf = malloc(size); length = read(fd, buf, size); - size should be minimum 1K based on PAPR and <= 4K based on RTAS work area size. It will be restrict to RTAS work area size. Using 4K work area based on the current implementation in librtas library - Each read call issue RTAS call to get the data based on the size requirement and returns bytes returned from the hypervisor - If the previous call returns dump complete status, the next read returns 0 like EOF. ret = ioctl(PAPR_PLATFORM_DUMP_IOC_INVALIDATE, &dump_id) - RTAS call with NULL buffer to invalidates the dump.
The read API should use the file descriptor obtained from ioctl based on dump ID so that gets dump contents for the corresponding dump ID. Implemented support in librtas (rtas_platform_dump()) for this new ABI to support system lockdown.
Signed-off-by: Haren Myneni <haren@linux.ibm.com> Tested-by: Sathvika Vasireddy <sv@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20250416225743.596462-7-haren@linux.ibm.com
show more ...
|
2e3fcbcc | 27-Mar-2025 |
Linus Torvalds <torvalds@linux-foundation.org> |
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley: "Updates to the usual drivers (scsi_debug, ufs, lpfc, st, fnic, mpi3mr, mp
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley: "Updates to the usual drivers (scsi_debug, ufs, lpfc, st, fnic, mpi3mr, mpt3sas) and the removal of cxlflash.
The only non-trivial core change is an addition to unit attention handling to recognize UAs for power on/reset and new media so the tape driver can use it"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (107 commits) scsi: st: Tighten the page format heuristics with MODE SELECT scsi: st: ERASE does not change tape location scsi: st: Fix array overflow in st_setup() scsi: target: tcm_loop: Fix wrong abort tag scsi: lpfc: Restore clearing of NLP_UNREG_INP in ndlp->nlp_flag scsi: hisi_sas: Fixed failure to issue vendor specific commands scsi: fnic: Remove unnecessary NUL-terminations scsi: fnic: Remove redundant flush_workqueue() calls scsi: core: Use a switch statement when attaching VPD pages scsi: ufs: renesas: Add initialization code for R-Car S4-8 ES1.2 scsi: ufs: renesas: Add reusable functions scsi: ufs: renesas: Refactor 0x10ad/0x10af PHY settings scsi: ufs: renesas: Remove register control helper function scsi: ufs: renesas: Add register read to remove save/set/restore scsi: ufs: renesas: Replace init data by init code scsi: ufs: dt-bindings: renesas,ufs: Add calibration data scsi: mpi3mr: Task Abort EH Support scsi: storvsc: Don't report the host packet status as the hv status scsi: isci: Make most module parameters static scsi: megaraid_sas: Make most module parameters static ...
show more ...
|