lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c308360-a820-26ed-847c-56726afe0ec3@infradead.org>
Date:   Sun, 12 Mar 2023 20:15:40 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Jurica Vukadin <jura@...ad.in>,
        Masahiro Yamada <masahiroy@...nel.org>
Cc:     linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kconfig: Update config changed flag before calling
 callback

Hi--

On 3/7/23 11:40, Jurica Vukadin wrote:
> Prior to commit 5ee546594025 ("kconfig: change sym_change_count to a
> boolean flag"), the conf_updated flag was set to the new value *before*
> calling the callback. xconfig's save action depends on this behaviour,
> because xconfig calls conf_get_changed() directly from the callback and
> now sees the old value, thus never enabling the save button or the
> shortcut.
> 
> Restore the previous behaviour.
> 
> Fixes: 5ee546594025 ("kconfig: change sym_change_count to a boolean flag")
> Signed-off-by: Jurica Vukadin <jura@...ad.in>

Thanks! I was wondering what had happened to that, but I never
got around to bisecting it.

Now the Disk icon is live instead of being greyed out after
a change is made.


Acked-by: Randy Dunlap <rdunlap@...radead.org>
Tested-by: Randy Dunlap <rdunlap@...radead.org>

> ---
>  scripts/kconfig/confdata.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index b7c9f1dd5e42..992575f1e976 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -1226,10 +1226,12 @@ static void (*conf_changed_callback)(void);
>  
>  void conf_set_changed(bool val)
>  {
> -	if (conf_changed_callback && conf_changed != val)
> -		conf_changed_callback();
> +	bool changed = conf_changed != val;
>  
>  	conf_changed = val;
> +
> +	if (conf_changed_callback && changed)
> +		conf_changed_callback();
>  }
>  
>  bool conf_get_changed(void)

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