Skip to content

Commit 0bbcce5

Browse files
committed
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timers and timekeeping updates from Thomas Gleixner: - Core infrastucture work for Y2038 to address the COMPAT interfaces: + Add a new Y2038 safe __kernel_timespec and use it in the core code + Introduce config switches which allow to control the various compat mechanisms + Use the new config switch in the posix timer code to control the 32bit compat syscall implementation. - Prevent bogus selection of CPU local clocksources which causes an endless reselection loop - Remove the extra kthread in the clocksource code which has no value and just adds another level of indirection - The usual bunch of trivial updates, cleanups and fixlets all over the place - More SPDX conversions * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) clocksource/drivers/mxs_timer: Switch to SPDX identifier clocksource/drivers/timer-imx-tpm: Switch to SPDX identifier clocksource/drivers/timer-imx-gpt: Switch to SPDX identifier clocksource/drivers/timer-imx-gpt: Remove outdated file path clocksource/drivers/arc_timer: Add comments about locking while read GFRC clocksource/drivers/mips-gic-timer: Add pr_fmt and reword pr_* messages clocksource/drivers/sprd: Fix Kconfig dependency clocksource: Move inline keyword to the beginning of function declarations timer_list: Remove unused function pointer typedef timers: Adjust a kernel-doc comment tick: Prefer a lower rating device only if it's CPU local device clocksource: Remove kthread time: Change nanosleep to safe __kernel_* types time: Change types to new y2038 safe __kernel_* types time: Fix get_timespec64() for y2038 safe compat interfaces time: Add new y2038 safe __kernel_timespec posix-timers: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME time: Introduce CONFIG_COMPAT_32BIT_TIME time: Introduce CONFIG_64BIT_TIME in architectures compat: Enable compat_get/put_timespec64 always ...
2 parents 0ef283d + e45e778 commit 0bbcce5

File tree

67 files changed

+266
-270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+266
-270
lines changed

arch/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,21 @@ config OLD_SIGACTION
871871
config COMPAT_OLD_SIGACTION
872872
bool
873873

874+
config 64BIT_TIME
875+
def_bool ARCH_HAS_64BIT_TIME
876+
help
877+
This should be selected by all architectures that need to support
878+
new system calls with a 64-bit time_t. This is relevant on all 32-bit
879+
architectures, and 64-bit architectures as part of compat syscall
880+
handling.
881+
882+
config COMPAT_32BIT_TIME
883+
def_bool (!64BIT && 64BIT_TIME) || COMPAT
884+
help
885+
This enables 32 bit time_t support in addition to 64 bit time_t support.
886+
This is relevant on all 32-bit architectures, and 64-bit architectures
887+
as part of compat syscall handling.
888+
874889
config ARCH_NO_COHERENT_DMA_MMAP
875890
bool
876891

arch/alpha/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22

33

4+
generic-y += compat.h
45
generic-y += exec.h
56
generic-y += export.h
67
generic-y += fb.h

arch/arc/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0
22
generic-y += bugs.h
3+
generic-y += compat.h
34
generic-y += device.h
45
generic-y += div64.h
56
generic-y += dma-mapping.h

arch/arm/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
generic-y += compat.h
12
generic-y += current.h
23
generic-y += early_ioremap.h
34
generic-y += emergency-restart.h

arch/arm64/include/asm/compat.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434

3535
typedef u32 compat_size_t;
3636
typedef s32 compat_ssize_t;
37-
typedef s32 compat_time_t;
3837
typedef s32 compat_clock_t;
3938
typedef s32 compat_pid_t;
4039
typedef u16 __compat_uid_t;
@@ -66,16 +65,6 @@ typedef u32 compat_ulong_t;
6665
typedef u64 compat_u64;
6766
typedef u32 compat_uptr_t;
6867

