Age | Commit message (Collapse) | Author | Files | Lines |
|
Whilst debugging a remote crash, I noticed that show_pte is unhelpful
when it comes to describing the structure of the page table being walked.
This is easily fixed by printing out the page table (swapper vs user),
page size and virtual address size when displaying the PGD address.
Acked-by: Mark Rutland <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
|
|
Print out the name of the file associated with the vma that faulted.
This is usually the executable or shared library name. We already print
out the task name, but also printing the library name is useful for
pinpointing bugs to libraries.
Also print the base address and size of the vma, which together with the
PC (printed by __show_regs) gives the offset into the library.
Fault prints now look like:
test[2361]: unhandled level 2 translation fault (11) at 0x00000012, esr 0x92000006, in libfoo.so[ffffa0145000+1000]
This is already done on x86, for more details see commit 03252919b798
("x86: print which shared library/executable faulted in segfault etc.
messages v3").
Acked-by: Mark Rutland <[email protected]>
Signed-off-by: Kristina Martsenko <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
|
|
When we take a fault from EL0 that can't be handled, we print out the
page table entries associated with the faulting address. This allows
userspace to print out any current page table entries, including kernel
(TTBR1) entries. Exposing kernel mappings like this could pose a
security risk, so don't print out page table information on EL0 faults.
(But still print it out for EL1 faults.) This also follows the same
behaviour as x86, printing out page table entries on kernel mode faults
but not user mode faults.
Acked-by: Mark Rutland <[email protected]>
Signed-off-by: Kristina Martsenko <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
|
|
When we take a fault that can't be handled, we print out the page table
entries associated with the faulting address. In some cases we currently
print out the wrong entries. For a faulting TTBR1 address, we sometimes
print out TTBR0 table entries instead, and for a faulting TTBR0 address
we sometimes print out TTBR1 table entries. Fix this by choosing the
tables based on the faulting address.
Acked-by: Mark Rutland <[email protected]>
Signed-off-by: Kristina Martsenko <[email protected]>
[will: zero-extend addrs to 64-bit, don't walk swapper w/ TTBR0 addr]
Signed-off-by: Will Deacon <[email protected]>
|
|
Fix the compile after the switch to the UUID API in commit f4c19ac9
("thermal: int340x_thermal: Switch to use new generic UUID API").
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
There are new types and helpers that are supposed to be used in
new code.
As a preparation to get rid of legacy types and API functions do
the conversion here.
The conversion fixes a potential bug in int340x_thermal as well
since we have to use memcmp() on binary data.
Acked-by: Zhang Rui <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
Without this the build will fail for !CONFIG_ACPI builds on x86.
Fixes: 94116f81 ("ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()")
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
Currently, dynamic ftrace support in the arm64 kernel assumes that all
core kernel code is within range of ordinary branch instructions that
occur in module code, which is usually the case, but is no longer
guaranteed now that we have support for module PLTs and address space
randomization.
Since on arm64, all patching of branch instructions involves function
calls to the same entry point [ftrace_caller()], we can emit the modules
with a trampoline that has unlimited range, and patch both the trampoline
itself and the branch instruction to redirect the call via the trampoline.
Signed-off-by: Ard Biesheuvel <[email protected]>
[will: minor clarification to smp_wmb() comment]
Signed-off-by: Will Deacon <[email protected]>
|
|
When turning branch instructions into NOPs, we attempt to validate the
action by comparing the old value at the call site with the opcode of
a direct relative branch instruction pointing at the old target.
However, these call sites are statically initialized to call _mcount(),
and may be redirected via a PLT entry if the module is loaded far away
from the kernel text, leading to false negatives and spurious errors.
So skip the validation if CONFIG_ARM64_MODULE_PLTS is configured.
Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
|
|
acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
bytes. Instead we convert them to use guid_t type. At the same time we
convert current users.
acpi_str_to_uuid() becomes useless after the conversion and it's safe to
get rid of it.
Acked-by: Rafael J. Wysocki <[email protected]>
Cc: Borislav Petkov <[email protected]>
Acked-by: Dan Williams <[email protected]>
Cc: Amir Goldstein <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Reviewed-by: Jani Nikula <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Cc: Ben Skeggs <[email protected]>
Acked-by: Benjamin Tissoires <[email protected]>
Acked-by: Joerg Roedel <[email protected]>
Acked-by: Adrian Hunter <[email protected]>
Cc: Yisen Zhuang <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Acked-by: Mathias Nyman <[email protected]>
Reviewed-by: Heikki Krogerus <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
Adjust vdso_{start|end} to be char arrays to avoid compile-time analysis
that flags "too large" memcmp() calls with CONFIG_FORTIFY_SOURCE.
Cc: Jisheng Zhang <[email protected]>
Acked-by: Catalin Marinas <[email protected]>
Suggested-by: Mark Rutland <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
|
|
There are new types and helpers that are supposed to be used in new code.
As a preparation to get rid of legacy types and API functions do
the conversion here.
Cc: Borislav Petkov <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
There are new types and helpers that are supposed to be used in new code.
As a preparation to get rid of legacy types and API functions do
the conversion here.
Acked-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
There are new types and helpers that are supposed to be used in new code.
As a preparation to get rid of legacy types and API functions do
the conversion here.
Cc: Borislav Petkov <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
There are new types and helpers that are supposed to be used in new code.
As a preparation to get rid of legacy types and API functions do
the conversion here.
Reviewed-by: Dan Williams <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
I'll keep maintaining whatever little changed we need here, with Andy as
my designated reviewer.
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
This is used by overlayfs to encode intrasystem unique file handles.
Suggested-by: Miklos Szeredi <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: Amir Goldstein <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
And the uuid helpers.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
For some file systems we still memcpy into it, but in various places this
already allows us to use the proper uuid helpers. More to come..
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Acked-by: Mimi Zohar <[email protected]> (Changes to IMA/EVM)
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Acked-by: Mimi Zohar <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
This helper was only used by IMA of all things, which would get spurious
errors if CONFIG_BLOCK is disabled. Just opencode the call there.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Acked-by: Mimi Zohar <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
Use the common helper uuid_is_null() and remove the xfs specific
helper uuid_is_nil().
The common helper does not check for the NULL pointer value as
xfs helper did, but xfs code never calls the helper with a pointer
that can be NULL.
Conform comments and warning strings to use the term 'null uuid'
instead of 'nil uuid', because this is the terminology used by
lib/uuid.c and its users. It is also the terminology used in
userspace by libuuid and xfsprogs.
Signed-off-by: Amir Goldstein <[email protected]>
[hch: remove now unused uuid.[ch]]
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
Opencode uuid_getnodeuniq in the only caller, and directly decode
the uuid_t representation instead of using a structure cast for it.
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
And switch to use uuid_t instead of the old uuid_be type.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
Hoist the libnvdimm helper as an inline helper to linux/uuid.h
using an auxiliary const variable uuid_null in lib/uuid.c.
[hch: also add the guid variant. Both do the same but I'd like
to keep casts to a minimum]
The common helper uses the new abstract type uuid_t * instead of
u8 *.
Suggested-by: Christoph Hellwig <[email protected]>
Signed-off-by: Amir Goldstein <[email protected]>
[hch: added guid_is_null]
Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Dan Williams <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
These helper are used to compare and copy two uuid_t type objects.
Signed-off-by: Amir Goldstein <[email protected]>
[hch: also provide the respective guid_ versions]
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
These are only used in uuid.c and vsprintf.c and aren't something modules
should use directly.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
Our "little endian" UUID really is a Wintel GUID, so rename it and its
helpers such (guid_t). The big endian UUID is the only true one, so
give it the name uuid_t. The uuid_le and uuid_be names are retained for
now, but will hopefully go away soon. The exception to that are the _cmp
helpers that will be replaced by better primitives ASAP and thus don't
get the new names.
Also the _to_bin helpers are named to match the better named uuid_parse
routine in userspace.
Also remove the existing typedef in XFS that's now been superceeded by
the generic type name.
Signed-off-by: Christoph Hellwig <[email protected]>
[andy: also update the UUID_LE/UUID_BE macros including fallout]
Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
We don't use uuid_be and the UUID_BE constants in any uapi headers, so make
them private to the kernel.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
The md private helper uuid_equal() collides with a generic helper
of the same name.
Rename the md private helper to md_uuid_equal() and do the same for
md_sb_equal().
Signed-off-by: Amir Goldstein <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Shaohua Li <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
|
|
Use the generic Linux definition to implement our UUID type, this will
allow using more generic infrastructure in the future.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
|
|
uuid_t definition is about to change.
Signed-off-by: Amir Goldstein <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
|
|
This essentially is a partial revert of commit ff548773
("afs: Move UUID struct to linux/uuid.h") and moves struct uuid_v1 back into
fs/afs as struct afs_uuid. It however keeps it as big endian structure
so that we can use the normal uuid generation helpers when casting to/from
struct afs_uuid.
The V1 uuid intrepretation in struct form isn't really useful to the
rest of the kernel, and not really compatible to it either, so move it
back to AFS instead of polluting the global uuid.h.
Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: David Howells <[email protected]>
|
|
Commit 3fde2999fac5 ("arm64: cpufeature: Don't dump useless backtrace on
CPU_OUT_OF_SPEC") changed the cpufeature detection code to use add_taint
instead of WARN_TAINT_ONCE when detecting a heterogeneous system with
mismatched feature support. Unfortunately, this resulted in all systems
getting the taint, regardless of any feature mismatch.
This patch fixes the problem by conditionalising the taint on detecting
a feature mismatch.
Acked-by: Mark Rutland <[email protected]>
Reported-by: Heiner Kallweit <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
|
|
|
|
This fixes a problem with reading files larger than 2GB from a UFS-2
file system:
https://bugzilla.kernel.org/show_bug.cgi?id=195721
The incorrect UFS s_maxsize limit became a problem as of commit
c2a9737f45e2 ("vfs,mm: fix a dead loop in truncate_inode_pages_range()")
which started using s_maxbytes to avoid a page index overflow in
do_generic_file_read().
That caused files to be truncated on UFS-2 file systems because the
default maximum file size is 2GB (MAX_NON_LFS) and UFS didn't update it.
Here I simply increase the default to a common value used by other file
systems.
Signed-off-by: Richard Narron <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Will B <[email protected]>
Cc: Theodore Ts'o <[email protected]>
Cc: <[email protected]> # v4.9 and backports of c2a9737f45e2
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Pull NFS client bugfixes from Trond Myklebust:
"Bugfixes include:
- Fix a typo in commit e092693443b ("NFS append COMMIT after
synchronous COPY") that breaks copy offload
- Fix the connect error propagation in xs_tcp_setup_socket()
- Fix a lock leak in nfs40_walk_client_list
- Verify that pNFS requests lie within the offset range of the layout
segment"
* tag 'nfs-for-4.12-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
nfs: Mark unnecessarily extern functions as static
SUNRPC: ensure correct error is reported by xs_tcp_setup_socket()
NFSv4.0: Fix a lock leak in nfs40_walk_client_list
pnfs: Fix the check for requests in range of layout segment
xprtrdma: Delete an error message for a failed memory allocation in xprt_rdma_bc_setup()
pNFS/flexfiles: missing error code in ff_layout_alloc_lseg()
NFS fix COMMIT after COPY
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty fix from Greg KH:
"Here is a single tty core fix for 4.12-rc4. It reverts a patch that a
lot of people reported as causing lockdep and other warnings.
Right after I reverted this in my tree, it seems like another
"correct" fix might have shown up, but it's too late in the release
cycle to be messing with tty core locking, so let's just revert this
for now to go back how things always have been and try it again for
4.13.
This has not been in linux-next as I only reverted it a few hours ago"
* tag 'tty-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
Revert "tty: fix port buffer locking"
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem fixes from Dmitry Torokhov:
- a couple of regression fixes in synaptics and axp20x-pek drivers
- try to ease transition from PS/2 to RMI for Synaptics touchpad users
by ensuring we do not try to activate RMI mode when RMI SMBus support
is not enabled, and nag users a bit to enable it
- plus a couple of other changes that seemed worthwhile for this
release
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: axp20x-pek - switch to acpi_dev_present and check for ACPI0011 too
Input: axp20x-pek - only check for "INTCFD9" ACPI device on Cherry Trail
Input: tm2-touchkey - use LEN_ON as boolean value instead of LED_FULL
Input: synaptics - tell users to report when they should be using rmi-smbus
Input: synaptics - warn the users when there is a better mode
Input: synaptics - keep PS/2 around when RMI4_SMB is not enabled
Input: synaptics - clear device info before filling in
Input: silead - disable interrupt during suspend
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC fixlet from Alexandre Belloni:
"A single patch, not really a fix but I don't think there is any reason
to delay it.
Change the mailing list address"
* tag 'rtc-4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
MAINTAINERS: update RTC mailing list
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"This is nine fixes, seven of which are for the qedi driver (new as of
4.10) the other two are a use after free in the cxgbi drivers and a
potential NULL dereference in the rdac device handler"
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: libcxgbi: fix skb use after free
scsi: qedi: Fix endpoint NULL panic during recovery.
scsi: qedi: set max_fin_rt default value
scsi: qedi: Set firmware tcp msl timer value.
scsi: qedi: Fix endpoint NULL panic in qedi_set_path.
scsi: qedi: Set dma_boundary to 0xfff.
scsi: qedi: Correctly set firmware max supported BDs.
scsi: qedi: Fix bad pte call trace when iscsiuio is stopped.
scsi: scsi_dh_rdac: Use ctlr directly in rdac_failover_get()
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
Pull rdma fixes from Doug Ledford:
"For the most part this is just a minor -rc cycle for the rdma
subsystem. Even given that this is all of the -rc patches since the
merge window closed, it's still only about 25 patches:
- Multiple i40iw, nes, iw_cxgb4, hfi1, qib, mlx4, mlx5 fixes
- A few upper layer protocol fixes (IPoIB, iSER, SRP)
- A modest number of core fixes"
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (26 commits)
RDMA/SA: Fix kernel panic in CMA request handler flow
RDMA/umem: Fix missing mmap_sem in get umem ODP call
RDMA/core: not to set page dirty bit if it's already set.
RDMA/uverbs: Declare local function static and add brackets to sizeof
RDMA/netlink: Reduce exposure of RDMA netlink functions
RDMA/srp: Fix NULL deref at srp_destroy_qp()
RDMA/IPoIB: Limit the ipoib_dev_uninit_default scope
RDMA/IPoIB: Replace netdev_priv with ipoib_priv for ipoib_get_link_ksettings
RDMA/qedr: add null check before pointer dereference
RDMA/mlx5: set UMR wqe fence according to HCA cap
net/mlx5: Define interface bits for fencing UMR wqe
RDMA/mlx4: Fix MAD tunneling when SRIOV is enabled
RDMA/qib,hfi1: Fix MR reference count leak on write with immediate
RDMA/hfi1: Defer setting VL15 credits to link-up interrupt
RDMA/hfi1: change PCI bar addr assignments to Linux API functions
RDMA/hfi1: fix array termination by appending NULL to attr array
RDMA/iw_cxgb4: fix the calculation of ipv6 header size
RDMA/iw_cxgb4: calculate t4_eq_status_entries properly
RDMA/iw_cxgb4: Avoid touch after free error in ARP failure handlers
RDMA/nes: ACK MPA Reply frame
...
|
|
This reverts commit 925bb1ce47f429f69aad35876df7ecd8c53deb7e.
It causes lots of warnings and problems so for now, let's just revert
it.
Reported-by: <[email protected]>
Reported-by: Russell King <[email protected]>
Reported-by: Sergey Senozhatsky <[email protected]>
Reported-by: Geert Uytterhoeven <[email protected]>
Reported-by: Jiri Slaby <[email protected]>
Reported-by: Andrey Konovalov <[email protected]>
Acked-by: Vegard Nossum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
nfs_initialise_sb() and nfs_clone_super() are declared as extern even
though they are used only in fs/nfs/super.c. Mark them as static.
Also remove explicit 'inline' directive from nfs_initialise_sb() and
leave it upto compiler to decide whether inlining is worth it.
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon fixes from Guenter Roeck:
"A couple of patches for the aspeed pwm fan driver"
* tag 'hwmon-for-linus-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (aspeed-pwm-tacho) make fan/pwm names start with index 1
hwmon: (aspeed-pwm-tacho) Call of_node_put() on a node not claimed
hwmon: (aspeed-pwm-tacho) On read failure return -ETIMEDOUT
hwmon: (aspeed-pwm-tacho) Select REGMAP
|