linux_dsm_epyc7002/arch/s390/include/asm
Linus Torvalds 30c44659f4 Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull strscpy string copy function implementation from Chris Metcalf.

Chris sent this during the merge window, but I waffled back and forth on
the pull request, which is why it's going in only now.

The new "strscpy()" function is definitely easier to use and more secure
than either strncpy() or strlcpy(), both of which are horrible nasty
interfaces that have serious and irredeemable problems.

strncpy() has a useless return value, and doesn't NUL-terminate an
overlong result.  To make matters worse, it pads a short result with
zeroes, which is a performance disaster if you have big buffers.

strlcpy(), by contrast, is a mis-designed "fix" for strlcpy(), lacking
the insane NUL padding, but having a differently broken return value
which returns the original length of the source string.  Which means
that it will read characters past the count from the source buffer, and
you have to trust the source to be properly terminated.  It also makes
error handling fragile, since the test for overflow is unnecessarily
subtle.

strscpy() avoids both these problems, guaranteeing the NUL termination
(but not excessive padding) if the destination size wasn't zero, and
making the overflow condition very obvious by returning -E2BIG.  It also
doesn't read past the size of the source, and can thus be used for
untrusted source data too.

So why did I waffle about this for so long?

Every time we introduce a new-and-improved interface, people start doing
these interminable series of trivial conversion patches.

And every time that happens, somebody does some silly mistake, and the
conversion patch to the improved interface actually makes things worse.
Because the patch is mindnumbing and trivial, nobody has the attention
span to look at it carefully, and it's usually done over large swatches
of source code which means that not every conversion gets tested.

So I'm pulling the strscpy() support because it *is* a better interface.
But I will refuse to pull mindless conversion patches.  Use this in
places where it makes sense, but don't do trivial patches to fix things
that aren't actually known to be broken.

* 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: use global strscpy() rather than private copy
  string: provide strscpy()
  Make asm/word-at-a-time.h available on all architectures
2015-10-04 16:31:13 +01:00
..
airq.h s390/airq: add support for irq ranges 2014-03-04 10:41:04 +01:00
appldata.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
asm-offsets.h
atomic.h atomic: Collapse all atomic_{set,clear}_mask definitions 2015-07-27 14:06:24 +02:00
barrier.h locking, arch: use WRITE_ONCE()/READ_ONCE() in smp_store_release()/smp_load_acquire() 2015-08-03 10:59:30 +02:00
bitops.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
bug.h
bugs.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
cache.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
cacheflush.h mm/debug_pagealloc: fix build failure on ppc and some other archs 2015-02-05 13:35:30 -08:00
ccwdev.h s390/cio: fix multiple structure definitions 2014-05-20 08:58:53 +02:00
ccwgroup.h s390: fix new ccwgroup.h kernel-doc warning 2014-05-20 08:58:45 +02:00
checksum.h s390/checksum: remove memset() within csum_partial_copy_from_user() 2014-02-24 17:14:08 +01:00
chpid.h s390/cio: fix multiple structure definitions 2014-05-20 08:58:53 +02:00
cio.h treewide: Fix typo in Documentation/DocBook 2014-02-19 14:58:17 +01:00
clp.h s390/pci: cleanup clp page allocation 2013-02-14 15:55:16 +01:00
cmb.h UAPI: (Scripted) Disintegrate arch/s390/include/asm 2012-10-09 09:47:31 +01:00
cmpxchg.h arch: Remove __ARCH_HAVE_CMPXCHG 2015-05-13 10:55:42 +02:00
compat.h s390/compat: build error for large compat syscall args 2014-03-06 16:30:47 +01:00
cpcmd.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
cpu_mf.h s390: add SMT support 2015-01-22 12:16:01 +01:00
cpu.h s390/smp: cleanup core vs. cpu in the SCLP interface 2015-06-25 09:39:24 +02:00
cpufeature.h s390/module: enable generic CPU feature modalias using s390 ELF hwcaps 2015-07-22 09:58:02 +02:00
cputime.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
crw.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
css_chars.h s390/qdio: bridgeport support - CHSC part 2014-01-15 14:48:01 -08:00
ctl_reg.h s390/kernel: lazy restore fpu registers 2015-07-22 09:58:01 +02:00
current.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
debug.h s390/debug: avoid function call for debug_sprintf_* 2014-12-08 09:42:29 +01:00
delay.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
device.h
diag.h
dis.h s390/disassembler: add vector instructions 2014-10-09 09:14:15 +02:00
div64.h
dma-mapping.h dma-mapping: consolidate dma_set_mask 2015-09-10 13:29:01 -07:00
dma.h s390/pci: define isa_dma_bridge_buggy 2013-01-08 10:57:09 +01:00
eadm.h s390/scm_block: do not hide eadm subchannel dependency 2013-11-15 14:08:42 +01:00
ebcdic.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
elf.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2015-04-14 20:51:44 -07:00
emergency-restart.h
etr.h KVM: s390: host STP toleration for VMs 2015-08-04 14:38:37 +02:00
exec.h Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
extmem.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
facility.h s390/facility: decompose test_facility() 2013-06-26 21:10:25 +02:00
fb.h
fcx.h s390/cio: fix error-prone defines 2013-10-24 17:17:04 +02:00
fpu-internal.h s390/kernel: remove save_fpu_regs() parameter and use __LC_CURRENT instead 2015-08-03 10:04:37 +02:00
ftrace.h s390/ftrace: hotpatch support for function tracing 2015-01-29 09:19:25 +01:00
futex.h s390/uaccess: simplify control register updates 2014-05-20 08:58:46 +02:00
hardirq.h hardirq: Make hardirq bits generic 2013-11-13 20:21:46 +01:00
hugetlb.h s390/hugetlb: add hugepages_supported define 2015-07-17 16:39:52 -07:00
hw_irq.h s390: convert interrupt handling to use generic hardirq 2013-08-22 12:20:04 +02:00
idals.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
idle.h s390/idle: convert open coded idle time seqcount 2014-12-08 09:42:32 +01:00
io.h s390/io: Add pci_iomap_wc() and pci_iomap_wc_range() 2015-08-28 08:04:48 +02:00
ipl.h s390/kdump: fix nosmt kernel parameter 2015-06-25 09:39:26 +02:00
irq_regs.h
irq.h s390: fix /proc/interrupts output 2015-03-25 11:41:41 -04:00
irqflags.h s390/kernel: use stnsm 255 instead of stosm 0 2014-12-18 13:37:15 +01:00
isc.h s390/pci: PCI adapter interrupts for MSI/MSI-X 2012-11-30 17:47:21 +01:00
itcw.h UAPI: Alter the S390 asm include guards to be recognisable by the UAPI splitter 2011-12-13 09:26:45 +00:00
jump_label.h locking/static_keys: Add a new static_key interface 2015-08-03 11:34:15 +02:00
Kbuild Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2015-10-04 16:31:13 +01:00
kdebug.h [S390] cleanup trap handling 2011-12-27 11:27:12 +01:00
kexec.h kexec: allocate the kexec control page with KEXEC_CONTROL_MEMORY_GFP 2015-04-23 16:52:01 +02:00
kmap_types.h s390/headers: remove #ifdef __KERNEL__ from not exported headers 2012-05-24 10:10:05 +02:00
kprobes.h s390/ftrace,kprobes: allow to patch first instruction 2014-10-27 13:27:27 +01:00
kvm_host.h KVM: disable halt_poll_ns as default for s390x 2015-09-25 10:31:30 +02:00
kvm_para.h UAPI: (Scripted) Disintegrate arch/s390/include/asm 2012-10-09 09:47:31 +01:00
linkage.h s390/kernel: move EX_TABLE macros to linkage.h header file 2015-07-22 09:57:59 +02:00
livepatch.h livepatch: add support on s390 2015-03-27 15:05:32 +01:00
local64.h
local.h
lowcore.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
mathemu.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
mman.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
mmu_context.h s390/kvm: remove delayed reallocation of page tables for KVM 2015-04-23 16:55:49 +02:00
mmu.h s390/kvm: remove delayed reallocation of page tables for KVM 2015-04-23 16:55:49 +02:00
mmzone.h s390/numa: add core infrastructure 2015-08-03 18:40:25 +02:00
module.h Make most arch asm/module.h files use asm-generic/module.h 2012-09-28 14:31:03 +09:30
mutex.h mutex: replace CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX with simple ifdef 2013-09-28 12:46:21 +02:00
nmi.h s390: add support for vector extension 2014-10-09 09:14:13 +02:00
numa.h s390/numa: add emulation support 2015-08-04 14:06:53 +02:00
os_info.h s390/kernel: Remove OS info init function call and diag 308 for kdump 2012-05-23 17:06:50 +02:00
page.h revert "s390/mm: make hugepages_supported a boot time decision" 2015-07-17 16:39:52 -07:00
pci_clp.h s390/pci: add some new arch specific pci attributes 2014-05-20 08:58:50 +02:00
pci_debug.h s390/pci: remove CONFIG_PCI_DEBUG dependancy 2013-10-24 17:17:16 +02:00
pci_dma.h s390/pci: DMA support 2012-11-30 17:47:23 +01:00
pci_insn.h s390/pci: cleanup function information block 2013-10-24 17:17:17 +02:00
pci_io.h s390: add pci_iomap_range 2015-01-21 16:28:49 +10:30
pci.h s390/numa: add core infrastructure 2015-08-03 18:40:25 +02:00
percpu.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
perf_event.h s390/oprofile: fix compile error 2015-07-01 09:34:39 +02:00
pgalloc.h s390/kvm: remove delayed reallocation of page tables for KVM 2015-04-23 16:55:49 +02:00
pgtable.h s390/mm: add NUMA balancing primitives 2015-08-03 10:05:58 +02:00
processor.h s390/sclp: convert early sclp console code to C 2015-07-29 09:11:39 +02:00
ptrace.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
qdio.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
reset.h s390: add SMT support 2015-01-22 12:16:01 +01:00
runtime_instr.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
rwsem.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
schid.h UAPI: (Scripted) Disintegrate arch/s390/include/asm 2012-10-09 09:47:31 +01:00
sclp.h s390/sclp: convert early sclp console code to C 2015-07-29 09:11:39 +02:00
scsw.h s390: add eadm related structures 2012-09-26 15:44:57 +02:00
seccomp.h
sections.h
segment.h
serial.h s390: convert interrupt handling to use generic hardirq 2013-08-22 12:20:04 +02:00
setup.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
sfp-machine.h
sfp-util.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
shmparam.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
signal.h s390: switch to generic old sigaction() 2013-02-03 18:16:14 -05:00
sigp.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2015-02-11 17:42:32 -08:00
smp.h s390/kdump: fix compile for !SMP 2015-06-29 10:13:11 +02:00
sparsemem.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
spinlock_types.h s390/rwlock: use directed yield for write-locked rwlocks 2014-09-25 10:52:05 +02:00
spinlock.h s390/cmpxchg: use compiler builtins 2014-11-03 13:29:47 +01:00
string.h lib/string.c: remove strnicmp() 2015-02-12 18:54:14 -08:00
switch_to.h s390/kernel: remove save_fpu_regs() parameter and use __LC_CURRENT instead 2015-08-03 10:04:37 +02:00
syscall.h s390/syscalls: simplify syscall_get_arch() 2015-03-30 13:26:07 +02:00
sysinfo.h Fairly small update, but there are some interesting new features. 2015-02-13 09:55:09 -08:00
termios.h UAPI: (Scripted) Disintegrate arch/s390/include/asm 2012-10-09 09:47:31 +01:00
thread_info.h Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
timex.h s390: time: Provide read_boot_clock64() and read_persistent_clock64() 2015-05-22 10:36:29 -07:00
tlb.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
tlbflush.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
topology.h s390/numa: add core infrastructure 2015-08-03 18:40:25 +02:00
types.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
uaccess.h mm/uaccess, mm/fault: Clarify that uaccess may only sleep if pagefaults are enabled 2015-05-19 08:39:14 +02:00
unaligned.h
unistd.h s390: wire up separate socketcalls system calls 2015-09-18 11:16:53 +02:00
uprobes.h s390/uprobes: architecture backend for uprobes 2014-09-25 10:52:17 +02:00
user.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
vdso.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
vga.h vga: compile fix, disable vga for s390 2012-11-30 17:47:28 +01:00
vtime.h vtime: Describe overriden functions in dedicated arch headers 2013-08-14 17:14:53 +02:00
vtimer.h s390/idle: consolidate idle functions and definitions 2014-10-09 09:14:03 +02:00
vx-insn.h s390/vx: add vector instruction support for older binutils versions 2015-07-22 09:58:01 +02:00
xor.h