linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] Remove vermagic header from global include folder
@ 2020-04-14 15:57 Leon Romanovsky
  2020-04-14 15:57 ` [PATCH net-next 4/4] kernel/module: Hide vermagic header file from general use Leon Romanovsky
  0 siblings, 1 reply; 4+ messages in thread
From: Leon Romanovsky @ 2020-04-14 15:57 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski
  Cc: Leon Romanovsky, Andy Gospodarek, Borislav Petkov, Ion Badulescu,
	Jay Vosburgh, Jessica Yu, linux-kernel, linux-pm, netdev,
	oss-drivers, Pensando Drivers, Salil Mehta, Sebastian Reichel,
	Shannon Nelson, Veaceslav Falico, Yisen Zhuang

From: Leon Romanovsky <leonro@mellanox.com>

Hi,

This is followup to the failure reported by Borislav [1] and suggested
fix later on [2].

The series removes all includes of linux/vermagic.h, updates hns and
nfp to use same kernel versioning scheme (exactly like we did for
other drivers in previous cycle) and removes vermagic.h from global
include folder.

[1] https://lore.kernel.org/lkml/20200411155623.GA22175@zn.tnic
[2] https://lore.kernel.org/lkml/20200413080452.GA3772@zn.tnic

------------------------------------------------------------
1. Honestly, I have no idea if it can go to net-rc, clearly not all my
patches are fixes, so I'm sending them to the net-next.
2. Still didn't get response from kbuild, but it passed my own
compilation tests.

Thanks

Leon Romanovsky (4):
  drivers: Remove inclusion of vermagic header
  net/hns: Remove custom driver version in favour of global one
  net/nfp: Update driver to use global kernel version
  kernel/module: Hide vermagic header file from general use

 drivers/net/bonding/bonding_priv.h                   | 2 +-
 drivers/net/ethernet/3com/3c509.c                    | 1 -
 drivers/net/ethernet/3com/3c515.c                    | 1 -
 drivers/net/ethernet/adaptec/starfire.c              | 1 -
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c      | 3 ---
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.h      | 4 ----
 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c   | 4 ----
 drivers/net/ethernet/netronome/nfp/nfp_main.c        | 3 ---
 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 --
 drivers/net/ethernet/pensando/ionic/ionic_main.c     | 2 +-
 drivers/power/supply/test_power.c                    | 2 +-
 kernel/module.c                                      | 2 +-
 {include/linux => kernel}/vermagic.h                 | 0
 net/ethtool/ioctl.c                                  | 3 +--
 14 files changed, 5 insertions(+), 25 deletions(-)
 rename {include/linux => kernel}/vermagic.h (100%)

--
2.25.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net-next 4/4] kernel/module: Hide vermagic header file from general use
  2020-04-14 15:57 [PATCH net-next 0/4] Remove vermagic header from global include folder Leon Romanovsky
@ 2020-04-14 15:57 ` Leon Romanovsky
  2020-04-14 16:03   ` Borislav Petkov
  0 siblings, 1 reply; 4+ messages in thread
From: Leon Romanovsky @ 2020-04-14 15:57 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski
  Cc: Leon Romanovsky, Borislav Petkov, Jessica Yu, linux-kernel

From: Leon Romanovsky <leonro@mellanox.com>

VERMAGIC* definitions are not supposed to be used by the drivers,
see this [1] bug report, so simply move this header file to be visible
to kernel/* files only.

[1] https://lore.kernel.org/lkml/20200411155623.GA22175@zn.tnic
Reported-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 kernel/module.c                      | 2 +-
 {include/linux => kernel}/vermagic.h | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename {include/linux => kernel}/vermagic.h (100%)

diff --git a/kernel/module.c b/kernel/module.c
index 3447f3b74870..fce06095d341 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -29,7 +29,6 @@
 #include <linux/moduleparam.h>
 #include <linux/errno.h>
 #include <linux/err.h>
-#include <linux/vermagic.h>
 #include <linux/notifier.h>
 #include <linux/sched.h>
 #include <linux/device.h>
@@ -55,6 +54,7 @@
 #include <linux/audit.h>
 #include <uapi/linux/module.h>
 #include "module-internal.h"
+#include "vermagic.h"
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/module.h>
diff --git a/include/linux/vermagic.h b/kernel/vermagic.h
similarity index 100%
rename from include/linux/vermagic.h
rename to kernel/vermagic.h
-- 
2.25.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next 4/4] kernel/module: Hide vermagic header file from general use
  2020-04-14 15:57 ` [PATCH net-next 4/4] kernel/module: Hide vermagic header file from general use Leon Romanovsky
@ 2020-04-14 16:03   ` Borislav Petkov
  2020-04-14 18:41     ` Leon Romanovsky
  0 siblings, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2020-04-14 16:03 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: David S . Miller, Jakub Kicinski, Leon Romanovsky, Jessica Yu,
	linux-kernel

On Tue, Apr 14, 2020 at 06:57:32PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
> 
> VERMAGIC* definitions are not supposed to be used by the drivers,

Yeah, this was only me conjecturing here. But yes, if people agree, this
would be one way to do it.

In any case and FWIW, series looks ok to me:

Acked-by: Borislav Petkov <bp@suse.de>

Thx.

-- 
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next 4/4] kernel/module: Hide vermagic header file from general use
  2020-04-14 16:03   ` Borislav Petkov
@ 2020-04-14 18:41     ` Leon Romanovsky
  0 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2020-04-14 18:41 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: David S . Miller, Jakub Kicinski, Jessica Yu, linux-kernel, netdev

On Tue, Apr 14, 2020 at 06:03:50PM +0200, Borislav Petkov wrote:
> On Tue, Apr 14, 2020 at 06:57:32PM +0300, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@mellanox.com>
> >
> > VERMAGIC* definitions are not supposed to be used by the drivers,
>
> Yeah, this was only me conjecturing here. But yes, if people agree, this
> would be one way to do it.
>
> In any case and FWIW, series looks ok to me:
>
> Acked-by: Borislav Petkov <bp@suse.de>

Thanks, finally kbuild slap me to the face.
There is a need to change scripts/mod/modpost.c too and find the reason
why I didn't get any compilation errors.

<...>
>> drivers/gpio/gpio-aspeed.mod.c:3:10: fatal error: linux/vermagic.h: No such file or directory
       3 | #include <linux/vermagic.h>
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.

<...>


>
> Thx.
>
> --
> Regards/Gruss,
>     Boris.
>
> SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-14 18:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-14 15:57 [PATCH net-next 0/4] Remove vermagic header from global include folder Leon Romanovsky
2020-04-14 15:57 ` [PATCH net-next 4/4] kernel/module: Hide vermagic header file from general use Leon Romanovsky
2020-04-14 16:03   ` Borislav Petkov
2020-04-14 18:41     ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).