mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wei-chin Tsai (蔡維晉)" <Wei-chin.Tsai@mediatek.com>
To: "linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"angelogioacchino.delregno@collabora.com" 
	<angelogioacchino.delregno@collabora.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Mel Lee (李奇錚)" <Mel.Lee@mediatek.com>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	wsd_upstream <wsd_upstream@mediatek.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"Ivan Tseng (曾志軒)" <ivan.tseng@mediatek.com>
Subject: Re: [PATCH v2 2/3] memory: export symbols for memory related functions
Date: Wed, 14 Jun 2023 15:53:54 +0000	[thread overview]
Message-ID: <a5af0ec711b3704f4f2d8ed60f2f2987e3cf44ec.camel@mediatek.com> (raw)
In-Reply-To: <cb7f49bc-8ed4-a916-44f4-39e360afce41@collabora.com>

On Wed, 2023-06-14 at 14:11 +0200, AngeloGioacchino Del Regno wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  Il 14/06/23 11:59, Wei-chin Tsai (蔡維晉) ha scritto:
> > On Wed, 2023-06-14 at 08:16 +0100, Russell King (Oracle) wrote:
> >>   
> >> External email : Please do not click links or open attachments
> until
> >> you have verified the sender or the content.
> >>   On Wed, Jun 14, 2023 at 11:20:34AM +0800, Wei Chin Tsai wrote:
> >>> diff --git a/arch/arm/kernel/process.c
> b/arch/arm/kernel/process.c
> >>> index 0e8ff85890ad..df91412a1069 100644
> >>> --- a/arch/arm/kernel/process.c
> >>> +++ b/arch/arm/kernel/process.c
> >>> @@ -343,6 +343,7 @@ const char *arch_vma_name(struct
> vm_area_struct
> >> *vma)
> >>>   {
> >>>   return is_gate_vma(vma) ? "[vectors]" : NULL;
> >>>   }
> >>> +EXPORT_SYMBOL_GPL(arch_vma_name);
> >> ...
> >>> diff --git a/kernel/signal.c b/kernel/signal.c
> >>> index b5370fe5c198..a1abe77fcdc3 100644
> >>> --- a/kernel/signal.c
> >>> +++ b/kernel/signal.c
> >>> @@ -4700,6 +4700,7 @@ __weak const char *arch_vma_name(struct
> >> vm_area_struct *vma)
> >>>   {
> >>>   return NULL;
> >>>   }
> >>> +EXPORT_SYMBOL_GPL(arch_vma_name);
> >>
> >> Have you confirmed:
> >> 1) whether this actually builds
> >> 2) whether this results in one or two arch_vma_name exports
> >>
> >> ?
> >>
> >> -- 
> >> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> >> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
> > 
> > Hi Russell,
> > 
> > We did confirm that it can be built successfully in kernel 6.1 and
> run
> > well in our system.
> > 
> 
> It runs well in your system and can be built successfully because
> you're building
> for ARM64, not for ARM...
> 
> > Actually, we only use this export symbol "arch_vma_name"
> > from kernel/signal.c in arm64. We also export symbol for
> arch_vma_name
> > in arch/arm/kernel/process.c because that, one day in the
> future,  we
> > are afraid that we also need this function in arm platform.
> > 
> > Thanks.
> > 
> > Regards,
> > 
> > Jim
> > 
> 

Hi Russell and Angelo,

Please use the following patch to see if the problem still exists.
Thanks.

From 150162ce2365557710e9ac8ef62c59f870ffbbb0 Mon Sep 17 00:00:00 2001
From: Wei Chin Tsai <Wei-chin.Tsai@mediatek.com>
Date: Wed, 14 Jun 2023 23:31:02 +0800
Subject: [PATCH v3 1/1] memory: Fix export symbol twice compiler error
for
 "export symbols for memory related functions" patch

User could not add the export symbol "arch_vma_name"
in arch/arm/kernel/process.c and kernel/signal.c both.
It would cause the export symbol twice compiler error
Reported-by: kernel test robot <lkp@intel.com>

Signed-off-by: Wei Chin Tsai <Wei-chin.Tsai@mediatek.com>
---
 arch/arm/kernel/process.c | 3 +++
 kernel/signal.c           | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index df91412a1069..d71a9bafb584 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -343,7 +343,10 @@ const char *arch_vma_name(struct vm_area_struct
*vma)
 {
 	return is_gate_vma(vma) ? "[vectors]" : NULL;
 }
+
+#ifdef CONFIG_ARM
 EXPORT_SYMBOL_GPL(arch_vma_name);
+#endif
 
 /* If possible, provide a placement hint at a random offset from the
  * stack for the sigpage and vdso pages.
diff --git a/kernel/signal.c b/kernel/signal.c
index a1abe77fcdc3..f7d03450781e 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -4700,7 +4700,10 @@ __weak const char *arch_vma_name(struct
vm_area_struct *vma)
 {
 	return NULL;
 }
+
+#ifdef CONFIG_ARM64
 EXPORT_SYMBOL_GPL(arch_vma_name);
+#endif
 
 static inline void siginfo_buildtime_checks(void)
 {
-- 
2.18.0

Regards,

Jim
> 

  reply	other threads:[~2023-06-14 15:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14  3:20 [PATCH v2 0/3] export symbols for process and " Wei Chin Tsai
2023-06-14  3:20 ` [PATCH v2 1/3] kernel : process fork/exit: export symbol for fork/exit tracing functions Wei Chin Tsai
2023-06-14  3:20 ` [PATCH v2 2/3] memory: export symbols for memory related functions Wei Chin Tsai
2023-06-14  7:16   ` Russell King (Oracle)
2023-06-14  9:59     ` Wei-chin Tsai (蔡維晉)
2023-06-14 12:11       ` AngeloGioacchino Del Regno
2023-06-14 15:53         ` Wei-chin Tsai (蔡維晉) [this message]
2023-06-14 16:21         ` Russell King (Oracle)
2023-06-14 17:11           ` Matthew Wilcox
2023-06-15  2:08           ` Wei-chin Tsai (蔡維晉)
2023-06-14  8:42   ` kernel test robot
2023-06-14 10:05   ` kernel test robot
2023-06-14 13:05   ` kernel test robot
2023-06-14 15:39     ` [PATCH v3 1/1] memory: Fix export symbol twice compiler error for "export symbols for memory related functions" patch Wei Chin Tsai
2023-06-14 16:24       ` Russell King (Oracle)
2023-06-14  3:20 ` [PATCH v2 3/3] misc : mediatek_mbraink : Collect the system process and memory data Wei Chin Tsai
2023-06-14 11:14   ` AngeloGioacchino Del Regno

Reply instructions:

You may reply publicly 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=a5af0ec711b3704f4f2d8ed60f2f2987e3cf44ec.camel@mediatek.com \
    --to=wei-chin.tsai@mediatek.com \
    --cc=Mel.Lee@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=ivan.tseng@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=matthias.bgg@gmail.com \
    --cc=wsd_upstream@mediatek.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®