Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4690879ybl; Mon, 26 Aug 2019 14:26:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7Y/8+v8yuceDWVwuSB0iMZfjfFI7EarA89RF2+mIFIGy2TpaS8lknnjbl1a9h1xdAzPSM X-Received: by 2002:a17:902:7c0b:: with SMTP id x11mr19777890pll.73.1566854765347; Mon, 26 Aug 2019 14:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566854765; cv=none; d=google.com; s=arc-20160816; b=zBNAO//RPOyYW7s6xc0otEMO7g/qpJxuunNbQKFE5Eift3SlUqch1oRM2tYf4oYaw0 aruvtjEvKlnRT9bL5mII4GBKCSVmD3kQr5eLsnysvsK2sImEwkkprIi7rusfyNoiEiSf vl+U4hEm/N9wZPqUzbJfE5mWYVabPI3gBBUSzSQg3IhE2Y3DoSTRIN5MswhhetJU25YO 1S9BG/5DNRTI1FpxfpzhjmHCegiVMEeybYT031J0X3040YOlL+wA/OItl5o55WicKZiN 8hLknpvgiMoHSnh0Q2OATMQ0lmJmLOpI9aWsOI42KcWGECFygZGOZG5Jqb2T3Qk1h0LR yP3Q== 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 :mime-version:dkim-signature; bh=VPS4MAzvQAs+keaEvLctLZOSLaEpPwLRduR/Z+4g8a4=; b=0H9FdAiD343RACjP8rtscqJi3TRsLOeZgobuNpLO48EZ+6BFW3A4KTR+jATEAyVLMQ Tea0kookYY1FclNi0ujH2WQbqVVf7E4WEu+1Qp5BM2i7o3Y8Gxh3rH/t+hjsuKKUH3Wj nrWHUoEjMo/SpvG4wT8xEt4Z0wi/DRpyO7/xTfgAV3ofSHK98A8SKIVqDEBTh03vdprR ADN7gdbqBdfkAd7FToL62eVZZIAALxV96bO4Sz1hduOWEsIsj2LSBBhwHmxDVFlGzUOK 0C4voWUxNETuxtgZl4a3SatDkJ10R4ZuIlnz3zzDZ0jnuP6f48aJ3Ye4WqVQX0Y3EAFP QDbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=bxBkkRjb; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 123si11872825pfy.61.2019.08.26.14.25.49; Mon, 26 Aug 2019 14:26:05 -0700 (PDT) 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=pass header.i=@google.com header.s=20161025 header.b=bxBkkRjb; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728236AbfHZVWm (ORCPT + 99 others); Mon, 26 Aug 2019 17:22:42 -0400 Received: from mail-pg1-f181.google.com ([209.85.215.181]:35401 "EHLO mail-pg1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727064AbfHZVWl (ORCPT ); Mon, 26 Aug 2019 17:22:41 -0400 Received: by mail-pg1-f181.google.com with SMTP id n4so11363078pgv.2 for ; Mon, 26 Aug 2019 14:22:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=VPS4MAzvQAs+keaEvLctLZOSLaEpPwLRduR/Z+4g8a4=; b=bxBkkRjbR1i2wpYutu34wdqibtjiP/i7+NEPQREwVGN+P30osjQuBVN/FHfR3WVymj OqhWrdzgautvhTkf7HCMoCzIooevpp1q7xjnfJR/P92LLp1mvKWb0ieDYuY4hjrqk2ip Bbj4ODZ9QVcdDhQtoP8oxLUi/+KznuJWT471ODu4z3oxcI6UIXJ25YIHkUYaK5qnxGRs fz3woP6LwPJs9bBIxiUhDBSo55ZvpfFshWXFBG1IBtYNd/9/Y+uu4qy8LdgNgZpIFgCo HjlLLInCvo/I9lDAUUj5RVnkKBRT8Q2OCcQsX2nPvJ1Hbg7Q7utpzofOSdlarmW0j7bN R3sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=VPS4MAzvQAs+keaEvLctLZOSLaEpPwLRduR/Z+4g8a4=; b=uVWYnOis78DdeIwhO2U3Yhuns5Yx9MMRbbdw1pSZGeFFGOSCQ2mBocTxYVl/6Vk0jw 1UI4M5u89OOVp0gLgkaBh1F+uzKKDyeClQnymCIKQC0Lv6Yvr78P5xpw9IacFvgXg5GJ ii0/oc8nvdrp6DnPx5sMCv+yB32kZz476jxIOcUral98fwYmz7ILEsIdh7HiXZDaaMQX XUY/9RbNn0ZIPEw0+Xg7spgtulHjed9xfMf4Q+xu1HIdx/8cpT9ibB2CFNdade5PRMjz fTrWtteJGBjP1XW7+OO+vFMWKcY7fs7SwsGFXGa2RHSlv/l5Hd8lORnN4k6adKmbJ3w5 kI8Q== X-Gm-Message-State: APjAAAUhD4mw9lYNMYs+IDdwEuTsSwfUL4aECgoU+HqChPGf+v+L1w0O xWJ/uapkObtWSpYjDVZGDOLkNJy+4J2VkqpPeve+7w== X-Received: by 2002:a63:60a:: with SMTP id 10mr18067622pgg.381.1566854560201; Mon, 26 Aug 2019 14:22:40 -0700 (PDT) MIME-Version: 1.0 From: Nick Desaulniers Date: Mon, 26 Aug 2019 14:22:29 -0700 Message-ID: Subject: a bug in genksysms/CONFIG_MODVERSIONS w/ __attribute__((foo))? To: Ard Biesheuvel , Masahiro Yamada , Linus Torvalds , Greg KH , Will Deacon , Arnd Bergmann , Michal Marek Cc: 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 I'm looking into a linkage failure for one of our device kernels, and it seems that genksyms isn't producing a hash value correctly for aggregate definitions that contain __attribute__s like __attribute__((packed)). Example: $ echo 'struct foo { int bar; };' | ./scripts/genksyms/genksyms -d Defn for struct foo == Hash table occupancy 1/4096 = 0.000244141 $ echo 'struct __attribute__((packed)) foo { int bar; };' | ./scripts/genksyms/genksyms -d Hash table occupancy 0/4096 = 0 I assume the __attribute__ part isn't being parsed correctly (looks like genksyms is a lex/yacc based C parser). The issue we have in our out of tree driver (*sadface*) is basically a EXPORT_SYMBOL'd function whose signature contains a packed struct. Theoretically, there should be nothing wrong with exporting a function that requires packed structs, and this is just a bug in the lex/yacc based parser, right? I assume that not having CONFIG_MODVERSIONS coverage of packed structs in particular could lead to potentially not-fun bugs? Or is using packed structs in exported function symbols with CONFIG_MODVERSIONS forbidden in some documentation somewhere I missed? -- Thanks, ~Nick Desaulniers