[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v2 2/3] x86/uaccess: replace __{get,put}_user_bad() with STATIC_ASSERT_UNREACHABLE()
On Tue, 6 Feb 2024, Jan Beulich wrote: > On 26.01.2024 11:05, Federico Serafini wrote: > > @@ -208,7 +205,7 @@ do { > > \ > > case 8: > > \ > > put_unsafe_asm(x, ptr, grd, retval, "q", "", "ir", errret); > > \ > > break; > > \ > > - default: __put_user_bad(); > > \ > > + default: STATIC_ASSERT_UNREACHABLE(); > > \ > > } > > \ > > clac(); > > \ > > } while ( false ) > > @@ -227,7 +224,7 @@ do { > > \ > > case 2: get_unsafe_asm(x, ptr, grd, retval, "w", "=r", errret); break; > > \ > > case 4: get_unsafe_asm(x, ptr, grd, retval, "k", "=r", errret); break; > > \ > > case 8: get_unsafe_asm(x, ptr, grd, retval, "", "=r", errret); break; > > \ > > - default: __get_user_bad(); > > \ > > + default: STATIC_ASSERT_UNREACHABLE(); > > \ > > } > > \ > > clac(); > > \ > > } while ( false ) > > Related to my remark on patch 1 - how is one to know the macro this was > invoked from, when seeing the resulting diagnostic? I am not sure what do you mean here... we do get an error like the following (I added a STATIC_ASSERT_UNREACHABLE for case 4): ./arch/x86/include/asm/uaccess.h:262: Error: static assertion failed: unreachable
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |