Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s390x: add zVM Secure IPL support #1338

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

nikita-dubrovskii
Copy link
Contributor

Implements proposal from: coreos/enhancements#10

@nikita-dubrovskii nikita-dubrovskii force-pushed the zvm_secure_ipl branch 4 times, most recently from 5567618 to 2739de2 Compare November 17, 2023 13:17
docs/cmd/install.md Outdated Show resolved Hide resolved
src/s390x/zipl.rs Outdated Show resolved Hide resolved
src/s390x/zipl.rs Outdated Show resolved Hide resolved
systemd/coreos-installer-reboot-loaddev.service Outdated Show resolved Hide resolved
@nikita-dubrovskii nikita-dubrovskii changed the title WIP: s390x: add zVM Secure IPL support s390x: add zVM Secure IPL support Nov 20, 2023
@nikita-dubrovskii nikita-dubrovskii force-pushed the zvm_secure_ipl branch 2 times, most recently from 838be73 to f9e2bf6 Compare November 20, 2023 15:12
@nikita-dubrovskii nikita-dubrovskii force-pushed the zvm_secure_ipl branch 2 times, most recently from ca33d36 to 7fc8eeb Compare November 23, 2023 09:47
systemd/coreos-installer-reboot-loaddev.service Outdated Show resolved Hide resolved
src/s390x/zipl.rs Show resolved Hide resolved
@nikita-dubrovskii nikita-dubrovskii force-pushed the zvm_secure_ipl branch 4 times, most recently from 0238bbc to 38d3ca0 Compare November 24, 2023 14:46
docs/release-notes.md Outdated Show resolved Hide resolved
src/s390x/zipl.rs Show resolved Hide resolved
src/s390x/zipl.rs Outdated Show resolved Hide resolved
systemd/coreos-installer-reboot-loaddev.service Outdated Show resolved Hide resolved
systemd/coreos-installer-reboot-loaddev.service Outdated Show resolved Hide resolved
systemd/coreos-installer-reboot-loaddev.service Outdated Show resolved Hide resolved
@nikita-dubrovskii nikita-dubrovskii force-pushed the zvm_secure_ipl branch 2 times, most recently from 7e2ed26 to dc4b19d Compare December 4, 2023 14:50
Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments but LGTM as is too.

systemd/coreos-installer-secure-ipl-reboot.service Outdated Show resolved Hide resolved
@jlebon jlebon merged commit d9d2c49 into coreos:main Dec 6, 2023
14 checks passed
Comment on lines +43 to +52
fn parse_lszdev_eckd(line: &str) -> Result<Loaddev> {
// ECKD ID looks like: 0.0.5223, we need only last part of it (5223)
lazy_static! {
static ref REGEX: Regex = Regex::new(r#"[[:digit:]].[[:digit:]].([[:xdigit:]]+)"#).unwrap();
}
if let Some(cap) = REGEX.captures_iter(line).next() {
return Ok(Loaddev::Eckd(cap[1].to_string()));
}
bail!("bad ECKD id: {}", line);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obviously totally fine, but just noting I think it's a one-liner to parse this without regexps:

line.split('.').nth(2).ok_or_else(|| anyhow!("Bad EKCD")).map(|s| Loaddev::Eckd(s.to_string()))

or so. (Though validation is looser)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, the reason to use regex here was to validate format of ID, which probably not that necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants