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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH2r5mugNKYBNXm7AuPFL=V=77Qkm3q6TtXCj-B0kugmpL0aYQ@mail.gmail.com>
Date:   Wed, 19 Jul 2023 19:47:42 -0500
From:   Steve French <smfrench@...il.com>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     CIFS <linux-cifs@...r.kernel.org>,
        Winston Wen <wentao@...ontech.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Luis Chamberlain <mcgrof@...nel.org>,
        linux-modules@...r.kernel.org
Subject: Re: linux-next: build failure after merge of the cifs tree

Winston had an updated version of the patch - just replaced it with
his updated one which does a cast to (char *)

          ses->local_nls = load_nls((char *)ctx->local_nls->charset);

But as he noted in an earlier email thread:
> Perhaps I should make a change to load_nls() to take a const char *
> instead of char *? If this make sense, I'll do it soon.

which is probably cleaner

On Wed, Jul 19, 2023 at 7:35 PM Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> Hi all,
>
> After merging the cifs tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> fs/smb/client/connect.c: In function 'cifs_get_smb_ses':
> fs/smb/client/connect.c:2293:49: error: passing argument 1 of 'load_nls' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>  2293 |         ses->local_nls = load_nls(ctx->local_nls->charset);
>       |                                   ~~~~~~~~~~~~~~^~~~~~~~~
> In file included from fs/smb/client/cifsproto.h:10,
>                  from fs/smb/client/connect.c:37:
> include/linux/nls.h:50:35: note: expected 'char *' but argument is of type 'const char *'
>    50 | extern struct nls_table *load_nls(char *);
>       |                                   ^~~~~~
>
> Caused by commit
>
>   46055407cd4a ("cifs: fix charset issue in reconnection")
>
> I have used the cifs tree from next-20230719 for today.
>
> It looks as though the parameter to load_nls could be made const safely
> as it is just passed to try_then_request_module() passes it to
> __request_module() which just passes it to vsnprintf() to construct the
> module name.  There does not appear to be any maintainer for fs/nls ...
> --
> Cheers,
> Stephen Rothwell



-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