public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Indu Bhagat <indu.bhagat@oracle.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH, V2 2/2] gas: scfi: untraceable control flow should be a hard error
Date: Thu, 25 Jan 2024 11:43:12 -0800	[thread overview]
Message-ID: <2db392d1-fe13-416f-a0e7-e7b81906ad3a@oracle.com> (raw)
In-Reply-To: <b724468c-840c-4561-80bf-476f012b7cd8@suse.com>

On 1/25/24 05:59, Jan Beulich wrote:
> On 24.01.2024 08:26, Indu Bhagat wrote:
>> --- a/gas/ginsn.c
>> +++ b/gas/ginsn.c
>> @@ -1161,8 +1161,8 @@ ginsn_data_end (const symbolS *label)
>>     /* Build the cfg of ginsn(s) of the function.  */
>>     if (!frchain_now->frch_ginsn_data->gcfg_apt_p)
>>       {
>> -      as_warn (_("Untraceable control flow for func '%s'; Skipping SCFI"),
>> -	       S_GET_NAME (func));
>> +      as_bad (_("SCFI: untraceable control flow for func '%s'"),
>> +	      S_GET_NAME (func));
>>         goto end;
>>       }
> 
> This switch is probably fine. My question here is: How come ginsn.c issues
> an SCFI-specific diagnostic? Really most if not all of ginsn_data_end() looks
> to be concerned of only SCFI, when e.g. ginsn_pass_warn_unreachable_code()
> might have value on its own.
> 

Thank you for reminding me that - I do remember being of two minds on 
keeping the string "Skipping SCFI" originally. On the one hand, the 
argument was that "ginsn_pass_warn_unreachable_code() has value on its 
own" (like you mention).  On the other hand I wondered if users may find 
it confusing to see this warning about GAS trying to decipher control 
flow for a function and whether this affects the synthesized CFI. So, I 
ended up adding "Skipping SCFI"...

I will remove the "SCFI:" string from the message.  I think switch to 
error relieves me of some of those concerns regarding 'confusing warning 
when SCFI is enabled'

Thanks



      reply	other threads:[~2024-01-25 19:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24  7:26 [PATCH,V2 0/2] Testcase refactoring and fix PR gas/31284 Indu Bhagat
2024-01-24  7:26 ` [PATCH,V2 1/2] x86: testsuite: scfi: adjust COFI testcase Indu Bhagat
2024-01-25 15:46   ` Jan Beulich
2024-01-24  7:26 ` [PATCH,V2 2/2] gas: scfi: untraceable control flow should be a hard error Indu Bhagat
2024-01-25 13:59   ` [PATCH, V2 " Jan Beulich
2024-01-25 19:43     ` Indu Bhagat [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2db392d1-fe13-416f-a0e7-e7b81906ad3a@oracle.com \
    --to=indu.bhagat@oracle.com \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).