Message ID | ZW8IG4JcRl-eMNux@hydra |
---|---|
State | New |
Headers | show |
Series | debug/getwd_chk.c: warning should be emitted for the __getwd_chk symbol. | expand |
On Tue, Dec 05, 2023 at 12:23:07PM +0100, Frederic Cambus wrote: > Otherwise the warning message for the getwd symbol ends up being duplicated. > > Signed-off-by: Frederic Cambus <fred@statdns.com> > --- > debug/getwd_chk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/debug/getwd_chk.c b/debug/getwd_chk.c > index 850aa1aa14..cf61d8d5a0 100644 > --- a/debug/getwd_chk.c > +++ b/debug/getwd_chk.c > @@ -29,5 +29,5 @@ __getwd_chk (char *buf, size_t buflen) > return res; > } > > -link_warning (getwd, > +link_warning (__getwd_chk, > "the `getwd' function is dangerous and should not be used.") > -- > 2.43.0 Ping. Anyone willing to look at this? In case it was not clear, here is the output of objdump before applying the patch: objdump -s -j .gnu.warning.getwd libc.so ./libc.so: file format elf64-x86-64 Contents of section .gnu.warning.getwd: 0000 74686520 60676574 77642720 66756e63 the `getwd' func 0010 74696f6e 20697320 64616e67 65726f75 tion is dangerou 0020 7320616e 64207368 6f756c64 206e6f74 s and should not 0030 20626520 75736564 2e000000 00000000 be used........ 0040 74686520 60676574 77642720 66756e63 the `getwd' func 0050 74696f6e 20697320 64616e67 65726f75 tion is dangerou 0060 7320616e 64207368 6f756c64 206e6f74 s and should not 0070 20626520 75736564 2e00 be used.. And after applying the patch: objdump -s -j .gnu.warning.getwd libc.so ./libc.so: file format elf64-x86-64 Contents of section .gnu.warning.getwd: 0000 74686520 60676574 77642720 66756e63 the `getwd' func 0010 74696f6e 20697320 64616e67 65726f75 tion is dangerou 0020 7320616e 64207368 6f756c64 206e6f74 s and should not 0030 20626520 75736564 2e00 be used..
On 05/12/23 08:23, Frederic Cambus wrote: > Otherwise the warning message for the getwd symbol ends up being duplicated. > > Signed-off-by: Frederic Cambus <fred@statdns.com> LGTM, thanks. Andreas will need to ack for 2.39. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> > --- > debug/getwd_chk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/debug/getwd_chk.c b/debug/getwd_chk.c > index 850aa1aa14..cf61d8d5a0 100644 > --- a/debug/getwd_chk.c > +++ b/debug/getwd_chk.c > @@ -29,5 +29,5 @@ __getwd_chk (char *buf, size_t buflen) > return res; > } > > -link_warning (getwd, > +link_warning (__getwd_chk, > "the `getwd' function is dangerous and should not be used.")
Am Montag, 8. Januar 2024, 15:32:07 CET schrieb Adhemerval Zanella Netto: > > On 05/12/23 08:23, Frederic Cambus wrote: > > Otherwise the warning message for the getwd symbol ends up being duplicated. > > > > Signed-off-by: Frederic Cambus <fred@statdns.com> > > LGTM, thanks. Andreas will need to ack for 2.39. OK imho. > > Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> > > > --- > > debug/getwd_chk.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/debug/getwd_chk.c b/debug/getwd_chk.c > > index 850aa1aa14..cf61d8d5a0 100644 > > --- a/debug/getwd_chk.c > > +++ b/debug/getwd_chk.c > > @@ -29,5 +29,5 @@ __getwd_chk (char *buf, size_t buflen) > > return res; > > } > > > > -link_warning (getwd, > > +link_warning (__getwd_chk, > > "the `getwd' function is dangerous and should not be used.") >
diff --git a/debug/getwd_chk.c b/debug/getwd_chk.c index 850aa1aa14..cf61d8d5a0 100644 --- a/debug/getwd_chk.c +++ b/debug/getwd_chk.c @@ -29,5 +29,5 @@ __getwd_chk (char *buf, size_t buflen) return res; } -link_warning (getwd, +link_warning (__getwd_chk, "the `getwd' function is dangerous and should not be used.")
Otherwise the warning message for the getwd symbol ends up being duplicated. Signed-off-by: Frederic Cambus <fred@statdns.com> --- debug/getwd_chk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)