* [PATCH] Update bits/siginfo.h with Linux hwpoison SIGBUS changes
@ 2013-05-07 4:47 Edjunior Barbosa Machado
2013-05-14 18:32 ` Edjunior Barbosa Machado
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Edjunior Barbosa Machado @ 2013-05-07 4:47 UTC (permalink / raw)
To: libc-alpha, libc-ports; +Cc: naveen.n.rao
This patch adds new SIGBUS error codes for hardware poison signals, syncing
with the current kernel headers (v3.9). It also adds si_trapno field for alpha.
Ok?
--
Edjunior
ChangeLog.alpha:
2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/alpha/bits/siginfo.h (_sigfault): Add
si_trapno and si_addr_lsb.
(si_trapno, si_addr_lsb): Define new macros.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
ChangeLog.ia64:
2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (_sigfault): Add
si_addr_lsb.
(si_addr_lsb): Define new macro.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
ChangeLog.mips:
2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/mips/bits/siginfo.h (_sigfault): Add
si_addr_lsb.
(si_addr_lsb): Define new macro.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
ChangeLog.tile:
2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/tile/bits/siginfo.h (_sigfault): Add
si_addr_lsb.
(si_addr_lsb): Define new macro.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
ChangeLog:
2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/bits/siginfo.h (_sigfault): Add si_addr_lsb.
(si_addr_lsb): Define new macro.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise.
* sysdeps/unix/sysv/linux/x86/bits/siginfo.h: Likewise.
---
ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 10 +++++++++-
ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h | 8 +++++++-
ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 8 +++++++-
ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h | 8 +++++++-
sysdeps/unix/sysv/linux/bits/siginfo.h | 8 +++++++-
sysdeps/unix/sysv/linux/sparc/bits/siginfo.h | 8 +++++++-
sysdeps/unix/sysv/linux/x86/bits/siginfo.h | 8 +++++++-
7 files changed, 51 insertions(+), 7 deletions(-)
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
index 1277885..71e4424 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -89,6 +89,8 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ int si_trapno; /* TRAP # which caused the signal */
+ short si_addr_lsb; /* Valid LSB of the reported address */
} _sigfault;
/* SIGPOLL. */
@@ -121,6 +123,8 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_trapno _sifields._sigfault.si_trapno
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -211,8 +215,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
index 7887b45..33a41a6 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
+++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
@@ -94,6 +94,7 @@ typedef struct siginfo
int _si_imm;
unsigned int _si_flags;
unsigned long int _si_isr;
+ short si_addr_lsb; /* Valid LSB of the reported address */
} _sigfault;
/* SIGPOLL. */
@@ -118,6 +119,7 @@ typedef struct siginfo
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
@@ -233,8 +235,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 56ae34c..150f2a6 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -98,6 +98,7 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ short si_addr_lsb; /* Valid LSB of the reported address */
} _sigfault;
/* SIGPOLL. */
@@ -122,6 +123,7 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
@@ -209,8 +211,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
index 4ad1a5d..81d9141 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
+++ b/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
@@ -96,6 +96,7 @@ typedef struct
{
void *si_addr; /* Faulting insn/memory ref. */
int si_trapno; /* TRAP # which caused the signal */
+ short si_addr_lsb; /* Valid LSB of the reported address */
} _sigfault;
/* SIGPOLL. */
@@ -129,6 +130,7 @@ typedef struct
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
# define si_trapno _sifields._sigfault.si_trapno
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -223,8 +225,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
index a67bd5c..fcd27c3 100644
--- a/sysdeps/unix/sysv/linux/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
@@ -95,6 +95,7 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ short si_addr_lsb; /* Valid LSB of the reported address */
} _sigfault;
/* SIGPOLL. */
@@ -127,6 +128,7 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -217,8 +219,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
index 85a5462..f414aaf 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
@@ -96,6 +96,7 @@ typedef struct
{
void *si_addr; /* Faulting insn/memory ref. */
int si_trapno;
+ short si_addr_lsb; /* Valid LSB of the reported address */
} _sigfault;
/* SIGPOLL. */
@@ -129,6 +130,7 @@ typedef struct
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
# define si_trapno _sifields._sigfault.si_trapno
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -219,8 +221,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
index 48aef6d..044274d 100644
--- a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
@@ -107,6 +107,7 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ short si_addr_lsb; /* Valid LSB of the reported address */
} _sigfault;
/* SIGPOLL. */
@@ -139,6 +140,7 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -229,8 +231,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
--
1.7.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Update bits/siginfo.h with Linux hwpoison SIGBUS changes
2013-05-07 4:47 [PATCH] Update bits/siginfo.h with Linux hwpoison SIGBUS changes Edjunior Barbosa Machado
@ 2013-05-14 18:32 ` Edjunior Barbosa Machado
2013-05-14 19:38 ` Andreas Jaeger
2013-05-14 20:45 ` Carlos O'Donell
2 siblings, 0 replies; 8+ messages in thread
From: Edjunior Barbosa Machado @ 2013-05-14 18:32 UTC (permalink / raw)
To: libc-alpha, libc-ports; +Cc: naveen.n.rao
ping.
On 05/07/2013 01:45 AM, Edjunior Barbosa Machado wrote:
> This patch adds new SIGBUS error codes for hardware poison signals, syncing
> with the current kernel headers (v3.9). It also adds si_trapno field for alpha.
>
> Ok?
> --
> Edjunior
>
> ChangeLog.alpha:
> 2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
>
> * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h (_sigfault): Add
> si_trapno and si_addr_lsb.
> (si_trapno, si_addr_lsb): Define new macros.
> (BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
>
> ChangeLog.ia64:
> 2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
>
> * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (_sigfault): Add
> si_addr_lsb.
> (si_addr_lsb): Define new macro.
> (BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
>
> ChangeLog.mips:
> 2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
>
> * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (_sigfault): Add
> si_addr_lsb.
> (si_addr_lsb): Define new macro.
> (BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
>
> ChangeLog.tile:
> 2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
>
> * sysdeps/unix/sysv/linux/tile/bits/siginfo.h (_sigfault): Add
> si_addr_lsb.
> (si_addr_lsb): Define new macro.
> (BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
>
> ChangeLog:
> 2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
>
> * sysdeps/unix/sysv/linux/bits/siginfo.h (_sigfault): Add si_addr_lsb.
> (si_addr_lsb): Define new macro.
> (BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
> * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise.
> * sysdeps/unix/sysv/linux/x86/bits/siginfo.h: Likewise.
>
> ---
> ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 10 +++++++++-
> ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h | 8 +++++++-
> ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 8 +++++++-
> ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h | 8 +++++++-
> sysdeps/unix/sysv/linux/bits/siginfo.h | 8 +++++++-
> sysdeps/unix/sysv/linux/sparc/bits/siginfo.h | 8 +++++++-
> sysdeps/unix/sysv/linux/x86/bits/siginfo.h | 8 +++++++-
> 7 files changed, 51 insertions(+), 7 deletions(-)
>
> diff --git a/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
> index 1277885..71e4424 100644
> --- a/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
> +++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
> @@ -89,6 +89,8 @@ typedef struct
> struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> + int si_trapno; /* TRAP # which caused the signal */
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -121,6 +123,8 @@ typedef struct
> # define si_int _sifields._rt.si_sigval.sival_int
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> +# define si_trapno _sifields._sigfault.si_trapno
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
> # define si_call_addr _sifields._sigsys._call_addr
> @@ -211,8 +215,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
> diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
> index 7887b45..33a41a6 100644
> --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
> +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
> @@ -94,6 +94,7 @@ typedef struct siginfo
> int _si_imm;
> unsigned int _si_flags;
> unsigned long int _si_isr;
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -118,6 +119,7 @@ typedef struct siginfo
> # define si_int _sifields._rt.si_sigval.sival_int
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
>
> @@ -233,8 +235,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
> diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
> index 56ae34c..150f2a6 100644
> --- a/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
> +++ b/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
> @@ -98,6 +98,7 @@ typedef struct
> struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -122,6 +123,7 @@ typedef struct
> # define si_int _sifields._rt.si_sigval.sival_int
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
>
> @@ -209,8 +211,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
> diff --git a/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
> index 4ad1a5d..81d9141 100644
> --- a/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
> +++ b/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
> @@ -96,6 +96,7 @@ typedef struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> int si_trapno; /* TRAP # which caused the signal */
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -129,6 +130,7 @@ typedef struct
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> # define si_trapno _sifields._sigfault.si_trapno
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
> # define si_call_addr _sifields._sigsys._call_addr
> @@ -223,8 +225,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
> diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
> index a67bd5c..fcd27c3 100644
> --- a/sysdeps/unix/sysv/linux/bits/siginfo.h
> +++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
> @@ -95,6 +95,7 @@ typedef struct
> struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -127,6 +128,7 @@ typedef struct
> # define si_int _sifields._rt.si_sigval.sival_int
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
> # define si_call_addr _sifields._sigsys._call_addr
> @@ -217,8 +219,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
> diff --git a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
> index 85a5462..f414aaf 100644
> --- a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
> +++ b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
> @@ -96,6 +96,7 @@ typedef struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> int si_trapno;
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -129,6 +130,7 @@ typedef struct
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> # define si_trapno _sifields._sigfault.si_trapno
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
> # define si_call_addr _sifields._sigsys._call_addr
> @@ -219,8 +221,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
> diff --git a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
> index 48aef6d..044274d 100644
> --- a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
> +++ b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
> @@ -107,6 +107,7 @@ typedef struct
> struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -139,6 +140,7 @@ typedef struct
> # define si_int _sifields._rt.si_sigval.sival_int
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
> # define si_call_addr _sifields._sigsys._call_addr
> @@ -229,8 +231,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
>
--
Edjunior
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Update bits/siginfo.h with Linux hwpoison SIGBUS changes
2013-05-07 4:47 [PATCH] Update bits/siginfo.h with Linux hwpoison SIGBUS changes Edjunior Barbosa Machado
2013-05-14 18:32 ` Edjunior Barbosa Machado
@ 2013-05-14 19:38 ` Andreas Jaeger
2013-05-14 20:45 ` Carlos O'Donell
2 siblings, 0 replies; 8+ messages in thread
From: Andreas Jaeger @ 2013-05-14 19:38 UTC (permalink / raw)
To: Edjunior Barbosa Machado; +Cc: libc-alpha, libc-ports, naveen.n.rao
On 05/07/2013 06:45 AM, Edjunior Barbosa Machado wrote:
> This patch adds new SIGBUS error codes for hardware poison signals, syncing
> with the current kernel headers (v3.9). It also adds si_trapno field for alpha.
>
> Ok?
> [...]
> --- a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
> +++ b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
> @@ -107,6 +107,7 @@ typedef struct
> struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> + short si_addr_lsb; /* Valid LSB of the reported address */
We normally end comments with a "." and two spaces, see above.
Similar below and throughout the patch set. The code changes itself are
fine.
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -139,6 +140,7 @@ typedef struct
> # define si_int _sifields._rt.si_sigval.sival_int
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
> # define si_call_addr _sifields._sigsys._call_addr
> @@ -229,8 +231,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
The last two added comments have the same problem.
>
> /* `si_code' values for SIGTRAP signal. */
>
Could you update all the comments and resend, please?
Thanks,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Update bits/siginfo.h with Linux hwpoison SIGBUS changes
2013-05-07 4:47 [PATCH] Update bits/siginfo.h with Linux hwpoison SIGBUS changes Edjunior Barbosa Machado
2013-05-14 18:32 ` Edjunior Barbosa Machado
2013-05-14 19:38 ` Andreas Jaeger
@ 2013-05-14 20:45 ` Carlos O'Donell
2013-05-15 6:53 ` Edjunior Barbosa Machado
2 siblings, 1 reply; 8+ messages in thread
From: Carlos O'Donell @ 2013-05-14 20:45 UTC (permalink / raw)
To: Edjunior Barbosa Machado
Cc: libc-alpha, libc-ports, naveen.n.rao, Andreas Jaeger
On 05/07/2013 12:45 AM, Edjunior Barbosa Machado wrote:
> This patch adds new SIGBUS error codes for hardware poison signals, syncing
> with the current kernel headers (v3.9). It also adds si_trapno field for alpha.
Please be very very careful when doing something like this.
This is a potentially ABI changing event, adding elements to a public
structure like this requires an analysis to show the size of siginfo_t
didn't change.
You don't confirm that so I'll ask explicitly.
Did the size of siginfo_t change?
> Ok?
> --
> Edjunior
>
> ChangeLog.alpha:
> 2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
>
> * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h (_sigfault): Add
There is no such thing as _sigfault. There is `struct siginfo_t' and
within that there is _sifields._sifault.
I would write this as:
* sysdeps/unix/sysv/linux/alpha/bits/siginfo.h (_sigfault):
Add si_trapno and si_addr_lsb to _sifields.sifault.
> si_trapno and si_addr_lsb.
> (si_trapno, si_addr_lsb): Define new macros.
> (BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
>
> ChangeLog.ia64:
> 2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
>
> * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (_sigfault): Add
Likewise. (not repeated).
> si_addr_lsb.
> (si_addr_lsb): Define new macro.
> (BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
>
> ChangeLog.mips:
> 2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
>
> * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (_sigfault): Add
> si_addr_lsb.
> (si_addr_lsb): Define new macro.
> (BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
>
> ChangeLog.tile:
> 2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
>
> * sysdeps/unix/sysv/linux/tile/bits/siginfo.h (_sigfault): Add
> si_addr_lsb.
> (si_addr_lsb): Define new macro.
> (BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
>
> ChangeLog:
> 2013-05-07 Edjunior Machado <emachado@linux.vnet.ibm.com>
>
> * sysdeps/unix/sysv/linux/bits/siginfo.h (_sigfault): Add si_addr_lsb.
> (si_addr_lsb): Define new macro.
> (BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
> * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise.
> * sysdeps/unix/sysv/linux/x86/bits/siginfo.h: Likewise.
>
> ---
> ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 10 +++++++++-
> ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h | 8 +++++++-
> ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 8 +++++++-
> ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h | 8 +++++++-
> sysdeps/unix/sysv/linux/bits/siginfo.h | 8 +++++++-
> sysdeps/unix/sysv/linux/sparc/bits/siginfo.h | 8 +++++++-
> sysdeps/unix/sysv/linux/x86/bits/siginfo.h | 8 +++++++-
> 7 files changed, 51 insertions(+), 7 deletions(-)
>
> diff --git a/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
> index 1277885..71e4424 100644
> --- a/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
> +++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
> @@ -89,6 +89,8 @@ typedef struct
> struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> + int si_trapno; /* TRAP # which caused the signal */
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -121,6 +123,8 @@ typedef struct
> # define si_int _sifields._rt.si_sigval.sival_int
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> +# define si_trapno _sifields._sigfault.si_trapno
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
> # define si_call_addr _sifields._sigsys._call_addr
> @@ -211,8 +215,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
> diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
> index 7887b45..33a41a6 100644
> --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
> +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
> @@ -94,6 +94,7 @@ typedef struct siginfo
> int _si_imm;
> unsigned int _si_flags;
> unsigned long int _si_isr;
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -118,6 +119,7 @@ typedef struct siginfo
> # define si_int _sifields._rt.si_sigval.sival_int
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> +# define
si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
>
> @@ -233,8 +235,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
> diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
> index 56ae34c..150f2a6 100644
> --- a/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
> +++ b/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
> @@ -98,6 +98,7 @@ typedef struct
> struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -122,6 +123,7 @@ typedef struct
> # define si_int _sifields._rt.si_sigval.sival_int
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
>
> @@ -209,8 +211,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
> diff --git a/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
> index 4ad1a5d..81d9141 100644
> --- a/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
> +++ b/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
> @@ -96,6 +96,7 @@ typedef struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> int si_trapno; /* TRAP # which caused the signal */
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -129,6 +130,7 @@ typedef struct
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> # define si_trapno _sifields._sigfault.si_trapno
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
> # define si_call_addr _sifields._sigsys._call_addr
> @@ -223,8 +225,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
> diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
> index a67bd5c..fcd27c3 100644
> --- a/sysdeps/unix/sysv/linux/bits/siginfo.h
> +++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
> @@ -95,6 +95,7 @@ typedef struct
> struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -127,6 +128,7 @@ typedef struct
> # define si_int _sifields._rt.si_sigval.sival_int
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
> # define si_call_addr _sifields._sigsys._call_addr
> @@ -217,8 +219,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
> diff --git a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
> index 85a5462..f414aaf 100644
> --- a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
> +++ b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
> @@ -96,6 +96,7 @@ typedef struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> int si_trapno;
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -129,6 +130,7 @@ typedef struct
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> # define si_trapno _sifields._sigfault.si_trapno
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
> # define si_call_addr _sifields._sigsys._call_addr
> @@ -219,8 +221,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
> diff --git a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
> index 48aef6d..044274d 100644
> --- a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
> +++ b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
> @@ -107,6 +107,7 @@ typedef struct
> struct
> {
> void *si_addr; /* Faulting insn/memory ref. */
> + short si_addr_lsb; /* Valid LSB of the reported address */
> } _sigfault;
>
> /* SIGPOLL. */
> @@ -139,6 +140,7 @@ typedef struct
> # define si_int _sifields._rt.si_sigval.sival_int
> # define si_ptr _sifields._rt.si_sigval.sival_ptr
> # define si_addr _sifields._sigfault.si_addr
> +# define si_addr_lsb _sifields._sigfault.si_addr_lsb
> # define si_band _sifields._sigpoll.si_band
> # define si_fd _sifields._sigpoll.si_fd
> # define si_call_addr _sifields._sigsys._call_addr
> @@ -229,8 +231,12 @@ enum
> # define BUS_ADRALN BUS_ADRALN
> BUS_ADRERR, /* Non-existant physical address. */
> # define BUS_ADRERR BUS_ADRERR
> - BUS_OBJERR /* Object specific hardware error. */
> + BUS_OBJERR, /* Object specific hardware error. */
> # define BUS_OBJERR BUS_OBJERR
> + BUS_MCEERR_AR, /* Hardware memory error: action required */
> +# define BUS_MCEERR_AR BUS_MCEERR_AR
> + BUS_MCEERR_AO /* Hardware memory error: action optional */
Andreas already pointed out it shoudl be "/* Blah blah blah. */" (period + two spaces).
> +# define BUS_MCEERR_AO BUS_MCEERR_AO
> };
>
> /* `si_code' values for SIGTRAP signal. */
>
Cheers,
Carlos.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Update bits/siginfo.h with Linux hwpoison SIGBUS changes
2013-05-14 20:45 ` Carlos O'Donell
@ 2013-05-15 6:53 ` Edjunior Barbosa Machado
2013-05-17 0:43 ` Roland McGrath
0 siblings, 1 reply; 8+ messages in thread
From: Edjunior Barbosa Machado @ 2013-05-15 6:53 UTC (permalink / raw)
To: carlos; +Cc: aj, libc-alpha, libc-ports, naveen.n.rao
On 05/14/2013 05:45 PM, Carlos O'Donell wrote:
> Please be very very careful when doing something like this.
>
> This is a potentially ABI changing event, adding elements to a public
> structure like this requires an analysis to show the size of siginfo_t
> didn't change.
>
> You don't confirm that so I'll ask explicitly.
>
> Did the size of siginfo_t change?
Yes, I've checked for the struct sizes in the modified siginfo.h files and they
didn't change with the inclusion of the new fields. They are still below the
size of _sifields union.
I'm resending the patch with the comments fixed (and a nitpick in another
comment from tile/bits/siginfo.h). By the way, the ChangeLog entries are
repeated because they're going to different ChangeLog files.
Thanks Andreas and Carlos for the review.
--
Edjunior
ChangeLog.alpha:
2013-05-15 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/alpha/bits/siginfo.h (siginfo_t): Add
si_trapno and si_addr_lsb to _sifields.sigfault.
(si_trapno, si_addr_lsb): Define new macros.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
ChangeLog.ia64:
2013-05-15 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (siginfo_t): Add
si_addr_lsb to _sifields.sigfault.
(si_addr_lsb): Define new macro.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
ChangeLog.mips:
2013-05-15 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/mips/bits/siginfo.h (siginfo_t): Add
si_addr_lsb to _sifields.sifault.
(si_addr_lsb): Define new macro.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
ChangeLog.tile:
2013-05-15 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/tile/bits/siginfo.h (siginfo_t): Fix comment
formatting. Add si_addr_lsb to _sifields.sigfault.
(si_addr_lsb): Define new macro.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
ChangeLog:
2013-05-15 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/bits/siginfo.h (siginfo_t): Add si_addr_lsb
to _sifields.sigfault.
(si_addr_lsb): Define new macro.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise.
* sysdeps/unix/sysv/linux/x86/bits/siginfo.h: Likewise.
---
ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 10 +++++++++-
ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h | 8 +++++++-
ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 8 +++++++-
ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h | 10 ++++++++--
sysdeps/unix/sysv/linux/bits/siginfo.h | 8 +++++++-
sysdeps/unix/sysv/linux/sparc/bits/siginfo.h | 8 +++++++-
sysdeps/unix/sysv/linux/x86/bits/siginfo.h | 8 +++++++-
7 files changed, 52 insertions(+), 8 deletions(-)
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
index 1277885..7bfcb38 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -89,6 +89,8 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ int si_trapno; /* TRAP # which caused the signal. */
+ short si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -121,6 +123,8 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_trapno _sifields._sigfault.si_trapno
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -211,8 +215,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
index 7887b45..98b77f1 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
+++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
@@ -94,6 +94,7 @@ typedef struct siginfo
int _si_imm;
unsigned int _si_flags;
unsigned long int _si_isr;
+ short si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -118,6 +119,7 @@ typedef struct siginfo
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
@@ -233,8 +235,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 56ae34c..5e34677 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -98,6 +98,7 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ short si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -122,6 +123,7 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
@@ -209,8 +211,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
index 4ad1a5d..43a2f54 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
+++ b/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
@@ -95,7 +95,8 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
- int si_trapno; /* TRAP # which caused the signal */
+ int si_trapno; /* TRAP # which caused the signal. */
+ short si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -129,6 +130,7 @@ typedef struct
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
# define si_trapno _sifields._sigfault.si_trapno
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -223,8 +225,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
index a67bd5c..cfae0c9 100644
--- a/sysdeps/unix/sysv/linux/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
@@ -95,6 +95,7 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ short si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -127,6 +128,7 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -217,8 +219,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
index 85a5462..d4717dd 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
@@ -96,6 +96,7 @@ typedef struct
{
void *si_addr; /* Faulting insn/memory ref. */
int si_trapno;
+ short si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -129,6 +130,7 @@ typedef struct
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
# define si_trapno _sifields._sigfault.si_trapno
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -219,8 +221,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
index 48aef6d..a885918 100644
--- a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
@@ -107,6 +107,7 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ short si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -139,6 +140,7 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -229,8 +231,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
--
1.7.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Update bits/siginfo.h with Linux hwpoison SIGBUS changes
2013-05-15 6:53 ` Edjunior Barbosa Machado
@ 2013-05-17 0:43 ` Roland McGrath
2013-05-18 7:17 ` Edjunior Barbosa Machado
0 siblings, 1 reply; 8+ messages in thread
From: Roland McGrath @ 2013-05-17 0:43 UTC (permalink / raw)
To: Edjunior Barbosa Machado; +Cc: carlos, aj, libc-alpha, libc-ports, naveen.n.rao
Always write 'short int', never just 'short'. Otherwise these seem fine to
me (assuming they match the new kernel definitions).
The ports changes technically need pro forma sign-off from four
maintainers. But I think it's good enough if you've triple-checked that
the new definitions match the kernel's for each machine, and wait a few
days to give them a chance to speak up, but go ahead and commit (say, on
Tuesday) for each port whose maintainer hasn't responded. You can commit
the common change now (and each port's change as soon as the maintainer
says), or wait to do them all together, at your pleasure.
Thanks,
Roland
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Update bits/siginfo.h with Linux hwpoison SIGBUS changes
2013-05-17 0:43 ` Roland McGrath
@ 2013-05-18 7:17 ` Edjunior Barbosa Machado
2013-05-22 20:09 ` Edjunior Barbosa Machado
0 siblings, 1 reply; 8+ messages in thread
From: Edjunior Barbosa Machado @ 2013-05-18 7:17 UTC (permalink / raw)
To: roland; +Cc: carlos, aj, libc-alpha, libc-ports, naveen.n.rao
On 05/16/2013 09:43 PM, Roland McGrath wrote:
> Always write 'short int', never just 'short'. Otherwise these seem fine to
> me (assuming they match the new kernel definitions).
>
> The ports changes technically need pro forma sign-off from four
> maintainers. But I think it's good enough if you've triple-checked that
> the new definitions match the kernel's for each machine, and wait a few
> days to give them a chance to speak up, but go ahead and commit (say, on
> Tuesday) for each port whose maintainer hasn't responded. You can commit
> the common change now (and each port's change as soon as the maintainer
> says), or wait to do them all together, at your pleasure.
Here's the updated patch using 'short int' instead of just 'short'.
I'll wait for more comments until Tuesday, following your suggestion.
Thanks for the feedback, Roland.
--
Edjunior
ChangeLog.alpha:
2013-05-18 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/alpha/bits/siginfo.h (siginfo_t): Add
si_trapno and si_addr_lsb to _sifields.sigfault.
(si_trapno, si_addr_lsb): Define new macros.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
ChangeLog.ia64:
2013-05-18 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (siginfo_t): Add
si_addr_lsb to _sifields.sigfault.
(si_addr_lsb): Define new macro.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
ChangeLog.mips:
2013-05-18 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/mips/bits/siginfo.h (siginfo_t): Add
si_addr_lsb to _sifields.sifault.
(si_addr_lsb): Define new macro.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
ChangeLog.tile:
2013-05-18 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/tile/bits/siginfo.h (siginfo_t): Fix comment
formatting. Add si_addr_lsb to _sifields.sigfault.
(si_addr_lsb): Define new macro.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
ChangeLog:
2013-05-18 Edjunior Machado <emachado@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/bits/siginfo.h (siginfo_t): Add si_addr_lsb
to _sifields.sigfault.
(si_addr_lsb): Define new macro.
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise.
* sysdeps/unix/sysv/linux/x86/bits/siginfo.h: Likewise.
---
ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 10 +++++++++-
ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h | 8 +++++++-
ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 8 +++++++-
ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h | 10 ++++++++--
sysdeps/unix/sysv/linux/bits/siginfo.h | 8 +++++++-
sysdeps/unix/sysv/linux/sparc/bits/siginfo.h | 8 +++++++-
sysdeps/unix/sysv/linux/x86/bits/siginfo.h | 8 +++++++-
7 files changed, 52 insertions(+), 8 deletions(-)
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
index 1277885..49ca826 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -89,6 +89,8 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ int si_trapno; /* TRAP # which caused the signal. */
+ short int si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -121,6 +123,8 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_trapno _sifields._sigfault.si_trapno
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -211,8 +215,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
index 7887b45..5fa97b5 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
+++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
@@ -94,6 +94,7 @@ typedef struct siginfo
int _si_imm;
unsigned int _si_flags;
unsigned long int _si_isr;
+ short int si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -118,6 +119,7 @@ typedef struct siginfo
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
@@ -233,8 +235,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 56ae34c..a9a845a 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -98,6 +98,7 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ short int si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -122,6 +123,7 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
@@ -209,8 +211,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
index 4ad1a5d..7b40f3d 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
+++ b/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
@@ -95,7 +95,8 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
- int si_trapno; /* TRAP # which caused the signal */
+ int si_trapno; /* TRAP # which caused the signal. */
+ short int si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -129,6 +130,7 @@ typedef struct
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
# define si_trapno _sifields._sigfault.si_trapno
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -223,8 +225,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
index a67bd5c..1603784 100644
--- a/sysdeps/unix/sysv/linux/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
@@ -95,6 +95,7 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ short int si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -127,6 +128,7 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -217,8 +219,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
index 85a5462..88fa1df 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
@@ -96,6 +96,7 @@ typedef struct
{
void *si_addr; /* Faulting insn/memory ref. */
int si_trapno;
+ short int si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -129,6 +130,7 @@ typedef struct
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
# define si_trapno _sifields._sigfault.si_trapno
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -219,8 +221,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
index 48aef6d..bfc6aa3 100644
--- a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
@@ -107,6 +107,7 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ short int si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -139,6 +140,7 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -229,8 +231,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
--
1.7.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Update bits/siginfo.h with Linux hwpoison SIGBUS changes
2013-05-18 7:17 ` Edjunior Barbosa Machado
@ 2013-05-22 20:09 ` Edjunior Barbosa Machado
0 siblings, 0 replies; 8+ messages in thread
From: Edjunior Barbosa Machado @ 2013-05-22 20:09 UTC (permalink / raw)
To: libc-alpha, libc-ports; +Cc: roland, carlos, aj, naveen.n.rao
On 05/18/2013 04:16 AM, Edjunior Barbosa Machado wrote:
> On 05/16/2013 09:43 PM, Roland McGrath wrote:
>> Always write 'short int', never just 'short'. Otherwise these seem fine to
>> me (assuming they match the new kernel definitions).
>>
>> The ports changes technically need pro forma sign-off from four
>> maintainers. But I think it's good enough if you've triple-checked that
>> the new definitions match the kernel's for each machine, and wait a few
>> days to give them a chance to speak up, but go ahead and commit (say, on
>> Tuesday) for each port whose maintainer hasn't responded. You can commit
>> the common change now (and each port's change as soon as the maintainer
>> says), or wait to do them all together, at your pleasure.
>
> Here's the updated patch using 'short int' instead of just 'short'.
> I'll wait for more comments until Tuesday, following your suggestion.
I've just pushed it to master:
commit 85118d4de37e76a1596a75bae75f75f69c33225c
Author: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Date: Wed May 22 14:19:49 2013 -0500
Update bits/siginfo.h with Linux hwpoison SIGBUS changes
Adds new SIGBUS error codes for hardware poison signals, syncing with
the current kernel headers (v3.9). It also adds si_trapno field for
alpha.
Thanks,
--
Edjunior
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-05-22 20:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-07 4:47 [PATCH] Update bits/siginfo.h with Linux hwpoison SIGBUS changes Edjunior Barbosa Machado
2013-05-14 18:32 ` Edjunior Barbosa Machado
2013-05-14 19:38 ` Andreas Jaeger
2013-05-14 20:45 ` Carlos O'Donell
2013-05-15 6:53 ` Edjunior Barbosa Machado
2013-05-17 0:43 ` Roland McGrath
2013-05-18 7:17 ` Edjunior Barbosa Machado
2013-05-22 20:09 ` Edjunior Barbosa Machado
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).