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] [day] [month] [year] [list]
Message-ID: <20180609164921.GA5020@thunk.org>
Date:   Sat, 9 Jun 2018 12:49:21 -0400
From:   "Theodore Y. Ts'o" <tytso@....edu>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     Michal Kubecek <mkubecek@...e.cz>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Thomas Backlund <tmb@...eia.org>,
        Ulf Magnusson <ulfalizer@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: building in 32bit chroot on x86_64 host broken

On Sat, Jun 09, 2018 at 09:23:55PM +0900, Masahiro Yamada wrote:
> Just a note.
> 
> In case of cross-compiling, not only ARCH but also CROSS_COMPILE
> must be passed when you do "make *config".

Sure, what was being discussed was people who build 32-bit x86 kernels
on a 64-bit platform.  I do this occasionally to check and make sure
that 32-compat ioctl handling is working correctly, etc.  I suspect
there are more developers setting just ARCH= and not CROSS_COMPILE
because they are building 32-bit x86 kernels (which can then be
trivially tested using qemu) than there are building cross-compiled
kernels for a completely different architecture.

I saw this thread and decided I didn't care because I use a standard
"kbuild32" script (I also have a "kbuild" script for building normal
64-bit kernels), and it always passes ARCH=i386.

					- Ted

#!/bin/bash

N=$(getconf _NPROCESSORS_ONLN)

if test -f .git/kbuild/config ; then
    . .git/kbuild/config
else
    echo "Missing kbuild configuration file!"
    exit 1
fi

if test ! -d "$BLD_DIR_32" ; then
    mkdir -p "$BLD_DIR_32"
    if test -f .git/kbuild/kernel-config ; then
	cp .git/kbuild/kernel-config-32 "$BLD_DIR_32/.config"
    fi
    for i in x509.genkey signing_key.pem signing_key.x509
    do
	if test -f ".git/kbuild/$i" ; then
	    mkdir -p "$BLD_DIR_32/certs"
	    cp ".git/kbuild/$i" "$BLD_DIR_32/certs"
	fi
    done
fi

time nice make O="$BLD_DIR_32" ARCH=i386 -j$N $*

cp "$BLD_DIR_32/.config" .git/kbuild/kernel-config-32

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