On 7/9/2025 3:38 AM, Kirill A. Shutemov wrote: > On Tue, Jul 08, 2025 at 10:12:28PM -0700, Sohil Mehta wrote: >> On 7/7/2025 1:03 AM, Kirill A. Shutemov wrote: >> >>> + hint = get_kernel_exc_address(regs, &exc_addr); >>> + if (hint != EXC_NO_HINT) >>> + printk(SSFSTR ", %s 0x%lx", kernel_exc_hint_help[hint], exc_addr); >>> + >>> + if (hint != EXC_NON_CANONICAL) >>> + exc_addr = 0; >>> + >>> + die_addr(SSFSTR, regs, error_code, exc_addr); >> >> I see a slight difference between the #GP handling and the #SS handling >> here. For the #GP case, we seem to pass the hint string to die_addr(). >> >> However, for the #SS, the hint is printed above and only SSFSTR gets >> passed onto die_addr(). I am curious about the reasoning. > > I hate how 'desc' size is defined in #GP handler: > > char desc[sizeof(GPFSTR) + 50 + 2*sizeof(unsigned long) + 1] = GPFSTR; > > Too much voodoo to my liking. And it will overflow if any hint string is > going to be longer than 50. > > I don't want to repeat this magic for #SS. > Thanks, that makes sense. > I would argue we need to print directly in #GP handler as I do in #SS. > But, IMO, it is outside of the scope of this patchset. >