Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Make enarx-keepldr compile again #388

Merged
merged 5 commits into from
Jul 1, 2021
Merged

Conversation

haraldh
Copy link
Contributor

@haraldh haraldh commented May 3, 2021

error: invalid register rbx: rbx is used internally by LLVM and
cannot be used as an operand for inline asm

See:
rust-lang/rust#84658 (comment)

and:
https://github.com/rust-lang/rust/pull/84658/files#diff-d7283132d97a993fad4e2d491ac883dbce4e17fe248cdf37fa3f9334e2a5a115

Signed-off-by: Harald Hoyer <harald@redhat.com>
@haraldh haraldh requested a review from npmccallum as a code owner May 3, 2021 09:46
@enarxbot enarxbot requested review from ueno and lkatalin May 3, 2021 09:46
@haraldh haraldh changed the title fix(sev): do not use rbx register in asm!() do not use rbx register in asm!() Jul 1, 2021
error: invalid register rbx: rbx is used internally by LLVM and
cannot be used as an operand for inline asm

So, we pull in a newer `sgx` crate version, which has this fixed.

See:
rust-lang/rust#84658 (comment)

and:
https://github.com/rust-lang/rust/pull/84658/files#diff-d7283132d97a993fad4e2d491ac883dbce4e17fe248cdf37fa3f9334e2a5a115

Signed-off-by: Harald Hoyer <harald@redhat.com>
haraldh added 2 commits July 1, 2021 12:04
update Cargo.lock for new version of compiler-builtins

Signed-off-by: Harald Hoyer <harald@redhat.com>
`tss.interrupt_stack_table`: error: reference to packed field is unaligned

Signed-off-by: Harald Hoyer <harald@redhat.com>
@haraldh haraldh changed the title do not use rbx register in asm!() Make enarx-keepldr compile again Jul 1, 2021
```
error: this expression borrows a reference (`&[u8]`) that is immediately dereferenced by the compiler
   --> src/handler.rs:470:53
    |
470 |         let (c, shim_nonce_ptr) = c.copy_from_slice(&report_bytes).or(Err(libc::EMSGSIZE))?;
    |                                                     ^^^^^^^^^^^^^ help: change this to: `report_bytes`
    |
```

```
error: this expression borrows a reference (`&[u8]`) that is immediately dereferenced by the compiler
   --> src/backend/sgx/attestation.rs:258:29
    |
258 |     out_buf.copy_from_slice(&quote);
    |                             ^^^^^^ help: change this to: `quote`
    |
```

Signed-off-by: Harald Hoyer <harald@redhat.com>
@npmccallum npmccallum merged commit dfd3df3 into enarx-archive:master Jul 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants