History log of /linux-master/arch/um/drivers/cow_user.c
Revision Date Author Comments
# 853bc0ab 05-Nov-2019 Arnd Bergmann <arnd@arndb.de>

um: ubd: use 64-bit time_t where possible

The ubd code suffers from a possible y2038 overflow on 32-bit
architectures, both for the cow header and the os_file_modtime()
function.

Replace time_t with time64_t to extend the ubd_kern side as much
as possible.

Whether this makes a difference for the user side depends on
the host libc implementation that may use either 32-bit or 64-bit
time_t.

For the cow file format, the header contains an unsigned 32-bit
timestamp, which is good until y2106, passing this through a
'long long' gives us a consistent interpretation between 32-bit
and 64-bit um kernels.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# dbddf429 25-Aug-2019 Alex Dewar <alex.dewar@gmx.co.uk>

um: Add SPDX headers for files in arch/um/drivers

Convert files to use SPDX header. All files are licensed under the GPLv2.

Signed-off-by: Alex Dewar <alex.dewar@gmx.co.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>


# d824d063 05-Apr-2012 Al Viro <viro@zeniv.linux.org.uk>

um: switch cow_user.h to htobe{32,64}/betoh{32,64}

... rather than open-coding the 64bit versions. endian.h has those guys.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>


# 7a99ae7c 25-Jul-2011 Vitaliy Ivanov <vitalivanov@gmail.com>

uml: cow_user.c warning corrections

Fix this warning:

arch/um/drivers/cow_user.c: In function `absolutize':
arch/um/drivers/cow_user.c:189:7: warning: ignoring return value of `chdir', declared with attribute warn_unused_result

[richard@nod.at: happens only with -D_FORTIFY_SOURCE=2]
Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# cb8fa61c 16-Oct-2007 Jeff Dike <jdike@addtoit.com>

uml: arch/um/drivers formatting

Style fixes for the rest of the drivers. arch/um/drivers should be pretty
CodingStyle-compliant now.

Except for the ubd driver, which will have to be treated separately.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# b15fb6b1 01-May-2006 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

[PATCH] uml: fix patch mismerge

I sent a patch, it was applied as cda402b283c34a24b091f78eee116963e9494762,
then it was applied again as 181ae4005d0a4010802be534d929b38c42b9ac06 by
mistake. But while the 1st time it modified (correctly) cow_header_v3, the
2nd it modified cow_header_v3_broken.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 181ae400 18-Apr-2006 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

[PATCH] uml: make 64-bit COW files compatible with 32-bit ones

This is the minimal fix to make 64-bit UML binaries create 32-bit
compatible COW files and read them.

I've indeed tested that current code doesn't do this - the code gets
SIGFPE for a division by a value read at the wrong place, where 0 is
found.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 6dad2d3f 10-Apr-2006 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

[PATCH] uml: fix 2 harmless cast warnings for 64-bit

Fix two harmless warnings in 64-bit compilation (the 2nd doesn't trigger for
now because of a missing __attribute((format)) for cow_printf, but next
patches fix that).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# f2ea3940 10-Apr-2006 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

[PATCH] uml: safe migration path to the correct V3 COW format

- Correct the layout of all header versions - make all them well-specified
for any external event. As we don't have 1-byte or 2-byte wide fields, the
32-bit layout (historical one) has no extra padding, so we can safely add
__attribute__((packed)).

- Add detection and reading of the broken 64-bit COW format which has been
around for a while - to allow safe migration to the correct 32-bit format.
Safe detection is possible, thanks to some luck with the existing format,
and it works in practice.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# cda402b2 10-Apr-2006 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

[PATCH] uml: make 64-bit COW files compatible with 32-bit ones

This is the minimal fix to make 64-bit UML binaries create 32-bit compatible
COW files and read them. I've indeed tested that current code doesn't do this
- the code gets SIGFPE for a division by a value read at the wrong place,
where 0 is found.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# fe1db50c 24-Feb-2006 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

[PATCH] uml: tidying COW code

Improve (especially for coherence) some prototypes, and return code of
init_cow_file in error case - for a short write return -EINVAL, otherwise
return the error we got!

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 31bc5a33 24-Feb-2006 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

[PATCH] uml: correct error messages in COW driver

Improve some error messages in the COW driver, and say V3, not V2, when
talking about V3 format. Also resync with our userspace code utility a bit
more.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 028c0cc1 09-Oct-2005 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

[PATCH] uml: cleanup byte order macros for COW driver

After restoring the existing code, make it work also when included in
kernelspace code (which isn't currently the case, but at least this will prevent
people from "fixing" it as just happened).
Whitespace is fixed in next patch - it cluttered the diff too much.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!