-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a clean rebase with no changes needed in the downstream patches. Signed-off-by: Sergio Lopez <[email protected]>
- Loading branch information
Showing
25 changed files
with
99 additions
and
137 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 6616593252269d81b003d7aa1e7e4dd156d1a629 Mon Sep 17 00:00:00 2001 | ||
From 1a74153dbecfd3ef07450282623e19e3eff07e02 Mon Sep 17 00:00:00 2001 | ||
From: Sergio Lopez <[email protected]> | ||
Date: Fri, 10 Sep 2021 13:05:01 +0200 | ||
Subject: [PATCH 1/4] virtio: enable DMA API if memory is restricted | ||
|
@@ -54,5 +54,5 @@ index 80669e05bf0e..438b4f6c5cdb 100644 | |
/* | ||
* In theory, it's possible to have a buggy QEMU-supposed | ||
-- | ||
2.46.0 | ||
2.45.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From ecbb6d5db802293ef27575a672336e17e8c2abfd Mon Sep 17 00:00:00 2001 | ||
From d207d9d626b491547cc79ad561f8b937230260d8 Mon Sep 17 00:00:00 2001 | ||
From: Sergio Lopez <[email protected]> | ||
Date: Thu, 20 Oct 2022 10:23:16 +0200 | ||
Subject: [PATCH 2/4] x86/sev: write AP reset vector | ||
|
@@ -55,5 +55,5 @@ index 9905dc0e0b09..38df85fd1324 100644 | |
/* Check if AP Jump Table is page-aligned */ | ||
if (jump_table_addr & ~PAGE_MASK) | ||
-- | ||
2.46.0 | ||
2.45.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 0738c09d916b06afa162facb0edc84ffe121c35a Mon Sep 17 00:00:00 2001 | ||
From 8f8bd55d6eeae2329d28e61815f930b990f7e40f Mon Sep 17 00:00:00 2001 | ||
From: Sergio Lopez <[email protected]> | ||
Date: Wed, 3 Aug 2022 12:35:12 +0200 | ||
Subject: [PATCH 3/4] Implement driver to retrieve secrets from cmdline | ||
|
@@ -292,5 +292,5 @@ index c787e94cc898..2fb8a8af9af6 100644 | |
|
||
/* | ||
-- | ||
2.46.0 | ||
2.45.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 95ae01ac9240b47dcdeda540e59a24ba0bdaf963 Mon Sep 17 00:00:00 2001 | ||
From 7d1316354c1f9cdab71270e3785ed17c6166e48e Mon Sep 17 00:00:00 2001 | ||
From: Sergio Lopez <[email protected]> | ||
Date: Wed, 5 Jun 2024 16:20:08 +0200 | ||
Subject: [PATCH 4/4] x86/sev: Avoid using native_cpuid | ||
|
@@ -61,5 +61,5 @@ index cc47a818a640..a2b5b08eee23 100644 | |
/* Check the SEV MSR whether SEV or SME is enabled */ | ||
RIP_REL_REF(sev_status) = msr = __rdmsr(MSR_AMD64_SEV); | ||
-- | ||
2.46.0 | ||
2.45.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 7f18f75689b7b0f34ca711daa4e29e2d4ae5f910 Mon Sep 17 00:00:00 2001 | ||
From 1b10ce0f3957352710d9218761ef30b306f44d2b Mon Sep 17 00:00:00 2001 | ||
From: Sergio Lopez <[email protected]> | ||
Date: Thu, 2 Mar 2023 07:34:49 +0100 | ||
Subject: [PATCH 01/17] krunfw: Don't panic when init dies | ||
Subject: [PATCH 01/20] krunfw: Don't panic when init dies | ||
|
||
In libkrun, the isolated process runs as PID 1. When it exits, | ||
trigger an orderly reboot instead of panic'ing. | ||
|
@@ -58,5 +58,5 @@ index 6ebef11c8876..4323caa5b871 100644 | |
machine_restart(cmd); | ||
} | ||
-- | ||
2.46.0 | ||
2.45.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 5ed6edb3e75df34958f788bca363748cea75eea1 Mon Sep 17 00:00:00 2001 | ||
From 6b799d0ece7be4526086389f499ba128e58402f2 Mon Sep 17 00:00:00 2001 | ||
From: Sergio Lopez <[email protected]> | ||
Date: Mon, 16 May 2022 16:04:27 +0200 | ||
Subject: [PATCH 02/17] krunfw: Ignore run_cmd on orderly reboot | ||
Subject: [PATCH 02/20] krunfw: Ignore run_cmd on orderly reboot | ||
|
||
We don't really support restarting the conventional way, so ignore | ||
"run_cmd" so we can fall back to an emergency sync and reboot. | ||
|
@@ -28,5 +28,5 @@ index 4323caa5b871..d9d6f0dd2ebc 100644 | |
if (ret) { | ||
pr_warn("Failed to start orderly reboot: forcing the issue\n"); | ||
-- | ||
2.46.0 | ||
2.45.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
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
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From aacd77363c0f5c8515f9ef55889cd367d42d06f9 Mon Sep 17 00:00:00 2001 | ||
From 2133d4c828f49f49a1f74428680f6ad717d84e47 Mon Sep 17 00:00:00 2001 | ||
From: Jiang Wang <[email protected]> | ||
Date: Sat, 10 Jun 2023 00:58:35 +0000 | ||
Subject: [PATCH 09/17] tests: add vsock dgram tests | ||
Subject: [PATCH 09/20] tests: add vsock dgram tests | ||
|
||
This patch adds tests for vsock datagram. | ||
|
||
|
@@ -667,5 +667,5 @@ index 5dc7767039f6..7c66e934341a 100644 | |
{}, | ||
}; | ||
-- | ||
2.46.0 | ||
2.45.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From b4ce449d32a4a9c71041052c1e4599f3a01eccfa Mon Sep 17 00:00:00 2001 | ||
From 2cfe7358a0ab882db5f2ae65853f8b30429e8532 Mon Sep 17 00:00:00 2001 | ||
From: Sergio Lopez <[email protected]> | ||
Date: Thu, 19 May 2022 22:38:26 +0200 | ||
Subject: [PATCH 10/21] Transparent Socket Impersonation implementation | ||
Subject: [PATCH 10/20] Transparent Socket Impersonation implementation | ||
|
||
Transparent Socket Impersonation (AF_TSI) is an address family that | ||
provides sockets presenting two simultaneous personalities, AF_INET | ||
|
@@ -22,17 +22,15 @@ TODO - implement remote [get|set]sockopt | |
|
||
Signed-off-by: Sergio Lopez <[email protected]> | ||
--- | ||
include/linux/socket.h | 4 +- | ||
net/Kconfig | 1 + | ||
net/Makefile | 1 + | ||
net/socket.c | 1 + | ||
net/tsi/Kconfig | 7 + | ||
net/tsi/Makefile | 4 + | ||
net/tsi/af_tsi.c | 1280 +++++++++++++++++++++++++++ | ||
net/tsi/af_tsi.h | 100 +++ | ||
security/selinux/hooks.c | 4 +- | ||
security/selinux/include/classmap.h | 4 +- | ||
10 files changed, 1403 insertions(+), 3 deletions(-) | ||
include/linux/socket.h | 4 +- | ||
net/Kconfig | 1 + | ||
net/Makefile | 1 + | ||
net/socket.c | 1 + | ||
net/tsi/Kconfig | 7 + | ||
net/tsi/Makefile | 4 + | ||
net/tsi/af_tsi.c | 1280 ++++++++++++++++++++++++++++++++++++++++ | ||
net/tsi/af_tsi.h | 100 ++++ | ||
8 files changed, 1397 insertions(+), 1 deletion(-) | ||
create mode 100644 net/tsi/Kconfig | ||
create mode 100644 net/tsi/Makefile | ||
create mode 100644 net/tsi/af_tsi.c | ||
|
@@ -83,7 +81,7 @@ index 4c4dc535453d..b07f65c0ef56 100644 | |
obj-$(CONFIG_NET_HANDSHAKE) += handshake/ | ||
+obj-$(CONFIG_TSI) += tsi/ | ||
diff --git a/net/socket.c b/net/socket.c | ||
index 9db33cd4a71b..8b92dd098235 100644 | ||
index bad58f23f307..9992976a67ff 100644 | ||
--- a/net/socket.c | ||
+++ b/net/socket.c | ||
@@ -218,6 +218,7 @@ static const char * const pf_family_names[] = { | ||
|
@@ -1509,42 +1507,6 @@ index 000000000000..cf381734bebe | |
+} __attribute__((packed)); | ||
+ | ||
+#endif | ||
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c | ||
index d4a99d98ec77..82fd1f975ef6 100644 | ||
--- a/security/selinux/hooks.c | ||
+++ b/security/selinux/hooks.c | ||
@@ -1295,7 +1295,9 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc | ||
return SECCLASS_XDP_SOCKET; | ||
case PF_MCTP: | ||
return SECCLASS_MCTP_SOCKET; | ||
-#if PF_MAX > 46 | ||
+ case PF_TSI: | ||
+ return SECCLASS_TSI_SOCKET; | ||
+#if PF_MAX > 47 | ||
#error New address family defined, please update this function. | ||
#endif | ||
} | ||
diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h | ||
index a3c380775d41..4640eb408c06 100644 | ||
--- a/security/selinux/include/classmap.h | ||
+++ b/security/selinux/include/classmap.h | ||
@@ -248,6 +248,8 @@ const struct security_class_mapping secclass_map[] = { | ||
{ COMMON_SOCK_PERMS, NULL } }, | ||
{ "mctp_socket", | ||
{ COMMON_SOCK_PERMS, NULL } }, | ||
+ { "tsi_socket", | ||
+ { COMMON_SOCK_PERMS, NULL } }, | ||
{ "perf_event", | ||
{ "open", "cpu", "kernel", "tracepoint", "read", "write", NULL } }, | ||
{ "anon_inode", | ||
@@ -259,6 +261,6 @@ const struct security_class_mapping secclass_map[] = { | ||
{ NULL } | ||
}; | ||
|
||
-#if PF_MAX > 46 | ||
+#if PF_MAX > 47 | ||
#error New address family defined, please update secclass_map. | ||
#endif | ||
-- | ||
2.45.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 38643ecb3d75f3c156249b6488b76ef608e990cb Mon Sep 17 00:00:00 2001 | ||
From 26705fda00730b304024546aae7307a306547f2d Mon Sep 17 00:00:00 2001 | ||
From: Sergio Lopez <[email protected]> | ||
Date: Thu, 19 May 2022 22:42:01 +0200 | ||
Subject: [PATCH 11/17] tsi: allow hijacking sockets (tsi_hijack) | ||
Subject: [PATCH 11/20] tsi: allow hijacking sockets (tsi_hijack) | ||
|
||
Add a kernel command line option (tsi_hijack) enabling users to | ||
request the kernel to hijack AF_INET(SOCK_STREAM || SOCK_DGRAM) | ||
|
@@ -14,7 +14,7 @@ Signed-off-by: Sergio Lopez <[email protected]> | |
2 files changed, 18 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/net/socket.c b/net/socket.c | ||
index 8b92dd098235..ab2bd178bcc7 100644 | ||
index 9992976a67ff..2a928d25f282 100644 | ||
--- a/net/socket.c | ||
+++ b/net/socket.c | ||
@@ -115,6 +115,10 @@ unsigned int sysctl_net_busy_read __read_mostly; | ||
|
@@ -69,5 +69,5 @@ index eda6c4ba7961..6cf01d7ce8f5 100644 | |
int err; | ||
|
||
-- | ||
2.46.0 | ||
2.45.2 | ||
|
Oops, something went wrong.