File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -149,8 +149,7 @@ static inline unsigned long pstate_to_compat_psr(const unsigned long pstate)
149
149
150
150
/*
151
151
* This struct defines the way the registers are stored on the stack during an
152
- * exception. Note that sizeof(struct pt_regs) has to be a multiple of 16 (for
153
- * stack alignment). struct user_pt_regs must form a prefix of struct pt_regs.
152
+ * exception. struct user_pt_regs must form a prefix of struct pt_regs.
154
153
*/
155
154
struct pt_regs {
156
155
union {
@@ -180,6 +179,9 @@ struct pt_regs {
180
179
u64 exit_rcu ;
181
180
};
182
181
182
+ /* For correct stack alignment, pt_regs has to be a multiple of 16 bytes. */
183
+ static_assert (IS_ALIGNED (sizeof (struct pt_regs ), 16 ));
184
+
183
185
static inline bool in_syscall (struct pt_regs const * regs )
184
186
{
185
187
return regs -> syscallno != NO_SYSCALL ;
You can’t perform that action at this time.
0 commit comments