From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753941AbdGLTY2 (ORCPT ); Wed, 12 Jul 2017 15:24:28 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33012 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752363AbdGLTY0 (ORCPT ); Wed, 12 Jul 2017 15:24:26 -0400 Date: Wed, 12 Jul 2017 21:24:22 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Andrew Lutomirski , Denys Vlasenko , Borislav Petkov , Josh Poimboeuf , Kalle Valo , Peter Anvin , Linux Kernel Mailing List , Thomas Gleixner , Arnd Bergmann , Peter Zijlstra , Brian Gerst , "linux-tip-commits@vger.kernel.org" Subject: Re: [tip:x86/urgent] x86/io: Mark target address as output in 'insb()' asm Message-ID: <20170712192421.cpuucr2a233xcovl@gmail.com> References: <20170710144425.2238584-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Linus Torvalds wrote: > On Wed, Jul 12, 2017 at 6:10 AM, tip-bot for Arnd Bergmann > wrote: > > > > Apparently the assember constraints are slightly off here, as marking the > > 'addr' argument as a memory output seems appropriate here and gets rid > > of the warning. For consistency I'm also adding it as input for outsb(). > > The new constraints look very questionable to me. Ok, I've removed the commit. > The real fix is probably to just mark them as "clobbers memory" (ie > just add "memory" to the clobber list). > > If you want to be fancy, you can try to do what does, > which is a disgusting hack, but has traditionally worked; > > struct __large_struct { unsigned long buf[100]; }; > #define __m(x) (*(struct __large_struct __user *)(x)) > > and then use your approach with "m" and "=m". Arnd, could you please try Linus's suggestions? Thanks, Ingo