From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751885AbdITLBK (ORCPT ); Wed, 20 Sep 2017 07:01:10 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:43118 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751650AbdITLBI (ORCPT ); Wed, 20 Sep 2017 07:01:08 -0400 Date: Wed, 20 Sep 2017 12:01:07 +0100 From: Al Viro To: Will Deacon Cc: linux-kernel@vger.kernel.org, Andrew Morton Subject: Re: [PATCH] ipc/shm: Fix order of parameters when calling copy_compat_shmid_to_user Message-ID: <20170920110107.GC32076@ZenIV.linux.org.uk> References: <1505753258-19470-1-git-send-email-will.deacon@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1505753258-19470-1-git-send-email-will.deacon@arm.com> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 18, 2017 at 05:47:38PM +0100, Will Deacon wrote: > Commit 553f770ef71b ("ipc: move compat shmctl to native") moved the > compat IPC syscall handling into ipc/shm.c and refactored the struct > accessors in the process. Unfortunately, the call to > copy_compat_shmid_to_user when handling a compat {IPC,SHM}_STAT command > gets the arguments the wrong way round, passing a kernel stack address > as the user buffer (destination) and the user buffer as the kernel stack > address (source). > > This patch fixes the parameter ordering so the buffers are accessed > correctly. ACK, will push to Linus tonight...