ulpt vs kernel relinking

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ulpt vs kernel relinking

Thuban
Hi,
I have a printer that require ulpt to be disabled
as mentionned in /usr/local/share/doc/pkg-readmes/cups. And it works.

        # config -fe /bsd
        disable ulpt
        quit

After a reboot, I can notice :

        reorder_kernel: kernel relinking failed; see /usr/share/relink/kernel/GENERIC.MP/relink.log

Ok, so I run, as mentioned in the above file :

        sha256 -h /var/db/kernel.SHA256 /bsd

However, at next reboot, ulpt is reenabled.
       
How can I still have KARL and use my printer ?


--
    thuban

Reply | Threaded
Open this post in threaded view
|

Re: ulpt vs kernel relinking

Theo de Raadt-2
config -e is incompatible with the KARL relinking sequence.

For now, we consider KARL more valuable than config -e usage
patterns.

We've thought about this but for now we don't have a clever
solution to solve this.

Thuban <[hidden email]> wrote:

> Hi,
> I have a printer that require ulpt to be disabled
> as mentionned in /usr/local/share/doc/pkg-readmes/cups. And it works.
>
> # config -fe /bsd
> disable ulpt
> quit
>
> After a reboot, I can notice :
>
> reorder_kernel: kernel relinking failed; see /usr/share/relink/kernel/GENERIC.MP/relink.log
>
> Ok, so I run, as mentioned in the above file :
>
> sha256 -h /var/db/kernel.SHA256 /bsd
>
> However, at next reboot, ulpt is reenabled.
>
> How can I still have KARL and use my printer ?
>
>
> --
>     thuban
>

Reply | Threaded
Open this post in threaded view
|

Re: ulpt vs kernel relinking

Antoine Jacoutot-7
On Thu, May 09, 2019 at 11:41:17PM -0600, Theo de Raadt wrote:
> config -e is incompatible with the KARL relinking sequence.
>
> For now, we consider KARL more valuable than config -e usage
> patterns.
>
> We've thought about this but for now we don't have a clever
> solution to solve this.

Usual disclaimer, you're on your own etc...
You can probably do something like this in /etc/rc.shutdown:

printf 'disable ulpt\nq\n' | config -ef /bsd
sha256 /bsd >/var/db/kernel.SHA256


> Thuban <[hidden email]> wrote:
>
> > Hi,
> > I have a printer that require ulpt to be disabled
> > as mentionned in /usr/local/share/doc/pkg-readmes/cups. And it works.
> >
> > # config -fe /bsd
> > disable ulpt
> > quit
> >
> > After a reboot, I can notice :
> >
> > reorder_kernel: kernel relinking failed; see /usr/share/relink/kernel/GENERIC.MP/relink.log
> >
> > Ok, so I run, as mentioned in the above file :
> >
> > sha256 -h /var/db/kernel.SHA256 /bsd
> >
> > However, at next reboot, ulpt is reenabled.
> >
> > How can I still have KARL and use my printer ?
> >
> >
> > --
> >     thuban
> >
>

--
Antoine

Reply | Threaded
Open this post in threaded view
|

Re: ulpt vs kernel relinking

Thuban


* Antoine Jacoutot <[hidden email]> le [10-05-2019 14:41:08 +0200]:
> On Thu, May 09, 2019 at 11:41:17PM -0600, Theo de Raadt wrote:
> > config -e is incompatible with the KARL relinking sequence.
> >
> > For now, we consider KARL more valuable than config -e usage
> > patterns.
> >
> > We've thought about this but for now we don't have a clever
> > solution to solve this.
>

Thanks for enlightenment.

> Usual disclaimer, you're on your own etc...
> You can probably do something like this in /etc/rc.shutdown:
>
> printf 'disable ulpt\nq\n' | config -ef /bsd
> sha256 /bsd >/var/db/kernel.SHA256

Indeed, this removes wanings. Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: ulpt vs kernel relinking

Benjamin Baier
In reply to this post by Theo de Raadt-2
I cooked up a diff like this once, but I dont really use it any more.

diff --git a/libexec/reorder_kernel/reorder_kernel.sh b/libexec/reorder_kernel/reorder_kernel.sh
index d8b8a2d24a..b59faca992 100644
--- a/libexec/reorder_kernel/reorder_kernel.sh
+++ b/libexec/reorder_kernel/reorder_kernel.sh
@@ -26,6 +26,7 @@ df -t nfs /usr/share >/dev/null 2>&1 && exit 1
 KERNEL=$(sysctl -n kern.osversion)
 KERNEL=${KERNEL%#*}
 KERNEL_DIR=/usr/share/relink/kernel
+KERNEL_CONF=/etc/kernel.conf
 LOGFILE=$KERNEL_DIR/$KERNEL/relink.log
 PROGNAME=${0##*/}
 SHA256=/var/db/kernel.SHA256
@@ -63,6 +64,14 @@ fi
 
 cd $KERNEL_DIR/$KERNEL
 make newbsd
+
+# Configure custom kernel options
+if [[ -f $KERNEL_CONF ]]; then
+ while read _option; do
+ printf "%s\nquit" "$_option" | config -fe bsd
+ done < $KERNEL_CONF
+fi
+
 make newinstall
 
 echo "\nKernel has been relinked and is active on next reboot.\n"


On Thu, 09 May 2019 23:41:17 -0600
"Theo de Raadt" <[hidden email]> wrote:

> config -e is incompatible with the KARL relinking sequence.
>
> For now, we consider KARL more valuable than config -e usage
> patterns.
>
> We've thought about this but for now we don't have a clever
> solution to solve this.
>
> Thuban <[hidden email]> wrote:
>
> > Hi,
> > I have a printer that require ulpt to be disabled
> > as mentionned in /usr/local/share/doc/pkg-readmes/cups. And it works.
> >
> > # config -fe /bsd
> > disable ulpt
> > quit
> >
> > After a reboot, I can notice :
> >
> > reorder_kernel: kernel relinking failed; see /usr/share/relink/kernel/GENERIC.MP/relink.log
> >
> > Ok, so I run, as mentioned in the above file :
> >
> > sha256 -h /var/db/kernel.SHA256 /bsd
> >
> > However, at next reboot, ulpt is reenabled.
> >
> > How can I still have KARL and use my printer ?
> >
> >
> > --
> >     thuban
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: ulpt vs kernel relinking

kasak
In reply to this post by Thuban
10.05.2019 8:37, Thuban пишет:

> Hi,
> I have a printer that require ulpt to be disabled
> as mentionned in /usr/local/share/doc/pkg-readmes/cups. And it works.
>
> # config -fe /bsd
> disable ulpt
> quit
>
> After a reboot, I can notice :
>
> reorder_kernel: kernel relinking failed; see /usr/share/relink/kernel/GENERIC.MP/relink.log
>
> Ok, so I run, as mentioned in the above file :
>
> sha256 -h /var/db/kernel.SHA256 /bsd
>
> However, at next reboot, ulpt is reenabled.
>
> How can I still have KARL and use my printer ?
>
My machine doesn't boot with pcppi enabled, so, to use patched kernel I do

config -e -o /bsd.nopcppi /bsd

and create /etc/boot.conf with this:

boot bsd.nopcppi