All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the y2038 tree
@ 2018-12-17  9:11 Stephen Rothwell
  2018-12-17 12:49 ` Arnd Bergmann
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2018-12-17  9:11 UTC (permalink / raw)
  To: Arnd Bergmann, Steve French, CIFS
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Paulo Alcantara, Aurelien Aptel, Steve French

[-- Attachment #1: Type: text/plain, Size: 2820 bytes --]

Hi Arnd,

After merging the y2038 tree, today's linux-next build (x86_64
allmodconfig) failed like this:

fs/cifs/dfs_cache.c: In function 'cache_entry_expired':
fs/cifs/dfs_cache.c:106:7: error: implicit declaration of function 'current_kernel_time64'; did you mean 'core_kernel_text'? [-Werror=implicit-function-declaration]
  ts = current_kernel_time64();
       ^~~~~~~~~~~~~~~~~~~~~
       core_kernel_text
fs/cifs/dfs_cache.c:106:5: error: incompatible types when assigning to type 'struct timespec64' from type 'int'
  ts = current_kernel_time64();
     ^
fs/cifs/dfs_cache.c: In function 'get_expire_time':
fs/cifs/dfs_cache.c:342:24: error: incompatible type for argument 1 of 'timespec64_add'
  return timespec64_add(current_kernel_time64(), ts);
                        ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/restart_block.h:10,
                 from include/linux/thread_info.h:13,
                 from arch/x86/include/asm/preempt.h:7,
                 from include/linux/preempt.h:78,
                 from include/linux/rcupdate.h:40,
                 from fs/cifs/dfs_cache.c:8:
include/linux/time64.h:66:66: note: expected 'struct timespec64' but argument is of type 'int'
 static inline struct timespec64 timespec64_add(struct timespec64 lhs,
                                                ~~~~~~~~~~~~~~~~~~^~~
fs/cifs/dfs_cache.c:343:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

Caused by commit

  ccea641b6742 ("timekeeping: remove obsolete time accessors")

interacting with commit

  34a44fb160f9 ("cifs: Add DFS cache routines")

from the cifs tree.

I have applied the following merge fix patch (better versions welcome):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 17 Dec 2018 20:03:28 +1100
Subject: [PATCH] cifs: update for current_kernel_time64() removal

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/cifs/dfs_cache.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
index 70f9c9e2175c..d20cc94d7abd 100644
--- a/fs/cifs/dfs_cache.c
+++ b/fs/cifs/dfs_cache.c
@@ -103,7 +103,7 @@ static inline bool cache_entry_expired(const struct dfs_cache_entry *ce)
 {
 	struct timespec64 ts;
 
-	ts = current_kernel_time64();
+	ktime_get_coarse_real_ts64(&ts);
 	return timespec64_compare(&ts, &ce->ce_etime) >= 0;
 }
 
@@ -338,8 +338,10 @@ static inline struct timespec64 get_expire_time(int ttl)
 		.tv_sec = ttl,
 		.tv_nsec = 0,
 	};
+	struct timespec64 now;
 
-	return timespec64_add(current_kernel_time64(), ts);
+	ktime_get_coarse_real_ts64(&now);
+	return timespec64_add(now, ts);
 }
 
 /* Allocate a new DFS target */
-- 
2.19.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* linux-next: build failure after merge of the y2038 tree
@ 2019-11-14  4:38 Stephen Rothwell
  2019-11-14 12:10 ` Arnd Bergmann
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2019-11-14  4:38 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linux Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1711 bytes --]

Hi all,

After merging the y2038 tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/kernel/time.c: In function 'update_vsyscall':
arch/powerpc/kernel/time.c:960:33: error: 'struct timespec64' has no member named 'sec'
  960 |  vdso_data->stamp_xtime_sec = xt.sec;
      |                                 ^
arch/powerpc/kernel/time.c:961:34: error: 'struct timespec64' has no member named 'nsec'
  961 |  vdso_data->stamp_xtime_nsec = xt.nsec;
      |                                  ^

Caused by commit

  009a81339beb ("y2038: vdso: powerpc: avoid timespec references")

I have added the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 14 Nov 2019 15:28:13 +1100
Subject: [PATCH] fix up for "y2038: vdso: powerpc: avoid timespec references"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/kernel/time.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index ee9ba3a48c76..2d13cea13954 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -957,8 +957,8 @@ void update_vsyscall(struct timekeeper *tk)
 	vdso_data->tb_to_xs = new_tb_to_xs;
 	vdso_data->wtom_clock_sec = tk->wall_to_monotonic.tv_sec;
 	vdso_data->wtom_clock_nsec = tk->wall_to_monotonic.tv_nsec;
-	vdso_data->stamp_xtime_sec = xt.sec;
-	vdso_data->stamp_xtime_nsec = xt.nsec;
+	vdso_data->stamp_xtime_sec = xt.tv_sec;
+	vdso_data->stamp_xtime_nsec = xt.tv_nsec;
 	vdso_data->stamp_sec_fraction = frac_sec;
 	smp_wmb();
 	++(vdso_data->tb_update_count);
