Received: by 10.223.185.116 with SMTP id b49csp50110wrg; Thu, 22 Feb 2018 16:20:45 -0800 (PST) X-Google-Smtp-Source: AH8x2274o/jWs2ll2oFIqUUFjbzzQABcH48f//p3hxC3NlyI874u8TAV5rvHLe2zVhZ0gN9oJCIP X-Received: by 2002:a17:902:788b:: with SMTP id q11-v6mr8164904pll.378.1519345245863; Thu, 22 Feb 2018 16:20:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519345245; cv=none; d=google.com; s=arc-20160816; b=Xi7AnPehnnSWQRK1JTPfs723RnZvjDGodM2s2WdXj+FWmxnpsQrBLiasSdao4eq7Iq 3e0wcfpA4lCgPjq57wW0Jwx0/BmaqFANEXsW8uWTSi3j1Ii6HzMK9sFtukDATgztvV// ALIPsTGv9vVUheVlJYbh/17kO6H9IMljOUtKnH8R5EI10dViJ5UOjwRtNt5rln0x8U0I t86IP6tFjfmb9dWCxw8+Ba5SLV41JeYaQh1IvnpPnuodbryGv0tzAIGvwF900dumU8rG C4Fl0PyugZxvc7fQe+joU8rJ2Hm+mTPXds1VlX+GZTabTOYMjDbiwKiY9BkUjfBIIOqZ v3DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=9fykyLnxqj5zRLWSPFx9fmelHIMBvDwP8GHUpIpOthM=; b=Gf/dR+8PDb0ZxVg1zzBS3UEh3HTKFLFWq1TXK8WhCpaV0sXHfJmsyi3k7DxS7uSYTE kBx6L2nd3A1cREfwt0LGsj+1NgKOykk3gUxi8fCII8KYqsRFpzsk1yJtsmznFl1KEINd +K+de3tRbE0Fst9iqTCJuRYuiaZvotTzf4AvvxCtFAuqOBvBRwUrUF2tzCcs8wQoqIzB hU0Rni5CDqgefTcLEg1CyrdMP/BnXy+9X1CQBrTNL9flWx25U++sZcdvdOKdR8pkaaMP iY4Yb1AtPu/Sn2AouN9Oo9iwQEzSOLLSliAHgtX8/lKXVso4/1piW4/nPL4FWYvbLmgl g8vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=TfR0MMCa; dkim=fail header.i=@chromium.org header.s=google header.b=Arynzb8h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o88si807347pfk.380.2018.02.22.16.20.30; Thu, 22 Feb 2018 16:20:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=TfR0MMCa; dkim=fail header.i=@chromium.org header.s=google header.b=Arynzb8h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752024AbeBWATw (ORCPT + 99 others); Thu, 22 Feb 2018 19:19:52 -0500 Received: from mail-vk0-f66.google.com ([209.85.213.66]:33835 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751553AbeBWATv (ORCPT ); Thu, 22 Feb 2018 19:19:51 -0500 Received: by mail-vk0-f66.google.com with SMTP id z190so4303628vkg.1 for ; Thu, 22 Feb 2018 16:19:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9fykyLnxqj5zRLWSPFx9fmelHIMBvDwP8GHUpIpOthM=; b=TfR0MMCaAMVp1wezTCWES5pWj7QkEsVp+5OywWESw8CrkTyamgfWy+ydGUThJGoaue DnYXXo5upO74EUZ7YCY44pk+Rvo/rD6PjFU7il5Vjnnq89OAu/A6p8xJMniJPkI4Fe3Q AWod/bjXUfBWBozkqmp8ydenSdB0pF5lI37WMbR53WceoJa/pxvijDRCkmiTE2sWWEb+ qwYTIH8mV41CDnvuDiSWeD6Z620rsfoh8DzApB0ECdLw/OHNBDVJnT/BhX5wS1/rcDb+ YLfXiVJY9BR65trbXg+Q4MrrYl+Db329mAt1AOhg7Lf6auluxw4mkfMW9H0yhjJpVZWA 4AfQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9fykyLnxqj5zRLWSPFx9fmelHIMBvDwP8GHUpIpOthM=; b=Arynzb8hKKeJhYYMoGK5DfyczIT87xy1GWwaprHpEusL7r1yOCmgkCqwv8C3OqFAp+ fP2OHCSgDRlEhOdQRbHBTe8t8bqw86pOiioT5oYVS7Lsv8F8bMC2moPZNpIhpA5zudas jmqTsiIWR9uopZW1Bk87oRpb7oWhgDhDukFwU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=9fykyLnxqj5zRLWSPFx9fmelHIMBvDwP8GHUpIpOthM=; b=Z99X3Ug8sZueUy+z9vmxxVT3je9kx8qv8YX6XFYMwrHzBKz5BJo7enftvhyGLjCRLE RwKoq6sA/CIzowD/ulK8KdibjeKVrLhWPtnFQM9V3869s4LnWQn0+0rYqb0e+oq18nzx BfJ6vSnIxQxvt0SpcxK7sYN2qNuxyDV7wcMnI5YtF9YHUWeVLJs4SMygoSKR+rqIdjec ek4llUkALMzGfyWagzluQ9u4sBpAZy+OVn9rs1thPBrChDAt+wDwGx0NxQ0EPNH18O2K vFf6vsRmdYMh/LHib5i5G+REvgnBLIdS6gZIBeor7cd3qFk/Oe0L48ITZTogAgcNzkyR omTg== X-Gm-Message-State: APf1xPAYuKC1IUh5XtX0hlt5L9e/gb59x5okMqJtwm6q1OnMHaR4PmHv JsoezWLw5gfrIg2SJJKulrqiPH56S3bxIM8IcT2ywQ== X-Received: by 10.31.152.139 with SMTP id a133mr6939399vke.96.1519345190507; Thu, 22 Feb 2018 16:19:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.242.140 with HTTP; Thu, 22 Feb 2018 16:19:49 -0800 (PST) In-Reply-To: References: <20180222002854.GA29269@beast> <201802230613.8bqOOUnw%fengguang.wu@intel.com> From: Kees Cook Date: Thu, 22 Feb 2018 16:19:49 -0800 X-Google-Sender-Auth: 9_TvPFBrtlY4LugISzpmzUBweeM Message-ID: Subject: Re: [PATCH v2] kconfig.h: Include compiler types to avoid missed struct attributes To: Linus Torvalds , Paul Burton , Ralf Baechle Cc: kbuild-all@01.org, kbuild test robot , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 22, 2018 at 4:03 PM, Kees Cook wrote: > On Thu, Feb 22, 2018 at 2:26 PM, kbuild test robot wrote: >> Hi Kees, >> >> I love your patch! Yet something to improve: >> >> [auto build test ERROR on linus/master] >> [also build test ERROR on v4.16-rc2 next-20180222] >> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] >> >> url: https://github.com/0day-ci/linux/commits/Kees-Cook/kconfig-h-Include-compiler-types-to-avoid-missed-struct-attributes/20180223-040717 >> config: mips-jz4740 (attached as .config) >> compiler: mipsel-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 >> reproduce: >> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross >> chmod +x ~/bin/make.cross >> # save the attached .config to linux build tree >> make.cross ARCH=mips >> >> All errors (new ones prefixed by >>): >> >>>> Error: arch/mips/boot/vmlinux.gz.its:201.1-2 syntax error >> FATAL ERROR: Unable to parse input tree >> /usr/bin/mkimage: Can't read arch/mips/boot/vmlinux.gz.itb.tmp: Invalid argument >> /usr/bin/mkimage Can't add hashes to FIT blob > > Ugh, the compiler_types.h commit breaks MIPS. I've reproduced this > failure; debugging now.... For the MIPS folks, this is about 28128c61e08e ("kconfig.h: Include compiler types to avoid missed struct attributes"). This hack fixes it ("struct" definitions were appearing in the resulting its output files, which broke parsing): diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index 1bd5c4f00d19..c22da16d67b8 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -126,6 +126,7 @@ $(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS quiet_cmd_cpp_its_S = ITS $@ cmd_cpp_its_S = $(CPP) $(cpp_flags) -P -C -o $@ $< \ + -D__ASSEMBLY__ \ -DKERNEL_NAME="\"Linux $(KERNELRELEASE)\"" \ -DVMLINUX_BINARY="\"$(3)\"" \ -DVMLINUX_COMPRESSION="\"$(2)\"" \ I assume since this is overloading a .S build rule, the __ASSEMBLY__ define went missing from cpp_flags? I'm trying to figure out if there is a better solution; ideas welcome! -Kees -- Kees Cook Pixel Security