69-
struct compat_timespec {
70-
compat_time_t tv_sec;
71-
s32 tv_nsec;
72-
};
73-
74-
struct compat_timeval {
75-
compat_time_t tv_sec;
76-
s32 tv_usec;
77-
};
78-
7968
struct compat_stat {
8069
#ifdef __AARCH64EB__
8170
short st_dev;

arch/arm64/include/asm/stat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#ifdef CONFIG_COMPAT
2222

23+
#include <linux/compat_time.h>
2324
#include <asm/compat.h>
2425

2526
/*

arch/arm64/kernel/hw_breakpoint.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include <linux/smp.h>
3131
#include <linux/uaccess.h>
3232

33-
#include <asm/compat.h>
3433
#include <asm/current.h>
3534
#include <asm/debug-monitors.h>
3635
#include <asm/hw_breakpoint.h>

arch/arm64/kernel/perf_regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// SPDX-License-Identifier: GPL-2.0
2+
#include <linux/compat.h>
23
#include <linux/errno.h>
34
#include <linux/kernel.h>
45
#include <linux/perf_event.h>
56
#include <linux/bug.h>
67
#include <linux/sched/task_stack.h>
78

8-
#include <asm/compat.h>
99
#include <asm/perf_regs.h>
1010
#include <asm/ptrace.h>
1111

arch/c6x/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
generic-y += atomic.h
22
generic-y += barrier.h
33
generic-y += bugs.h
4+
generic-y += compat.h
45
generic-y += current.h
56
generic-y += device.h
67
generic-y += div64.h

arch/h8300/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ generic-y += barrier.h
33
generic-y += bugs.h
44
generic-y += cacheflush.h
55
generic-y += checksum.h
6+
generic-y += compat.h
67
generic-y += current.h
78
generic-y += delay.h
89
generic-y += device.h

arch/hexagon/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
generic-y += barrier.h
33
generic-y += bug.h
44
generic-y += bugs.h
5+
generic-y += compat.h
56
generic-y += current.h
67
generic-y += device.h
78
generic-y += div64.h

arch/ia64/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
generic-y += compat.h
12
generic-y += exec.h
23
generic-y += irq_work.h
34
generic-y += mcs_spinlock.h

arch/m68k/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
generic-y += barrier.h
2+
generic-y += compat.h
23
generic-y += device.h
34
generic-y += emergency-restart.h
45
generic-y += exec.h

arch/microblaze/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ generic-y += barrier.h
22
generic-y += bitops.h
33
generic-y += bug.h
44
generic-y += bugs.h
5+
generic-y += compat.h
56
generic-y += device.h
67
generic-y += div64.h
78
generic-y += emergency-restart.h

arch/mips/include/asm/compat.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
typedef u32 compat_size_t;
1616
typedef s32 compat_ssize_t;
17-
typedef s32 compat_time_t;
1817
typedef s32 compat_clock_t;
1918
typedef s32 compat_suseconds_t;
2019

@@ -46,16 +45,6 @@ typedef u32 compat_ulong_t;
4645
typedef u64 compat_u64;
4746
typedef u32 compat_uptr_t;
4847

49-
struct compat_timespec {
50-
compat_time_t tv_sec;
51-
s32 tv_nsec;
52-
};
53-
54-
struct compat_timeval {
55-
compat_time_t tv_sec;
56-
s32 tv_usec;
57-
};
58-
5948
struct compat_stat {
6049
compat_dev_t st_dev;
6150
s32 st_pad1[3];

arch/mips/kernel/signal32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
99
* Copyright (C) 2016, Imagination Technologies Ltd.
1010
*/
11+
#include <linux/compat.h>
1112
#include <linux/compiler.h>
1213
#include <linux/errno.h>
1314
#include <linux/kernel.h>
1415
#include <linux/signal.h>
1516
#include <linux/syscalls.h>
1617

17-
#include <asm/compat.h>
1818
#include <asm/compat-signal.h>
1919
#include <linux/uaccess.h>
2020
#include <asm/unistd.h>

arch/nds32/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ generic-y += checksum.h
99
generic-y += clkdev.h
1010
generic-y += cmpxchg.h
1111
generic-y += cmpxchg-local.h
12+
generic-y += compat.h
1213
generic-y += cputime.h
1314
generic-y += device.h
1415
generic-y += div64.h

arch/nios2/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ generic-y += bitops.h
44
generic-y += bug.h
55
generic-y += bugs.h
66
generic-y += cmpxchg.h
7+
generic-y += compat.h
78
generic-y += current.h
89
generic-y += device.h
910
generic-y += div64.h

arch/openrisc/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ generic-y += barrier.h
22
generic-y += bug.h
33
generic-y += bugs.h
44
generic-y += checksum.h
5+
generic-y += compat.h
56
generic-y += current.h
67
generic-y += device.h
78
generic-y += div64.h

arch/parisc/include/asm/compat.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
typedef u32 compat_size_t;
1515
typedef s32 compat_ssize_t;
16-
typedef s32 compat_time_t;
1716
typedef s32 compat_clock_t;
1817
typedef s32 compat_pid_t;
1918
typedef u32 __compat_uid_t;
@@ -40,16 +39,6 @@ typedef u32 compat_ulong_t;
4039
typedef u64 compat_u64;
4140
typedef u32 compat_uptr_t;
4241

43-
struct compat_timespec {
44-
compat_time_t tv_sec;
45-
s32 tv_nsec;
46-
};
47-
48-
struct compat_timeval {
49-
compat_time_t tv_sec;
50-
s32 tv_usec;
51-
};
52-
5342
struct compat_stat {
5443
compat_dev_t st_dev; /* dev_t is 32 bits on parisc */
5544
compat_ino_t st_ino; /* 32 bits */

arch/powerpc/include/asm/compat.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
typedef u32 compat_size_t;
1919
typedef s32 compat_ssize_t;
20-
typedef s32 compat_time_t;
2120
typedef s32 compat_clock_t;
2221
typedef s32 compat_pid_t;
2322
typedef u32 __compat_uid_t;
@@ -45,16 +44,6 @@ typedef u32 compat_ulong_t;
4544
typedef u64 compat_u64;
4645
typedef u32 compat_uptr_t;
4746

48-
struct compat_timespec {
49-
compat_time_t tv_sec;
50-
s32 tv_nsec;
51-
};
52-
53-
struct compat_timeval {
54-
compat_time_t tv_sec;
55-
s32 tv_usec;
56-
};
57-
5847
struct compat_stat {
5948
compat_dev_t st_dev;
6049
compat_ino_t st_ino;

arch/powerpc/kernel/asm-offsets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* 2 of the License, or (at your option) any later version.
1414
*/
1515

16+
#include <linux/compat.h>
1617
#include <linux/signal.h>
1718
#include <linux/sched.h>
1819
#include <linux/kernel.h>
@@ -42,7 +43,6 @@
4243
#include <asm/paca.h>
4344
#include <asm/lppaca.h>
4445
#include <asm/cache.h>
45-
#include <asm/compat.h>
4646
#include <asm/mmu.h>
4747
#include <asm/hvcall.h>
4848
#include <asm/xics.h>

arch/powerpc/oprofile/backtrace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* 2 of the License, or (at your option) any later version.
88
**/
99

10+
#include <linux/compat_time.h>
1011
#include <linux/oprofile.h>
1112
#include <linux/sched.h>
1213
#include <asm/processor.h>

arch/s390/hypfs/hypfs_sprp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/string.h>
1414
#include <linux/types.h>
1515
#include <linux/uaccess.h>
16-
#include <asm/compat.h>
1716
#include <asm/diag.h>
1817
#include <asm/sclp.h>
1918
#include "hypfs.h"

arch/s390/include/asm/compat.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353

5454
typedef u32 compat_size_t;
5555
typedef s32 compat_ssize_t;
56-
typedef s32 compat_time_t;
5756
typedef s32 compat_clock_t;
5857
typedef s32 compat_pid_t;
5958
typedef u16 __compat_uid_t;
@@ -97,16 +96,6 @@ typedef struct {
9796
u32 gprs_high[NUM_GPRS];
9897
} s390_compat_regs_high;
9998

100-
struct compat_timespec {
101-
compat_time_t tv_sec;
102-
s32 tv_nsec;
103-
};
104-
105-
struct compat_timeval {
106-
compat_time_t tv_sec;
107-
s32 tv_usec;
108-
};
109-
11099
struct compat_stat {
111100
compat_dev_t st_dev;
112101
u16 __pad1;

arch/s390/include/asm/elf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@
125125
* ELF register definitions..
126126
*/
127127

128+
#include <linux/compat.h>
129+
128130
#include <asm/ptrace.h>
129-
#include <asm/compat.h>
130131
#include <asm/syscall.h>
131132
#include <asm/user.h>
132133

@@ -136,7 +137,6 @@ typedef s390_regs elf_gregset_t;
136137
typedef s390_fp_regs compat_elf_fpregset_t;
137138
typedef s390_compat_regs compat_elf_gregset_t;
138139

139-
#include <linux/compat.h>
140140
#include <linux/sched/mm.h> /* for task_struct */
141141
#include <asm/mmu_context.h>
142142

arch/s390/kvm/priv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <asm/gmap.h>
2727
#include <asm/io.h>
2828
#include <asm/ptrace.h>
29-
#include <asm/compat.h>
3029
#include <asm/sclp.h>
3130
#include "gaccess.h"
3231
#include "kvm-s390.h"

arch/s390/pci/pci_clp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <linux/uaccess.h>
2020
#include <asm/pci_debug.h>
2121
#include <asm/pci_clp.h>
22-
#include <asm/compat.h>
2322
#include <asm/clp.h>
2423
#include <uapi/asm/clp.h>
2524

arch/sh/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
generic-y += compat.h
12
generic-y += current.h
23
generic-y += delay.h
34
generic-y += div64.h

0 commit comments

Comments
 (0)