-- 
2.23.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* linux-next: build failure after merge of the y2038 tree
@ 2018-03-27  7:26 Stephen Rothwell
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Rothwell @ 2018-03-27  7:26 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 3242 bytes --]

Hi Arnd,

After merging the y2038 tree, today's linux-next build (sparc defconfig)
failed like this:

In file included from include/linux/compat.h:22:0,
                 from arch/sparc/kernel/systbls.h:7,
                 from arch/sparc/kernel/sys_sparc_32.c:30:
arch/sparc/include/asm/compat.h: In function 'arch_compat_alloc_user_space':
arch/sparc/include/asm/compat.h:162:46: error: 'struct thread_info' has no member named 'kregs'
  struct pt_regs *regs = current_thread_info()->kregs;
                                              ^~
arch/sparc/include/asm/compat.h:165:6: error: implicit declaration of function 'test_thread_64bit_stack'; did you mean 'setup_thread_stack'? [-Werror=implicit-function-declaration]
  if (test_thread_64bit_stack(usp))
      ^~~~~~~~~~~~~~~~~~~~~~~
      setup_thread_stack
In file included from include/asm-generic/preempt.h:5:0,
                 from ./arch/sparc/include/generated/asm/preempt.h:1,
                 from include/linux/preempt.h:81,
                 from include/linux/rcupdate.h:40,
                 from include/linux/rculist.h:11,
                 from include/linux/sched/signal.h:5,
                 from arch/sparc/kernel/sys_sparc_32.c:11:
arch/sparc/include/asm/compat.h:168:23: error: 'TIF_32BIT' undeclared (first use in this function); did you mean 'MAP_32BIT'?
  if (test_thread_flag(TIF_32BIT))
                       ^
include/linux/thread_info.h:91:45: note: in definition of macro 'test_thread_flag'
  test_ti_thread_flag(current_thread_info(), flag)
                                             ^~~~
arch/sparc/include/asm/compat.h:168:23: note: each undeclared identifier is reported only once for each function it appears in
  if (test_thread_flag(TIF_32BIT))
                       ^
include/linux/thread_info.h:91:45: note: in definition of macro 'test_thread_flag'
  test_ti_thread_flag(current_thread_info(), flag)
                                             ^~~~
arch/sparc/include/asm/compat.h: In function 'is_compat_task':
arch/sparc/include/asm/compat.h:237:26: error: 'TIF_32BIT' undeclared (first use in this function); did you mean 'MAP_32BIT'?
  return test_thread_flag(TIF_32BIT);
                          ^
include/linux/thread_info.h:91:45: note: in definition of macro 'test_thread_flag'
  test_ti_thread_flag(current_thread_info(), flag)
                                             ^~~~
In file included from include/linux/compat.h:22:0,
                 from arch/sparc/kernel/systbls.h:7,
                 from arch/sparc/kernel/sys_sparc_32.c:30:
arch/sparc/include/asm/compat.h: In function 'in_compat_syscall':
arch/sparc/include/asm/compat.h:243:9: error: implicit declaration of function 'pt_regs_trap_type'; did you mean 'resource_type'? [-Werror=implicit-function-declaration]
  return pt_regs_trap_type(current_pt_regs()) == 0x110;
         ^~~~~~~~~~~~~~~~~
         resource_type

and lots more :-(

I suspect it is caused by commit

  d1a353a4a8cc ("compat: add an asm-generic/compat.h file")

It looks like the sparc asm/compat.h does not expect to be included in
32 bit builds?

I have reverted the entire y2038 tree merge for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* linux-next: build failure after merge of the y2038 tree
@ 2018-03-16  2:25 ` Stephen Rothwell
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Rothwell @ 2018-03-16  2:25 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Deepa Dinamani, heiko.carstens

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

Hi Arnd,

After merging the y2038 tree, today's linux-next build (s390 allnoconfig)
failed like this:

In file included from include/linux/elf.h:5:0,
                 from include/linux/module.h:15,
                 from init/main.c:16:
arch/s390/include/asm/elf.h:138:1: error: unknown type name 's390_compat_regs'

Caused by commit

  f00689038f71 ("include: Move compat_timespec/ timeval to compat_time.h")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2019-11-14 12:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-17  9:11 linux-next: build failure after merge of the y2038 tree Stephen Rothwell
2018-12-17 12:49 ` Arnd Bergmann
2018-12-17 22:25   ` Steve French
  -- strict thread matches above, loose matches on Subject: below --
2019-11-14  4:38 Stephen Rothwell
2019-11-14 12:10 ` Arnd Bergmann
2018-03-27  7:26 Stephen Rothwell
2018-03-16  2:25 Stephen Rothwell
2018-03-16  2:25 ` Stephen Rothwell
2018-03-16  5:23 ` Deepa Dinamani
2018-03-16  8:14   ` Arnd Bergmann
2018-03-17 23:13     ` Deepa Dinamani

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.