Received: by 10.223.185.116 with SMTP id b49csp4180378wrg; Mon, 26 Feb 2018 12:40:39 -0800 (PST) X-Google-Smtp-Source: AH8x225jB5WNN8jSrWGxmXlGpjpr+3zrKhhtfMKNizFmTQnS9GrirUQOknvVw340Iy8m6xZi7ICL X-Received: by 10.99.109.77 with SMTP id i74mr9164011pgc.73.1519677639406; Mon, 26 Feb 2018 12:40:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519677639; cv=none; d=google.com; s=arc-20160816; b=JVa++q1oPTME8Id2zrrcUC7XmnP4Zo7PT/bABd3/E9FvJ++lqVQkbwQJ6p70zgctqC H6h+jKlsVINKS8rR9GxHBe2F7aqwU8JxPCzDHi+SFXj1IvmhzHKP3N6sxlBozPfC/Yva RqTWwJByPtxvgWrFqWTOkyMDMPxoM2o17EzOX9obi4oux4vVbBkIIFGH7ExCk/eS+7Pq JzC1TKmOQjTtvRZAs2qdCrgRpOks/KjbGD7nHulDNa6Oi7yTsFzS02HgRJKOKY64ur9r 6eybw4Cvo8T5EASjewqqscPlHjrKJCyniaGirR/tEPcA6pRsE1pHCQyQWSGFdxtDKgTJ GQeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=NfgxwQndUVroTo5QI3o6KUAJ13zIVq/Vithc30EJRXs=; b=flDCYQa55rCvz7A3PUMMtRLkTcqrGAaLA1FrZ7dv9gDk1GpqB+SVUnb/4C6L5EDejJ Xnbtu48wFoRfE4NzhnxRt/yWKdbLJZE4IhvgIVE2aSY3YnuxkRkZGOC3sgTOxIqby0AX gh9V2rom2pnXXRka22+ASP8uKkeVnt96RowkONyz25Rva+4a/S7kK4lNweuSRCpjfKn/ D+fzgsgJ1xJFji13iObv5RBde9tg9xwVC4cvIw8dSusW9joma7R8yuEyOmYj12FLWqM2 bpMI3xqcEGE9qkkz3JzYi3q3F08rC5ELYrUkR9FMA4YOd8U38GLZngxqmvQbJyGZJw7K 7bUg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2-v6si7295115plm.172.2018.02.26.12.40.23; Mon, 26 Feb 2018 12:40:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753768AbeBZUjq (ORCPT + 99 others); Mon, 26 Feb 2018 15:39:46 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36472 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753674AbeBZU1Z (ORCPT ); Mon, 26 Feb 2018 15:27:25 -0500 Received: from localhost (clnet-b04-243.ikbnet.co.at [83.175.124.243]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 54F62E4B; Mon, 26 Feb 2018 20:27:24 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Mamonov , James Hogan , Ralf Baechle , Al Viro , linux-mips@linux-mips.org Subject: [PATCH 4.15 07/64] MIPS: Drop spurious __unused in struct compat_flock Date: Mon, 26 Feb 2018 21:21:44 +0100 Message-Id: <20180226202153.748429368@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180226202153.453363333@linuxfoundation.org> References: <20180226202153.453363333@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: James Hogan commit 6ae1756faddefd7494353380ee546dd38c2f97eb upstream. MIPS' struct compat_flock doesn't match the 32-bit struct flock, as it has an extra short __unused before pad[4], which combined with alignment increases the size to 40 bytes compared with struct flock's 36 bytes. Since commit 8c6657cb50cb ("Switch flock copyin/copyout primitives to copy_{from,to}_user()"), put_compat_flock() writes the full compat_flock struct to userland, which results in corruption of the userland word after the struct flock when running 32-bit userlands on 64-bit kernels. This was observed to cause a bus error exception when starting Firefox on Debian 8 (Jessie). Reported-by: Peter Mamonov Signed-off-by: James Hogan Tested-by: Peter Mamonov Cc: Ralf Baechle Cc: Al Viro Cc: linux-mips@linux-mips.org Cc: # 4.13+ Patchwork: https://patchwork.linux-mips.org/patch/18646/ Signed-off-by: Greg Kroah-Hartman --- arch/mips/include/asm/compat.h | 1 - 1 file changed, 1 deletion(-) --- a/arch/mips/include/asm/compat.h +++ b/arch/mips/include/asm/compat.h @@ -86,7 +86,6 @@ struct compat_flock { compat_off_t l_len; s32 l_sysid; compat_pid_t l_pid; - short __unused; s32 pad[4]; };