Linux-CIFS Archive on lore.kernel.org
 help / color / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Steve French <smfrench@gmail.com>
Cc: Matthias Maennich <maennich@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	CIFS <linux-cifs@vger.kernel.org>, Jessica Yu <jeyu@kernel.org>
Subject: Re: nsdeps not working on modules in 5.4-rc1
Date: Fri, 4 Oct 2019 13:50:06 +0900
Message-ID: <CAK7LNASNu2iovxs84_0ouD_GKNfkqnwy4k0QhUGu+XbH9oT0UQ@mail.gmail.com> (raw)
In-Reply-To: <CAH2r5muRXaaa4MV0455Sx5JOPyO0ZE_TVTkhuy3rAJXAHyhccQ@mail.gmail.com>

Hi Steve,

On Fri, Oct 4, 2019 at 1:28 PM Steve French <smfrench@gmail.com> wrote:
>
> On Thu, Oct 3, 2019 at 10:41 PM Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
> >
> > Hi Steve,
> >
> > On Fri, Oct 4, 2019 at 1:07 AM Steve French <smfrench@gmail.com> wrote:
> > >
> > > On Thu, Oct 3, 2019 at 10:24 AM Masahiro Yamada
> > > <yamada.masahiro@socionext.com> wrote:
> > > >
> > > > Hi Steve,
> > > >
> > > > On Fri, Oct 4, 2019 at 12:15 AM Steve French <smfrench@gmail.com> wrote:
> > > > >
> > > > > On Thu, Oct 3, 2019 at 5:43 AM Matthias Maennich <maennich@google.com> wrote:
> > > > > >
> > > > > > Hi Steve!
> > > > > >
> > > > > > On Wed, Oct 02, 2019 at 06:54:26PM -0500, Steve French wrote:
> > > > > > >And running the build differently, from the root of the git tree
> > > > > > >(5.4-rc1) rather than using the Ubuntu 5.4-rc1 headers also fails
> > > > > > >
> > > > > > >e.g. "make  M=fs/cifs modules nsdeps"
> > > > > > >
> > > > > > >...
> > > > > > >  LD [M]  fs/cifs/cifs.o
> > > > > > >  Building modules, stage 2.
> > > > > > >  MODPOST 1 modules
> > > > > > >WARNING: module cifs uses symbol sigprocmask from namespace
> > > > > > >_fs/cifs/cache.o), but does not import it.
> > > > > > >...
> > > > > > >WARNING: module cifs uses symbol posix_test_lock from namespace
> > > > > > >cifs/cache.o), but does not import it.
> > > > > > >  CC [M]  fs/cifs/cifs.mod.o
> > > > > > >  LD [M]  fs/cifs/cifs.ko
> > > > > > >  Building modules, stage 2.
> > > > > > >  MODPOST 1 modules
> > > > > > >./scripts/nsdeps: 34: local: ./fs/cifs/cifsfs.c: bad variable name
> > > > > > >make: *** [Makefile:1710: nsdeps] Error 2
> > > > > >
> > > > > > Thanks for reporting this. It appears to me you hit a bug that was
> > > > > > recently discovered: when building with `make M=some/subdirectory`,
> > > > > > modpost is misbehaving. Can you try whether this patch series solves
> > > > > > your problems:
> > > > > > https://lore.kernel.org/lkml/20191003075826.7478-1-yamada.masahiro@socionext.com/
> > > > > > In particular patch 2/6 out of the series.
> > > > > >
> > > > > > Cheers,
> > > > > > Matthias
> > > > >
> > > > >
> > > > > Applying just patch 2 and doing "make" from the root of the git tree
> > > > > (5.4-rc1), at the tail end of the build I got
> > > > >
> > > > > ...
> > > > > Kernel: arch/x86/boot/bzImage is ready  (#87)
> > > > >   Building modules, stage 2.
> > > > >   MODPOST 5340 modules
> > > > > free(): invalid pointer
> > > > > Aborted (core dumped)
> > > >
> > > >
> > > > Right.
> > > >
> > > > Since 2/6 depends on 1/6,
> > > > applying only the second one does not work.
> > >
> > > Applying both 1 and 2 I get the following error doing make (although
> > > it makes it a long way into the build)
> > >
> > > <snip>
> > > WARNING: drivers/usb/storage/usb-storage: 'USB_STORAGE' exported
> > > twice. Previous export was in drivers/usb/storage/usb-storage.ko
> > > ERROR: "usb_stor_set_xfer_buf" [drivers/usb/storage/ums-usbat.ko] undefined!
> > > ERROR: "usb_stor_access_xfer_buf" [drivers/usb/storage/ums-usbat.ko] undefined!
> > > ERROR: "usb_stor_post_reset" [drivers/usb/storage/ums-usbat.ko] undefined!
> > > ERROR: "usb_stor_disconnect" [drivers/usb/storage/ums-usbat.ko] undefined!
> > > <snip>
> > > ERROR: "usb_stor_adjust_quirks" [drivers/usb/storage/uas.ko] undefined!
> > > ERROR: "usb_stor_sense_invalidCDB" [drivers/usb/storage/uas.ko] undefined!
> > > WARNING: "USB_STORAGE" [drivers/usb/storage/usb-storage] is a static
> > > EXPORT_SYMBOL_GPL
> > > make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
> > > make: *** [Makefile:1303: modules] Error 2
> >
> >
> > Hmm, I do not see those error.
> > I was able to build the kernel successfully.
> > (I asked the 0-day bot to test whole of my patch set
> > in case I am missing something.)
> >
> >
> > Could you share the steps to reproduce the errors and your .config file?
>
> From the root of git tree - at exactly 5.4-rc1
>
> ~/cifs-2.6$ make nsdeps
>   CALL    scripts/checksyscalls.sh
>   CALL    scripts/atomic/check-atomics.sh
>   DESCEND  objtool
>   CHK     include/generated/compile.h
>   CHK     kernel/kheaders_data.tar.xz
>   Building modules, stage 2.
>   MODPOST 5340 modules
>   Building modules, stage 2.
>   MODPOST 5340 modules
> ./scripts/nsdeps: 34: local: ./fs/cifs/cifsfs.c: bad variable name
> make: *** [Makefile:1710: nsdeps] Error 2
>
> I get the same error doing "rm fs/cifs/*.o" and repeating the "make
> nsdeps" command
>
> I will send you the .config



You need to clarify your problem.

In the first post from you, you pointed out
"hundreds of new warnings introduced by namespaces in 5.4-rc1 when
building my module"

So, 1/6 and 2/6 should address that problem.
https://lore.kernel.org/patchwork/patch/1133628/
https://lore.kernel.org/patchwork/patch/1133626/


Then, in the previous email ("Applying both 1 and 2 I get the
following error doing make")
it looks like you were talking about in-kernel building
instead of the external module.


Then, in this email, you are talking about "make nsdeps".
"make nsdeps" obviously does not support M=.


I am afraid you are mixing up different issues,
which is so confusing. (and I am afraid you were too confused)

Currently, the namespace is used only by USB_STORAGE.
So, it should not be a problem for your module.

To sum up, you do not need to run nsdeps at all.
The hundreds of false-positive warnings came from the modpost bug,
and should be fixed soon.


-- 
Best Regards
Masahiro Yamada

  reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAH2r5mv49T9gwwoJxKJfkgdi6xbf+hDALUiAJHghGikgUNParw@mail.gmail.com>
2019-10-02 23:54 ` Steve French
2019-10-03 10:43   ` Matthias Maennich
2019-10-03 15:14     ` Steve French
2019-10-03 15:23       ` Masahiro Yamada
2019-10-03 16:06         ` Steve French
2019-10-04  3:40           ` Masahiro Yamada
2019-10-04  4:27             ` Steve French
2019-10-04  4:50               ` Masahiro Yamada [this message]
2019-10-04  5:01                 ` Steve French
2019-10-04 10:40                   ` Matthias Maennich

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK7LNASNu2iovxs84_0ouD_GKNfkqnwy4k0QhUGu+XbH9oT0UQ@mail.gmail.com \
    --to=yamada.masahiro@socionext.com \
    --cc=jeyu@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maennich@google.com \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-CIFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-cifs/0 linux-cifs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-cifs linux-cifs/ https://lore.kernel.org/linux-cifs \
		linux-cifs@vger.kernel.org linux-cifs@archiver.kernel.org
	public-inbox-index linux-cifs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-cifs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox