forked from riscv/riscv-cfi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request riscv#210 from kbroch-rivosinc/update-to-latest-do…
…c-template update to latest cfg from docs-spec-template
- Loading branch information
Showing
21 changed files
with
267 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- uses: pre-commit/action@v3.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
|
||
/build/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-json | ||
- id: check-symlinks | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
|
||
- repo: local | ||
hooks: | ||
- id: forbidden-file-extensions | ||
name: forbidden-file-extensions | ||
entry: disallow these file extensions | ||
language: fail | ||
# Disallow other asciidoc extensions except .adoc | ||
files: .*\.(asciidoc|asc)$ | ||
|
||
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt | ||
rev: 0.2.3 | ||
hooks: | ||
- id: yamlfmt | ||
args: [--mapping, '2', --sequence, '4', --offset, '2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Governance | ||
|
||
This project for the template specification is governed by the TBD | ||
|
||
The group can be joined by RISC-V members at: TBD | ||
|
||
Mailing list archives are available at: TBD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Maintainers | ||
|
||
This project is maintained by the following people: | ||
|
||
- Maintainer1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
= RISC-V CFI specification | ||
|
||
This document is capturing discussions at the Shadow Stacks and Landing Pads TG and attempts | ||
to document the baseline. This is not official specification and everything in this document | ||
may change. Control-flow Integrity (CFI) provides CPU instruction set architecture (ISA) | ||
capabilities to defend against Return-Oriented Programming (ROP) and Call/Jump-Oriented | ||
Programming (COP/JOP) style control-flow subversion attacks. | ||
|
||
To enforce backward edge control-flow integrity, the extension introduces a shadow stack. To | ||
enforce forward edge control-flow integrity, the extension introduces labeled landing pad | ||
instructions. | ||
|
||
== License | ||
|
||
This work is licensed under a Creative Commons Attribution 4.0 International License (CC-BY-4.0). For details, see the link:LICENSE[LICENSE] file. | ||
|
||
== Maintainers | ||
|
||
The list of maintainers of this specification is maintained in the link:MAINTAINERS.md[MAINTAINERS] file. | ||
|
||
== Contributors | ||
|
||
The list of contributors to this specification is maintained in the link:src/contributors.adoc[contributors] file. | ||
|
||
For guidelines on how to contribute, refer to the link:CONTRIBUTING.md[CONTRIBUTING] file. | ||
|
||
== Governance | ||
|
||
The governance for this project is defined in the link:GOVERNANCE.md[GOVERNANCE] file. | ||
|
||
Community information, including meeting (if held) and mailing lists are detailed in this file. | ||
|
||
== Building the Document | ||
|
||
=== Directory Structure | ||
|
||
The following directories are used to organize the contents of this repo: | ||
|
||
* `dependencies/`: software dependencies needed to build the specification | ||
* `docs-resources/`: resources for all specifications sourced from link:.gitmodules[git submodule] | ||
* `src/`: source files for the specification | ||
* `build/`: default directory where the build artifacts are generated | ||
|
||
=== Prerequisites | ||
|
||
To build the document, you'll need the following tools installed on your system: | ||
|
||
* Make | ||
* asciiDoctor-pdf, asciidoctor-bibtex, asciidoctor-diagram, and asciidoctor-mathematical | ||
* Docker | ||
|
||
=== Cloning the Repository | ||
|
||
```shell | ||
git clone --recurse-submodules https://github.com/riscv/riscv-cfi.git | ||
``` | ||
|
||
=== Building the Documentation | ||
|
||
To start the build process, run: | ||
|
||
```shell | ||
cd ./riscv-cfi && make build | ||
``` | ||
|
||
The link:Makefile[] script will check the availability of Docker on your system: | ||
|
||
* If Docker is available, the documentation will be built inside a Docker container using the image riscvintl/riscv-docs-base-container-image:latest. This ensures a consistent build environment across different systems. | ||
* If Docker is not available, the documentation will be built directly on your system using the installed tools. | ||
|
||
The documentation is generated from the AsciiDoctor source files in your project. The primary source file is specified by the `HEADER_SOURCE` variable in the Makefile. | ||
|
||
The build process utilizes several options, including theming and font settings, and generates a PDF document as output. | ||
|
||
=== Cleaning up | ||
|
||
To clean up the generated files, run: | ||
|
||
```shell | ||
make clean | ||
``` | ||
|
||
== Enabling pre-commit checks locally | ||
|
||
The repository has some basic commit checks set up with https://pre-commit.com/[pre-commit] that will be enforced by the GitHub CI. | ||
To ensure these checks are also run in the local repository while making changes the following can be done: | ||
|
||
.Installing pre-commit tool | ||
[source,shell] | ||
---- | ||
# Do once on your system | ||
pip3 install pre-commit | ||
---- | ||
|
||
.Installing pre-commit git hook in repo | ||
[source,shell] | ||
---- | ||
# Do once in local repo | ||
pre-commit install | ||
---- | ||
|
||
Rather than doing the above `pre-commit install` in every repo that uses it, you can do it https://pre-commit.com/#automatically-enabling-pre-commit-on-repositories[once on your system.] | ||
|
||
When enabling additional checks https://pre-commit.com/#plugins[by editing .pre-commit-config.yaml], it is recommended running the newly added check on all files in the repository. This can be done with the following command: | ||
|
||
.Running all pre-commit hooks on all files | ||
[source,shell] | ||
---- | ||
pre-commit run --all-files | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
Dependencies for the build environment for various package managers. Used in | ||
`.github/workflows/`. | ||
|
Submodule docs-resources
updated
9 files
+15 −0 | .github/workflows/pre-commit.yml | |
+18 −0 | .pre-commit-config.yaml | |
+1 −2 | LICENSE | |
+194 −1 | README.md | |
+1 −1 | fonts/OFL-M.txt | |
+1 −1 | fonts/OFL-P.txt | |
+1 −1 | fonts/OFL1.txt | |
+ − | images/risc-v_logo.png | |
+74 −57 | themes/riscv-pdf.yml |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.