[1/1] newer kernels (e.g. v5.19) do not include objtool anymore in linux-header fixed

Message ID CAJGKYO4ef6O=0tkjwfYb7FELD5_KTYkoUcJFQE7177op_yq0cA@mail.gmail.com
State Superseded, archived
Headers show
Series [1/1] newer kernels (e.g. v5.19) do not include objtool anymore in linux-header fixed | expand

Commit Message

Roberto A. Foglietta Oct. 29, 2022, 7:09 p.m. UTC
Hi all,

 I discovered that newer kernels (e.g. v5.19) when compiled and
packaged by an ISAR project do not include the objectool anymore. This
obviously breaks any activity which expects to use that binary
executable. In this a patch below a suggestion for fixing this issue
(tested ok).

From 48c6e9b409eb9d00e04a20f69df71ae88f51e178 Mon Sep 17 00:00:00 2001
From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Date: Sat, 29 Oct 2022 18:59:10 +0200
Subject: [PATCH] linux install.tmpl: added OR with CONFIG_HAVE_OBJTOOL for
 objtools

linux install.tmpl: added OR with CONFIG_HAVE_OBJTOOL for objtools
a fix for newer kernels (since 5.19 for sure) to include objtool

Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
 meta/recipes-kernel/linux/files/debian/isar/install.tmpl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

     if [ -n "${CONFIG_GCC_PLUGINS}" ]; then

Comments

