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

Migrate to linux 6.12.12 #2339

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft

Conversation

const-t
Copy link
Contributor

@const-t const-t commented Feb 7, 2025

No description provided.

@const-t const-t force-pushed the kt-1808-migrate-to-linux-6.12.12 branch from 768f9fd to 3a9e4c5 Compare February 10, 2025 11:10
@const-t const-t force-pushed the kt-1808-migrate-to-linux-6.12.12 branch 3 times, most recently from 0870cb8 to 039668c Compare February 19, 2025 15:07
sk_alloc()->cgroup_sk_alloc() now inits default cgroup.
@const-t const-t force-pushed the kt-1808-migrate-to-linux-6.12.12 branch 8 times, most recently from e7509fa to 3bc39cb Compare February 20, 2025 14:49
kingluo and others added 10 commits February 20, 2025 16:53
Problems:

1. In the new kernel, assembly functions uniformly return from
   `__x86_return_thunk`. However, our assembly code uses the original
   `ret` instruction, so objtool in the kernel will notice this is a naked
   return during compilation.

2. `SYM_FUNC_START` in the new kernel will add endbr64 to the head of
   the assembly function, and all indirect jumps to ENDBR instructions,
   that is, the code snippet within the same function, will fail, but we
   use jump tables in the assembly function to perform indirect jumps. It
   will raise CET exception:
   https://en.wikipedia.org/wiki/X86_instruction_listings#Added_with_Intel_CET).

Solutions:

1. Substitute the `ret` with `RET`, a macro in the new kernel to
   ensure the correct return.

2. Use endbr64 in the begining of each switch label
If `CONFIG_FORTIFY_SOURCE` is set and memset or memcpy
is applied to flexible array, inside one of these
functions will be called `__builtin_object_size()`
that can't determine size of the flexible array that
leads to compile time error.
@const-t const-t force-pushed the kt-1808-migrate-to-linux-6.12.12 branch 2 times, most recently from 75d2108 to 11e6f6c Compare February 20, 2025 15:06
-Wempty-body
-Wold-style-declaration

The code like so doesn't compile -Wempty-body, becuase
if `T_DBG3` macro is empty, it leades to empty `if`
statement.
```
if (...) {
	T_DBG3(...);
```
 -tfw_ctlfn_state_io - Changed prototype to match new
  prototype of proc_handler.
 -tfw_sysctl_tbl removed empty struct.
 -Flexible arrays declared using `DECLARE_FLEX_ARRAY`.
Added explicit in-place version of `tfw_cstrtolower()`
with suitable prototype. This is required to be able
to do conversion in-place when it safe (@src == @DesT).

if overlapped memory will be passed to, `tfw_cstrtolower()`
copiler gives an error.
Removed unnecessary `__restrict`, that hasn't effect
on the function. Also `tbl` and `it` might points to
the same structure and this is legal and used in
`tfw_hpack_set_rbuf_size()`
Sleepable function must not be called in softIRQ. Use
arch specific random number generator by default.
Few patches ago we changed our `ttls_time` macro to use
`ktime_get_seconds()` instead of real seconds, it
fits our needs, because our session storage is alive
until reboot and suspension is not expected. However
`x509_get_current_time()` wants to get real time, thus
use `ktime_get_real_seconds()` in this case.
@const-t const-t force-pushed the kt-1808-migrate-to-linux-6.12.12 branch from 11e6f6c to cba4791 Compare February 20, 2025 15:09
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.

2 participants