Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp716699ybt; Fri, 26 Jun 2020 09:49:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGm3G1JQN1UwTiuuc4aQw8J5oEUyrTAiju/ieFkSVf8kFi6IfV/r++PtQ4yYi4SzbMWntP X-Received: by 2002:a50:e881:: with SMTP id f1mr4103528edn.98.1593190192202; Fri, 26 Jun 2020 09:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593190192; cv=none; d=google.com; s=arc-20160816; b=gxSsK1hxCLRhiOXVNF22er7gMdPkRuyUPAw6fhpZHP5pCe2S0fcGRERmSUZihn6a1v 7uCLPDMV+gPAV+FzkkoeQBUBTN1HZ+xApr7/vbfxuwGiDWw2jYrPYsptZ8zhC2BtV2sW pbQIizAc+nTp1aBtwFakpUa8DUkBqDhTOwiRQtVqOYT3p8+TQpw6gfWr1LK3ZOYfCrDT N+LoK1N9cEZ4jZDf+KTJr6rF5SC+55PeIiY/ow+0xCkNxneg+KH0eRTnuHggKFnkdbAW gK7N9iSyq9V6aAJCN/ofZz5WHixwh8DHww5Xr5Vkyzs9kUD2Qq24wEL1Nv36mkAuDs30 xxPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wzxRCwXrTp9pra+6lnRKOjX9XhXo/vr4ZCsuBD6HuVs=; b=fyODvaw4rKwOxznU2dLSHo9bhwcodFKcB+J021ZOhnA7xucUgpxV0fnWbsBocmqdyn BeMsUmi67N6Ar0x0fIMbeCXXVQcJRy6LoAT7Zi0PZ3Lf9PaFiAF0eItzM4UR3iRFRyt+ w7eNuDURoHS6luuHHoUN3DcBO3MUroFvdotp5C3qUKKh1/8zM1Mm8Oatt+dH5/29/fa4 w2EZ2W05lhqQtMrhIc4PAB0zEL1RvIViiwctC7sGQNWsnq+6OIZj/QMvDvKXYz277RAN fgG8PrjLhnc7a+s26xK94gPUtAET/7zAc7yHAoY6tetMnQUwinVY8LqrN+fl+8zyZAMy MUBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gwytSsmF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du17si20862622ejc.248.2020.06.26.09.49.29; Fri, 26 Jun 2020 09:49:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gwytSsmF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729460AbgFZPXR (ORCPT + 99 others); Fri, 26 Jun 2020 11:23:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725821AbgFZPXQ (ORCPT ); Fri, 26 Jun 2020 11:23:16 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23912C03E979 for ; Fri, 26 Jun 2020 08:23:16 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id cv18so1646315pjb.1 for ; Fri, 26 Jun 2020 08:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=wzxRCwXrTp9pra+6lnRKOjX9XhXo/vr4ZCsuBD6HuVs=; b=gwytSsmFplYFx5bQzChZW4ZBybTa1p+pyLKIKwAWKhBdGjhOGMxt0cgcRBw0hYw4kK vYd7TzPGAYaSSo+Po7oPlGsEZQLpSUO+QmhcRNnUglYTKYlqXlL3sLY8OY00s/mC/0Sp jEEsCrEs+dn4QvM7AhE7FViVdaJpDyclmVuqg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=wzxRCwXrTp9pra+6lnRKOjX9XhXo/vr4ZCsuBD6HuVs=; b=a1TP3C97+7Wk5VADrpLnuk7/vcpWroe8byUHRCwyYKcxQXANQ7rVRUv/cpiNAZOZqb 1xEgdqzsmyNiQ+E/dH6FlR3aAl6HQau7gXGQJtXkNUh9iKEygOCCSjVdbPc0Br2BDy7m ng9iNnWSrv+5MWoWH+QGlUm2V6jHjndfu8+b30Baqsp8qRx3aqmJp7hC1w3QdVhJYPv2 6H1iGNvRX+zB1+4jIcAJXbSYSwiWd1Knh6N4FN/McChoP+Bz1OvHJw4yxaTXhvU7ThGR bUwuYsk7Pdw/mgST8kf2uwiVPMlzmaP8+5FmUhMJM7hTKsQxnR8f00ngUcaeQe2wjzMm 2rNA== X-Gm-Message-State: AOAM530/GFeqQ9ORf+Al8gAbcj3SObw3meE+bb+eZ7LTsyCLsq1gmjuR WyhSq54AsuqWmmzPNN9auPNkyA== X-Received: by 2002:a17:90a:fcc:: with SMTP id 70mr3926943pjz.106.1593184995653; Fri, 26 Jun 2020 08:23:15 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id u2sm2638273pfl.21.2020.06.26.08.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 08:23:14 -0700 (PDT) Date: Fri, 26 Jun 2020 08:23:14 -0700 From: Kees Cook To: Lee Jones Cc: arnd@arndb.de, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 05/10] misc: lkdtm: Always provide prototype for lkdtm_DOUBLE_FAULT() Message-ID: <202006260821.0079FA827@keescook> References: <20200626130525.389469-1-lee.jones@linaro.org> <20200626130525.389469-6-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200626130525.389469-6-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 26, 2020 at 02:05:20PM +0100, Lee Jones wrote: > lkdtm_DOUBLE_FAULT() already has internal logic to handle > !CONFIG_X86_32. Compiling out the prototype actually prevents > that logic from being useful. > > Fixes the following W=1 warning: > > drivers/misc/lkdtm/bugs.c: At top level: > drivers/misc/lkdtm/bugs.c:420:6: warning: no previous prototype for ‘lkdtm_DOUBLE_FAULT’ [-Wmissing-prototypes] > 420 | void lkdtm_DOUBLE_FAULT(void) > | ^~~~~~~~~~~~~~~~~~ > > Cc: Kees Cook > Signed-off-by: Lee Jones Thanks! This change is actually already part of another patch and is waiting for Greg to pick up: https://lore.kernel.org/lkml/20200529200347.2464284-5-keescook@chromium.org/ -- Kees Cook