23 Jun, 2017
6 commits
-
Currently there are trace events for the various RAS
errors with the exception of ARM processor type errors.
Add a new trace event for such errors so that the user
will know when they occur. These trace events are
consistent with the ARM processor error section type
defined in UEFI 2.6 spec section N.2.4.4.Signed-off-by: Tyler Baicar
Acked-by: Steven Rostedt
Reviewed-by: Xie XiuQi
Signed-off-by: Will Deacon -
The UEFI spec includes non-standard section type support in the
Common Platform Error Record. This is defined in section N.2.3 of
UEFI version 2.5.Currently if the CPER section's type (UUID) does not match any
section type that the kernel knows how to parse, a trace event is
not generated.Generate a trace event which contains the raw error data for
non-standard section type error records.Signed-off-by: Tyler Baicar
CC: Jonathan (Zhixiong) Zhang
Tested-by: Shiju Jose
Signed-off-by: Will Deacon -
UEFI spec allows for non-standard section in Common Platform Error
Record. This is defined in section N.2.3 of UEFI version 2.5.Currently if the CPER section's type (UUID) does not match with
one of the section types that the kernel knows how to parse, the
section is skipped. Therefore, user is not able to see
such CPER data, for instance, error record of non-standard section.This change prints out the raw data in hex in the dmesg buffer so
that non-standard sections are reported to the user. Non-standard
section type errors should be reported to the user because these
can include errors which are vendor specific. The data length is
taken from Error Data length field of Generic Error Data Entry.The following is a sample output from dmesg:
Hardware error from APEI Generic Hardware Error Source: 2
It has been corrected by h/w and requires no further action
event severity: corrected
time: precise 2017-03-15 20:37:35
Error 0, type: corrected
section type: unknown, d2e2621c-f936-468d-0d84-15a4ed015c8b
section length: 0x238
00000000: 4d415201 4d492031 453a4d45 435f4343 .RAM1 IMEM:ECC_C
00000010: 53515f45 44525f42 00000000 00000000 E_QSB_RD........
00000020: 00000000 00000000 00000000 00000000 ................
00000030: 00000000 00000000 01010000 01010000 ................
00000040: 00000000 00000000 00000005 00000000 ................
00000050: 01010000 00000000 00000001 00dddd00 ................
...The raw data from the error can then be decoded using vendor
specific tools.Signed-off-by: Tyler Baicar
CC: Jonathan (Zhixiong) Zhang
Reviewed-by: James Morse
Signed-off-by: Will Deacon -
Even if an error status block's severity is fatal, the kernel does not
honor the severity level and panic.With the firmware first model, the platform could inform the OS about a
fatal hardware error through the non-NMI GHES notification type. The OS
should panic when a hardware error record is received with this
severity.Call panic() after CPER data in error status block is printed if
severity is fatal, before each error section is handled.Signed-off-by: Jonathan (Zhixiong) Zhang
Signed-off-by: Tyler Baicar
Reviewed-by: James Morse
Signed-off-by: Will Deacon -
ARM APEI extension proposal added SEA (Synchronous External Abort)
notification type for ARMv8.
Add a new GHES error source handling function for SEA. If an error
source's notification type is SEA, then this function can be registered
into the SEA exception handler. That way GHES will parse and report
SEA exceptions when they occur.
An SEA can interrupt code that had interrupts masked and is treated as
an NMI. To aid this the page of address space for mapping APEI buffers
while in_nmi() is always reserved, and ghes_ioremap_pfn_nmi() is
changed to use the helper methods to find the prot_t to map with in
the same way as ghes_ioremap_pfn_irq().Signed-off-by: Tyler Baicar
CC: Jonathan (Zhixiong) Zhang
Reviewed-by: James Morse
Acked-by: Catalin Marinas
Signed-off-by: Will Deacon -
SEA exceptions are often caused by an uncorrected hardware
error, and are handled when data abort and instruction abort
exception classes have specific values for their Fault Status
Code.
When SEA occurs, before killing the process, report the error
in the kernel logs.
Update fault_info[] with specific SEA faults so that the
new SEA handler is used.Signed-off-by: Tyler Baicar
CC: Jonathan (Zhixiong) Zhang
Reviewed-by: James Morse
Acked-by: Catalin Marinas
[will: use NULL instead of 0 when assigning si_addr]
Signed-off-by: Will Deacon
22 Jun, 2017
4 commits
-
Add support for ARM Common Platform Error Record (CPER).
UEFI 2.6 specification adds support for ARM specific
processor error information to be reported as part of the
CPER records. This provides more detail on for processor error logs.Signed-off-by: Tyler Baicar
CC: Jonathan (Zhixiong) Zhang
Reviewed-by: James Morse
Reviewed-by: Ard Biesheuvel
Signed-off-by: Will Deacon -
The ACPI 6.1 spec added a timestamp to the generic error data
entry structure. Print the timestamp out when printing out the
error information.Signed-off-by: Tyler Baicar
CC: Jonathan (Zhixiong) Zhang
Signed-off-by: Will Deacon -
The ACPI 6.1 spec adds a new revision of the generic error data
entry structure. Add support to handle the new structure as well
as properly verify and iterate through the generic data entries.Signed-off-by: Tyler Baicar
CC: Jonathan (Zhixiong) Zhang
Signed-off-by: Will Deacon -
A RAS (Reliability, Availability, Serviceability) controller
may be a separate processor running in parallel with OS
execution, and may generate error records for consumption by
the OS. If the RAS controller produces multiple error records,
then they may be overwritten before the OS has consumed them.The Generic Hardware Error Source (GHES) v2 structure
introduces the capability for the OS to acknowledge the
consumption of the error record generated by the RAS
controller. A RAS controller supporting GHESv2 shall wait for
the acknowledgment before writing a new error record, thus
eliminating the race condition.Add support for parsing of GHESv2 sub-tables as well.
Signed-off-by: Tyler Baicar
CC: Jonathan (Zhixiong) Zhang
Reviewed-by: James Morse
Signed-off-by: Will Deacon
21 Jun, 2017
1 commit
-
Pull in uuid-types branch from Christoph, since this conflicts heavily
with the ACPI/APEI RAS work from Tyler Baicer and was created as an
immutable branch to avoid conflicts with ACPI development.
09 Jun, 2017
2 commits
-
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
-
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
Signed-off-by: Andy Shevchenko
Signed-off-by: Christoph Hellwig
08 Jun, 2017
1 commit
-
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
07 Jun, 2017
1 commit
-
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
Cc: Borislav Petkov
Acked-by: Dan Williams
Cc: Amir Goldstein
Reviewed-by: Jarkko Sakkinen
Reviewed-by: Jani Nikula
Acked-by: Jani Nikula
Cc: Ben Skeggs
Acked-by: Benjamin Tissoires
Acked-by: Joerg Roedel
Acked-by: Adrian Hunter
Cc: Yisen Zhuang
Acked-by: Bjorn Helgaas
Acked-by: Felipe Balbi
Acked-by: Mathias Nyman
Reviewed-by: Heikki Krogerus
Acked-by: Mark Brown
Signed-off-by: Andy Shevchenko
Signed-off-by: Christoph Hellwig
06 Jun, 2017
4 commits
-
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
Signed-off-by: Andy Shevchenko
Signed-off-by: Christoph Hellwig -
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
Signed-off-by: Andy Shevchenko
Signed-off-by: Christoph Hellwig -
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
Signed-off-by: Andy Shevchenko
Signed-off-by: Christoph Hellwig -
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
Signed-off-by: Andy Shevchenko
Signed-off-by: Christoph Hellwig
05 Jun, 2017
21 commits
-
I'll keep maintaining whatever little changed we need here, with Andy as
my designated reviewer.Signed-off-by: Christoph Hellwig
-
This is used by overlayfs to encode intrasystem unique file handles.
Suggested-by: Miklos Szeredi
Cc: Hugh Dickins
Cc: Andrew Morton
Signed-off-by: Amir Goldstein
Signed-off-by: Christoph Hellwig -
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko -
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko -
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko -
And the uuid helpers.
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko -
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko -
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
Reviewed-by: Amir Goldstein
Acked-by: Mimi Zohar (Changes to IMA/EVM)
Reviewed-by: Andy Shevchenko -
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Acked-by: Mimi Zohar
Reviewed-by: Andy Shevchenko -
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
Reviewed-by: Amir Goldstein
Acked-by: Mimi Zohar
Reviewed-by: Andy Shevchenko -
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
[hch: remove now unused uuid.[ch]]
Signed-off-by: Christoph Hellwig
Reviewed-by: Brian Foster
Reviewed-by: Andy Shevchenko -
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
-
And switch to use uuid_t instead of the old uuid_be type.
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko -
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
Signed-off-by: Amir Goldstein
[hch: added guid_is_null]
Signed-off-by: Christoph Hellwig
Acked-by: Dan Williams
Reviewed-by: Andy Shevchenko -
These helper are used to compare and copy two uuid_t type objects.
Signed-off-by: Amir Goldstein
[hch: also provide the respective guid_ versions]
Signed-off-by: Christoph Hellwig
Reviewed-by: Andy Shevchenko -
These are only used in uuid.c and vsprintf.c and aren't something modules
should use directly.Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko -
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
[andy: also update the UUID_LE/UUID_BE macros including fallout]
Signed-off-by: Andy Shevchenko
Reviewed-by: Amir Goldstein
Reviewed-by: Darrick J. Wong
Reviewed-by: Andy ShevchenkoSigned-off-by: Christoph Hellwig
-
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
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko -
Signed-off-by: Christoph Hellwig
-
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
Signed-off-by: Christoph Hellwig
Reviewed-by: Shaohua Li
Reviewed-by: Andy Shevchenko -
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
Reviewed-by: Amir Goldstein
Reviewed-by: Brian Foster
Reviewed-by: Andy Shevchenko
Reviewed-by: Darrick J. Wong