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

is_idmapped_mnt throwing error on compilation #25

Open
JoeMattie opened this issue Feb 21, 2023 · 7 comments
Open

is_idmapped_mnt throwing error on compilation #25

JoeMattie opened this issue Feb 21, 2023 · 7 comments
Labels
bug Something isn't working kernel Problem is connected to the linux kernel problem with specific kernels Regular kernels work.

Comments

@JoeMattie
Copy link

JoeMattie commented Feb 21, 2023

Seeing this crop up since the update a few days ago:

Tue Feb 21 22:06:59 UTC 2023
make[1]: Entering directory '/var/lib/dkms/shiftfs/k516/build'
make -C /lib/modules/5.15.0-1017-aws/build M="$(pwd)" EXTRA_CFLAGS="-DSHIFTFS_MAGIC=0x6a656a62" modules
make[2]: Entering directory '/usr/src/linux-headers-5.15.0-1017-aws'
  CC [M]  /var/lib/dkms/shiftfs/k516/build/shiftfs.o
/var/lib/dkms/shiftfs/k516/build/shiftfs.c: In function ‘shiftfs_fill_super’:
/var/lib/dkms/shiftfs/k516/build/shiftfs.c:2022:6: error: implicit declaration of function ‘is_idmapped_mnt’ [-Werror=implicit-function-declaration]
 2022 |  if (is_idmapped_mnt(path.mnt)) {
      |      ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:297: /var/lib/dkms/shiftfs/k516/build/shiftfs.o] Error 1
make[2]: *** [Makefile:1881: /var/lib/dkms/shiftfs/k516/build] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.15.0-1017-aws'
make[1]: *** [Makefile:15: default] Error 2
make[1]: Leaving directory '/var/lib/dkms/shiftfs/k516/build'

Comment by @toby63:

Workaround is to use an older commit for now.
Run the following in your shiftfs folder, usually named shiftfs-k516:

git checkout 941cb2dbf892c5838355c74078e571d490936827 - this will use the 4th last commit, which still worked.
Then run the build with make -f Makefile.dkms again.

@toby63
Copy link
Owner

toby63 commented Feb 21, 2023

@mihalicyn @brauner
This is about the following commit to shiftfs: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/commit/fs/shiftfs.c?h=master-next&id=16fdcaeef4aedf3a0281d79c0978e3aec47c62a6

I assume you declared the function ‘is_idmapped_mnt’ somewhere else in the ubuntu kernel, can this be included here?

Edit: I found the commit:
https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/commit/?h=master-next&id=03dfc6a8ca9206357f6d8e02ff2fe5321baca348
It mentions an upstream commit...

Update2: Build on 6.1 kernel works flawless, so I assume a kernel version problem, if a kernel does not include the mentioned commit.


@JoeMattie
Interesting.
Sry for the problem, I should have tested the new release beforehand, I assumed that everything was working correctly, but other users seem to have used regular Ubuntu kernels....

In case you did not know, you could try the following ways to "workaround" the problem:

  • either download and replace the shiftfs.c file in the shiftfs folder, usually named shiftfs-k516 :
    Run: wget 'https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/plain/fs/shiftfs.c?h=master-next&id=b1210ccf924ede51e4d8a1f451a7ffdd8e9ea03d' and: mv 'shiftfs.c?h=master-next&id=b1210ccf924ede51e4d8a1f451a7ffdd8e9ea03d' shiftfs.c (this will download and rename the new shiftfs.c file)
    and then run the build again.
  • or try to use git revert:
    Try to run git revert 879243299831e054443bb92dd20ab5c2ab5c6238 in the shiftfs folder, usually named shiftfs-k516 and then run the build again.

@toby63 toby63 pinned this issue Feb 21, 2023
@toby63 toby63 added the needs-more-info Further information is requested label Feb 21, 2023
@toby63
Copy link
Owner

toby63 commented Feb 21, 2023

@JoeMattie As my build on a 6.1 kernel is working, I assume it could be a problem with the kernel version 🤔.

Your kernel needs to include commit bb49e9e730c2906a958eee273a7819f401543d6c, which is described here: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/commit/?h=master-next&id=03dfc6a8ca9206357f6d8e02ff2fe5321baca348

I will test a 5.15 kernel tomorrow.

@JoeMattie
Copy link
Author

Thank you for the quick reply! We worked around the issue temporarily with git checkout 941cb2dbf892c5838355c74078e571d490936827

@toby63 toby63 added the kernel Problem is connected to the linux kernel label Feb 22, 2023
@toby63
Copy link
Owner

toby63 commented Feb 23, 2023

So I checked 5.15 kernels (5.15.94) and everything works normal.

I guess the problem is with specific kernels like yours, that somehow don't have the mentioned commit or that maybe deactivated the functionality.

I assume you use this kernel from Ubuntu: https://packages.ubuntu.com/jammy/linux-image-5.15.0-1017-aws ?
In that case, I would encourage you to contact the Ubuntu team about this (https://launchpad.net/ubuntu/+source/linux-signed-aws/+bugs) and see what they got to say.

@mihalicyn
Copy link

Guys, do you need any help from my side?

@toby63 toby63 added bug Something isn't working upstream problem with specific kernels Regular kernels work. labels Feb 23, 2023
@mihalicyn
Copy link

I guess the problem is with specific kernels like yours, that somehow don't have the mentioned commit or that maybe deactivated the functionality.

It looks like they haven't ported idmapped mounts support to this kernel version yet.

@toby63 toby63 unpinned this issue Feb 23, 2023
@toby63 toby63 removed needs-more-info Further information is requested upstream labels Feb 23, 2023
@toby63
Copy link
Owner

toby63 commented Feb 23, 2023

I guess the problem is with specific kernels like yours, that somehow don't have the mentioned commit or that maybe deactivated the functionality.

It looks like they haven't ported idmapped mounts support to this kernel version yet.

Thx for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kernel Problem is connected to the linux kernel problem with specific kernels Regular kernels work.
Projects
None yet
Development

No branches or pull requests

3 participants