forked from torvalds/linux
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
rust/Kconfig: disable Rust support if CONFIG_MODVERSIONS=y #379
Merged
ojeda
merged 1 commit into
Rust-for-Linux:rust
from
TheSven73:rust-for-linux-modversions
Jun 14, 2021
Merged
rust/Kconfig: disable Rust support if CONFIG_MODVERSIONS=y #379
ojeda
merged 1 commit into
Rust-for-Linux:rust
from
TheSven73:rust-for-linux-modversions
Jun 14, 2021
Conversation
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
In recent weeks, there have been a few reports of Rust build errors for defconfigs which have CONFIG_MODVERSIONS=y. See torvalds#378 for example. According to torvalds#59, Rust-for-Linux currently doesn't support MODVERSIONS. To prevent confusion and build errors in the future, disable Rust support if CONFIG_MODVERSIONS=y. Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
Review of
|
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this pull request
Jan 11, 2023
Currently modversion uses a fixed size array of size (64 - sizeof(long)) to store symbol names, thus placing a hard limit on length of symbols. Rust symbols (which encodes crate and module names) can be quite a bit longer. The length limit in kallsyms is increased to 512 for this reason. It's a waste of space to simply expand the fixed array size to 512 in modversion info entries. I therefore make it variably sized, with offset to the next entry indicated by the initial "next" field. In addition to supporting longer-than-56/60 byte symbols, this patch also reduce the size for short symbols by getting rid of excessive 0 paddings. There are still some zero paddings to ensure "next" and "crc" fields are properly aligned. This patch does have a tiny drawback that it makes ".mod.c" files generated a bit less easy to read, as code like "\x08\x00\x00\x00\x78\x56\x34\x12" "symbol\0\0" is generated as opposed to { 0x12345678, "symbol" }, because the structure is now variable-length. But hopefully nobody reads the generated file :) Link: b8a94bf ("kallsyms: increase maximum kernel symbol length to 512") Link: Rust-for-Linux#379 Signed-off-by: Gary Guo <gary@garyguo.net>
tobhe
pushed a commit
to UbuntuAsahi/linux
that referenced
this pull request
May 15, 2023
BugLink: https://bugs.launchpad.net/bugs/2007654 Currently modversion uses a fixed size array of size (64 - sizeof(long)) to store symbol names, thus placing a hard limit on length of symbols. Rust symbols (which encodes crate and module names) can be quite a bit longer. The length limit in kallsyms is increased to 512 for this reason. It's a waste of space to simply expand the fixed array size to 512 in modversion info entries. I therefore make it variably sized, with offset to the next entry indicated by the initial "next" field. In addition to supporting longer-than-56/60 byte symbols, this patch also reduce the size for short symbols by getting rid of excessive 0 paddings. There are still some zero paddings to ensure "next" and "crc" fields are properly aligned. This patch does have a tiny drawback that it makes ".mod.c" files generated a bit less easy to read, as code like "\x08\x00\x00\x00\x78\x56\x34\x12" "symbol\0\0" is generated as opposed to { 0x12345678, "symbol" }, because the structure is now variable-length. But hopefully nobody reads the generated file :) Link: b8a94bf ("kallsyms: increase maximum kernel symbol length to 512") Link: Rust-for-Linux#379 Signed-off-by: Gary Guo <gary@garyguo.net> (backported from https://lore.kernel.org/lkml/20230111161155.1349375-1-gary@garyguo.net/) [ fix build error on s390x: always use a variable with TO_NATIVE() ] [ add dummy NULL entry at the end of the modversion array ] Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
tobhe
pushed a commit
to UbuntuAsahi/linux
that referenced
this pull request
Jun 12, 2023
BugLink: https://bugs.launchpad.net/bugs/2007654 Currently modversion uses a fixed size array of size (64 - sizeof(long)) to store symbol names, thus placing a hard limit on length of symbols. Rust symbols (which encodes crate and module names) can be quite a bit longer. The length limit in kallsyms is increased to 512 for this reason. It's a waste of space to simply expand the fixed array size to 512 in modversion info entries. I therefore make it variably sized, with offset to the next entry indicated by the initial "next" field. In addition to supporting longer-than-56/60 byte symbols, this patch also reduce the size for short symbols by getting rid of excessive 0 paddings. There are still some zero paddings to ensure "next" and "crc" fields are properly aligned. This patch does have a tiny drawback that it makes ".mod.c" files generated a bit less easy to read, as code like "\x08\x00\x00\x00\x78\x56\x34\x12" "symbol\0\0" is generated as opposed to { 0x12345678, "symbol" }, because the structure is now variable-length. But hopefully nobody reads the generated file :) Link: b8a94bf ("kallsyms: increase maximum kernel symbol length to 512") Link: Rust-for-Linux#379 Signed-off-by: Gary Guo <gary@garyguo.net> (backported from https://lore.kernel.org/lkml/20230111161155.1349375-1-gary@garyguo.net/) [ fix build error on s390x: always use a variable with TO_NATIVE() ] [ add dummy NULL entry at the end of the modversion array ] Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Joshua-Riek
pushed a commit
to Joshua-Riek/linux
that referenced
this pull request
Oct 24, 2023
BugLink: https://bugs.launchpad.net/bugs/2007654 Currently modversion uses a fixed size array of size (64 - sizeof(long)) to store symbol names, thus placing a hard limit on length of symbols. Rust symbols (which encodes crate and module names) can be quite a bit longer. The length limit in kallsyms is increased to 512 for this reason. It's a waste of space to simply expand the fixed array size to 512 in modversion info entries. I therefore make it variably sized, with offset to the next entry indicated by the initial "next" field. In addition to supporting longer-than-56/60 byte symbols, this patch also reduce the size for short symbols by getting rid of excessive 0 paddings. There are still some zero paddings to ensure "next" and "crc" fields are properly aligned. This patch does have a tiny drawback that it makes ".mod.c" files generated a bit less easy to read, as code like "\x08\x00\x00\x00\x78\x56\x34\x12" "symbol\0\0" is generated as opposed to { 0x12345678, "symbol" }, because the structure is now variable-length. But hopefully nobody reads the generated file :) Link: b8a94bf ("kallsyms: increase maximum kernel symbol length to 512") Link: Rust-for-Linux#379 Signed-off-by: Gary Guo <gary@garyguo.net> (backported from https://lore.kernel.org/lkml/20230111161155.1349375-1-gary@garyguo.net/) [ fix build error on s390x: always use a variable with TO_NATIVE() ] [ add dummy NULL entry at the end of the modversion array ] Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
arighi
pushed a commit
to arighi/sched_ext
that referenced
this pull request
Jan 10, 2024
BugLink: https://bugs.launchpad.net/bugs/2007654 Currently modversion uses a fixed size array of size (64 - sizeof(long)) to store symbol names, thus placing a hard limit on length of symbols. Rust symbols (which encodes crate and module names) can be quite a bit longer. The length limit in kallsyms is increased to 512 for this reason. It's a waste of space to simply expand the fixed array size to 512 in modversion info entries. I therefore make it variably sized, with offset to the next entry indicated by the initial "next" field. In addition to supporting longer-than-56/60 byte symbols, this patch also reduce the size for short symbols by getting rid of excessive 0 paddings. There are still some zero paddings to ensure "next" and "crc" fields are properly aligned. This patch does have a tiny drawback that it makes ".mod.c" files generated a bit less easy to read, as code like "\x08\x00\x00\x00\x78\x56\x34\x12" "symbol\0\0" is generated as opposed to { 0x12345678, "symbol" }, because the structure is now variable-length. But hopefully nobody reads the generated file :) Link: b8a94bf ("kallsyms: increase maximum kernel symbol length to 512") Link: Rust-for-Linux/linux#379 Signed-off-by: Gary Guo <gary@garyguo.net> (backported from https://lore.kernel.org/lkml/20230111161155.1349375-1-gary@garyguo.net/) [ fix build error on s390x: always use a variable with TO_NATIVE() ] [ add dummy NULL entry at the end of the modversion array ] Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
arighi
pushed a commit
to arighi/sched_ext
that referenced
this pull request
Jan 25, 2024
BugLink: https://bugs.launchpad.net/bugs/2007654 Currently modversion uses a fixed size array of size (64 - sizeof(long)) to store symbol names, thus placing a hard limit on length of symbols. Rust symbols (which encodes crate and module names) can be quite a bit longer. The length limit in kallsyms is increased to 512 for this reason. It's a waste of space to simply expand the fixed array size to 512 in modversion info entries. I therefore make it variably sized, with offset to the next entry indicated by the initial "next" field. In addition to supporting longer-than-56/60 byte symbols, this patch also reduce the size for short symbols by getting rid of excessive 0 paddings. There are still some zero paddings to ensure "next" and "crc" fields are properly aligned. This patch does have a tiny drawback that it makes ".mod.c" files generated a bit less easy to read, as code like "\x08\x00\x00\x00\x78\x56\x34\x12" "symbol\0\0" is generated as opposed to { 0x12345678, "symbol" }, because the structure is now variable-length. But hopefully nobody reads the generated file :) Link: b8a94bf ("kallsyms: increase maximum kernel symbol length to 512") Link: Rust-for-Linux/linux#379 Signed-off-by: Gary Guo <gary@garyguo.net> (backported from https://lore.kernel.org/lkml/20230111161155.1349375-1-gary@garyguo.net/) [ fix build error on s390x: always use a variable with TO_NATIVE() ] [ add dummy NULL entry at the end of the modversion array ] Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
arighi
pushed a commit
to arighi/sched_ext
that referenced
this pull request
Feb 4, 2024
BugLink: https://bugs.launchpad.net/bugs/2007654 Currently modversion uses a fixed size array of size (64 - sizeof(long)) to store symbol names, thus placing a hard limit on length of symbols. Rust symbols (which encodes crate and module names) can be quite a bit longer. The length limit in kallsyms is increased to 512 for this reason. It's a waste of space to simply expand the fixed array size to 512 in modversion info entries. I therefore make it variably sized, with offset to the next entry indicated by the initial "next" field. In addition to supporting longer-than-56/60 byte symbols, this patch also reduce the size for short symbols by getting rid of excessive 0 paddings. There are still some zero paddings to ensure "next" and "crc" fields are properly aligned. This patch does have a tiny drawback that it makes ".mod.c" files generated a bit less easy to read, as code like "\x08\x00\x00\x00\x78\x56\x34\x12" "symbol\0\0" is generated as opposed to { 0x12345678, "symbol" }, because the structure is now variable-length. But hopefully nobody reads the generated file :) Link: b8a94bf ("kallsyms: increase maximum kernel symbol length to 512") Link: Rust-for-Linux/linux#379 Signed-off-by: Gary Guo <gary@garyguo.net> (backported from https://lore.kernel.org/lkml/20230111161155.1349375-1-gary@garyguo.net/) [ fix build error on s390x: always use a variable with TO_NATIVE() ] [ add dummy NULL entry at the end of the modversion array ] Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
arighi
pushed a commit
to arighi/sched_ext
that referenced
this pull request
Feb 7, 2024
BugLink: https://bugs.launchpad.net/bugs/2007654 Currently modversion uses a fixed size array of size (64 - sizeof(long)) to store symbol names, thus placing a hard limit on length of symbols. Rust symbols (which encodes crate and module names) can be quite a bit longer. The length limit in kallsyms is increased to 512 for this reason. It's a waste of space to simply expand the fixed array size to 512 in modversion info entries. I therefore make it variably sized, with offset to the next entry indicated by the initial "next" field. In addition to supporting longer-than-56/60 byte symbols, this patch also reduce the size for short symbols by getting rid of excessive 0 paddings. There are still some zero paddings to ensure "next" and "crc" fields are properly aligned. This patch does have a tiny drawback that it makes ".mod.c" files generated a bit less easy to read, as code like "\x08\x00\x00\x00\x78\x56\x34\x12" "symbol\0\0" is generated as opposed to { 0x12345678, "symbol" }, because the structure is now variable-length. But hopefully nobody reads the generated file :) Link: b8a94bf ("kallsyms: increase maximum kernel symbol length to 512") Link: Rust-for-Linux/linux#379 Signed-off-by: Gary Guo <gary@garyguo.net> (backported from https://lore.kernel.org/lkml/20230111161155.1349375-1-gary@garyguo.net/) [ fix build error on s390x: always use a variable with TO_NATIVE() ] [ add dummy NULL entry at the end of the modversion array ] Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
arighi
pushed a commit
to arighi/sched_ext
that referenced
this pull request
Feb 7, 2024
BugLink: https://bugs.launchpad.net/bugs/2007654 Currently modversion uses a fixed size array of size (64 - sizeof(long)) to store symbol names, thus placing a hard limit on length of symbols. Rust symbols (which encodes crate and module names) can be quite a bit longer. The length limit in kallsyms is increased to 512 for this reason. It's a waste of space to simply expand the fixed array size to 512 in modversion info entries. I therefore make it variably sized, with offset to the next entry indicated by the initial "next" field. In addition to supporting longer-than-56/60 byte symbols, this patch also reduce the size for short symbols by getting rid of excessive 0 paddings. There are still some zero paddings to ensure "next" and "crc" fields are properly aligned. This patch does have a tiny drawback that it makes ".mod.c" files generated a bit less easy to read, as code like "\x08\x00\x00\x00\x78\x56\x34\x12" "symbol\0\0" is generated as opposed to { 0x12345678, "symbol" }, because the structure is now variable-length. But hopefully nobody reads the generated file :) Link: b8a94bf ("kallsyms: increase maximum kernel symbol length to 512") Link: Rust-for-Linux/linux#379 Signed-off-by: Gary Guo <gary@garyguo.net> (backported from https://lore.kernel.org/lkml/20230111161155.1349375-1-gary@garyguo.net/) [ fix build error on s390x: always use a variable with TO_NATIVE() ] [ add dummy NULL entry at the end of the modversion array ] Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In recent weeks, there have been a few reports of Rust build errors
for defconfigs which have CONFIG_MODVERSIONS=y. See #378 for example.
According to #59, Rust-for-Linux currently doesn't support MODVERSIONS.
To prevent confusion and build errors in the future, disable Rust
support if CONFIG_MODVERSIONS=y.
Signed-off-by: Sven Van Asbroeck thesven73@gmail.com