Uladzimir Bely Nov. 3, 2022, 6:47 a.m. UTC | #1
In the email from Saturday, 29 October 2022 22:09:10 +03 user Roberto A. 
Foglietta wrote:
> Hi all,
> 
>  I discovered that newer kernels (e.g. v5.19) when compiled and
> packaged by an ISAR project do not include the objectool anymore. This
> obviously breaks any activity which expects to use that binary
> executable. In this a patch below a suggestion for fixing this issue
> (tested ok).
> 
> From 48c6e9b409eb9d00e04a20f69df71ae88f51e178 Mon Sep 17 00:00:00 2001
> From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
> Date: Sat, 29 Oct 2022 18:59:10 +0200
> Subject: [PATCH] linux install.tmpl: added OR with CONFIG_HAVE_OBJTOOL for
>  objtools
> 
> linux install.tmpl: added OR with CONFIG_HAVE_OBJTOOL for objtools
> a fix for newer kernels (since 5.19 for sure) to include objtool
> 
> Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
> ---
>  meta/recipes-kernel/linux/files/debian/isar/install.tmpl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> index 0a8645d..de57d82 100644
> --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> @@ -177,7 +177,7 @@ kernel_headers() {
>          echo Module.symvers >> ${obj_hdr_files}
>      fi
>      (cd ${O}; find arch/${ARCH}/include include scripts -type f)
> 
> >>${obj_hdr_files}
> 

The patch is mailformed here. Looks like it was sent not via "git send-email", 
but just copy-pasted to the mail body.

Could you please send v2?

> -    if [ -n "${CONFIG_STACK_VALIDATION}" ]; then
> +    if [ -n "${CONFIG_STACK_VALIDATION}" -o -n "${CONFIG_HAVE_OBJTOOL}" ];
> then (cd ${O}; find tools/objtool -type f -executable) >>${obj_hdr_files}
> fi
>      if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
Florian Bezdeka Nov. 3, 2022, 8:08 a.m. UTC | #2
On Thu, 2022-11-03 at 09:47 +0300, Uladzimir Bely wrote:
> In the email from Saturday, 29 October 2022 22:09:10 +03 user Roberto A. 
> Foglietta wrote:
> > Hi all,
> > 
> >  I discovered that newer kernels (e.g. v5.19) when compiled and
> > packaged by an ISAR project do not include the objectool anymore. This
> > obviously breaks any activity which expects to use that binary
> > executable. In this a patch below a suggestion for fixing this issue
> > (tested ok).
> > 
> > From 48c6e9b409eb9d00e04a20f69df71ae88f51e178 Mon Sep 17 00:00:00 2001
> > From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
> > Date: Sat, 29 Oct 2022 18:59:10 +0200
> > Subject: [PATCH] linux install.tmpl: added OR with CONFIG_HAVE_OBJTOOL for
> >  objtools
> > 
> > linux install.tmpl: added OR with CONFIG_HAVE_OBJTOOL for objtools
> > a fix for newer kernels (since 5.19 for sure) to include objtool
> > 
> > Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
> > ---

In addition to Uladzimir's findings below: 

This is the place (after the --- line) where additional comments can be
made. Those comments here will not be part of the commit message.

So maybe you can rework that patch a bit and send again.

> >  meta/recipes-kernel/linux/files/debian/isar/install.tmpl | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > index 0a8645d..de57d82 100644
> > --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > @@ -177,7 +177,7 @@ kernel_headers() {
> >          echo Module.symvers >> ${obj_hdr_files}
> >      fi
> >      (cd ${O}; find arch/${ARCH}/include include scripts -type f)
> > 
> > > > ${obj_hdr_files}
> > 
> 
> The patch is mailformed here. Looks like it was sent not via "git send-email", 
> but just copy-pasted to the mail body.
> 
> Could you please send v2?
> 
> > -    if [ -n "${CONFIG_STACK_VALIDATION}" ]; then
> > +    if [ -n "${CONFIG_STACK_VALIDATION}" -o -n "${CONFIG_HAVE_OBJTOOL}" ];
> > then (cd ${O}; find tools/objtool -type f -executable) >>${obj_hdr_files}
> > fi
> >      if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
> 
> 
> -- 
> Uladzimir Bely
> 
> 
>
Roberto A. Foglietta Nov. 3, 2022, 12:07 p.m. UTC | #3
Il giorno gio 3 nov 2022 alle ore 07:47 Uladzimir Bely
<ubely@ilbers.de> ha scritto:

> The patch is mailformed here. Looks like it was sent not via "git send-email",
> but just copy-pasted to the mail body.
>
> Could you please send v2?
>
> > -    if [ -n "${CONFIG_STACK_VALIDATION}" ]; then
> > +    if [ -n "${CONFIG_STACK_VALIDATION}" -o -n "${CONFIG_HAVE_OBJTOOL}" ];
> > then (cd ${O}; find tools/objtool -type f -executable) >>${obj_hdr_files}
> > fi
> >      if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
>
>
> --
Hi Uladzimir,

I have configured git send-email but I still have problems with SMTP
authentication due to two multiple factor authentication settings on
my gmail account. However, I found this which is interesting and also
fits with my perception. I think that the attached patches should be
accepted as well as inline. IMHO, obviously.

https://stackoverflow.com/questions/68238912/how-to-configure-and-use-git-send-email-to-work-with-gmail-to-email-patches-to

Note to developers and maintainers of glibc, Buildroot, and other
projects which require the use of git send-email to send patches: if I
wasn't a professional developer, there's not a chance in heck I could
submit a patch, even if I knew how to expertly code and had important
changes to make. The barrier of entry into git, rebasing, formatting
patches, configuring git send-email, etc., is just too high. Consider
lowering the barrier to entry by using modern tools such as GitHub,
GitLab, or BitBucket to manage your projects and accept patches, in
lieu of emailed patches, email mailing lists, and git send-email. One
huge success case of making this transition recently is KiCad. In 2020
they were still using emailed git patches. Now, they have migrated
fully to GitLab: https://gitlab.com/kicad. Their issue reporting and
management, for instance, is sooooo much easier now!:
https://gitlab.com/kicad/code/kicad/-/issues. Even regular users who
are non-programmers are easily able to report issues now, whereas
before, KiCad was using https://launchpad.net/kicad, which was more
tedious and difficult.

At a minimum, do people a favor and please direct people to this
answer to help them set up git send-email, and help keep this answer
up-to-date.

Best regards, -R
Roberto A. Foglietta Nov. 3, 2022, 12:19 p.m. UTC | #4
Il giorno gio 3 nov 2022 alle ore 13:07 Roberto A. Foglietta
<roberto.foglietta@gmail.com> ha scritto:
>
> Il giorno gio 3 nov 2022 alle ore 07:47 Uladzimir Bely
> <ubely@ilbers.de> ha scritto:
>
> > The patch is mailformed here. Looks like it was sent not via "git send-email",
> > but just copy-pasted to the mail body.
> >
> > Could you please send v2?
> >
> > > -    if [ -n "${CONFIG_STACK_VALIDATION}" ]; then
> > > +    if [ -n "${CONFIG_STACK_VALIDATION}" -o -n "${CONFIG_HAVE_OBJTOOL}" ];
> > > then (cd ${O}; find tools/objtool -type f -executable) >>${obj_hdr_files}
> > > fi
> > >      if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
> >
> >
> > --
> Hi Uladzimir,
>
> I have configured git send-email but I still have problems with SMTP
> authentication due to two multiple factor authentication settings on
> my gmail account. However, I found this which is interesting and also
> fits with my perception. I think that the attached patches should be
> accepted as well as inline. IMHO, obviously.
>
> https://stackoverflow.com/questions/68238912/how-to-configure-and-use-git-send-email-to-work-with-gmail-to-email-patches-to
>
> Note to developers and maintainers of glibc, Buildroot, and other
> projects which require the use of git send-email to send patches: if I
> wasn't a professional developer, there's not a chance in heck I could
> submit a patch, even if I knew how to expertly code and had important
> changes to make. The barrier of entry into git, rebasing, formatting
> patches, configuring git send-email, etc., is just too high. Consider
> lowering the barrier to entry by using modern tools such as GitHub,
> GitLab, or BitBucket to manage your projects and accept patches, in
> lieu of emailed patches, email mailing lists, and git send-email. One
> huge success case of making this transition recently is KiCad. In 2020
> they were still using emailed git patches. Now, they have migrated
> fully to GitLab: https://gitlab.com/kicad. Their issue reporting and
> management, for instance, is sooooo much easier now!:
> https://gitlab.com/kicad/code/kicad/-/issues. Even regular users who
> are non-programmers are easily able to report issues now, whereas
> before, KiCad was using https://launchpad.net/kicad, which was more
> tedious and difficult.
>
> At a minimum, do people a favor and please direct people to this
> answer to help them set up git send-email, and help keep this answer
> up-to-date.
>

To be more specific: I am following this how-to about SMTP
authentication with gmail.com

https://gist.github.com/jasonkarns/4354421

2. Configure Authentication.

I believe the simplest setup is to create an application-specific
password in Google dedicated to git.

Google Account -> Security -> Signing in to Google : App passwords

 Unfortunately, this less-secure way to authenticate has been recently disabled:

https://support.google.com/accounts/answer/6010255

Less secure apps & your Google Account

To help keep your account secure, from May 30, 2022, Google no longer
supports the use of third-party apps or devices which ask you to sign
in to your Google Account using only your username and password.

So the result in trying to send is this:

roberto@x230:~/a/isar$ git send-email --from
roberto.foglietta@gmail.com --to isar-users@googlegroups.com --cc
roberto.foglietta@gmail.com --subject "[PATCH 1/1] newer kernels (e.g.
v5.19) do not include objtool anymore in linux-header fixed v2"
--smtp-server smtp.gmail.com --smtp-pass "$mypasswd" --smtp-user
roberto.foglietta@gmail.com --smtp-encryption tls
0001-linux-install.tmpl-added-CONFIG_HAVE_OBJTOOL-in-OR-f.patch

0001-linux-install.tmpl-added-CONFIG_HAVE_OBJTOOL-in-OR-f.patch
(mbox) Adding cc: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
from line 'From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>'
(body) Adding cc: Roberto A. Foglietta <roberto.foglietta@gmail.com>
from line 'Signed-off-by: Roberto A. Foglietta
<roberto.foglietta@gmail.com>'

From: roberto.foglietta@gmail.com
To: isar-users@googlegroups.com
Cc: roberto.foglietta@gmail.com
Subject: [PATCH] linux install.tmpl: added CONFIG_HAVE_OBJTOOL in OR for objtool
Date: Thu,  3 Nov 2022 12:59:06 +0100
Message-Id: <20221103115906.26622-1-roberto.foglietta@gmail.com>
X-Mailer: git-send-email 2.34.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

    The Cc list above has been expanded by additional
    addresses found in the patch commit message. By default
    send-email prompts before sending whenever this occurs.
    This behavior is controlled by the sendemail.confirm
    configuration setting.

    For additional information, run 'git send-email --help'.
    To retain the current behavior, but squelch this message,
    run 'git config --global sendemail.confirm auto'.

Send this email? ([y]es|[n]o|[e]dit|[q]uit|[a]ll): y
5.7.8 Username and Password not accepted. Learn more at
5.7.8  https://support.google.com/mail/?p=BadCredentials
l9-20020a05600c4f0900b003cf71b1f66csm1277668wmq.0 - gsmtp

Best regards, -R

Patch

diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
index 0a8645d..de57d82 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
@@ -177,7 +177,7 @@  kernel_headers() {
         echo Module.symvers >> ${obj_hdr_files}
     fi
     (cd ${O}; find arch/${ARCH}/include include scripts -type f)
>>${obj_hdr_files}
-    if [ -n "${CONFIG_STACK_VALIDATION}" ]; then
+    if [ -n "${CONFIG_STACK_VALIDATION}" -o -n "${CONFIG_HAVE_OBJTOOL}" ]; then
         (cd ${O}; find tools/objtool -type f -executable) >>${obj_hdr_files}
     fi