Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3732924imm; Mon, 8 Oct 2018 08:40:17 -0700 (PDT) X-Google-Smtp-Source: ACcGV60QFGUjwc8Mc3aZOBk/sZk+US9nfLusFEvYUb5RBvdxkPKw7aTvyv4+LGjqBZRN+Jfkt9ky X-Received: by 2002:a62:11cb:: with SMTP id 72-v6mr25397646pfr.120.1539013217386; Mon, 08 Oct 2018 08:40:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539013217; cv=none; d=google.com; s=arc-20160816; b=AK71ai/9me4rQlbTQcEOKWIOH6b5nzGTIho2OlT80+1C2pyR1deiW7eLSpH+Guw/PG Es+IEXyYkLCTaGg0XLtXJcwIRB/XplzkuM+4OHsc7P1+6/f0zDV5LC1zVrcV3hTlWsnB SCqHunFBRZFSoNBmxvv0Bz3NmzSEwLt/PvhxjvgeAGFFOY8R1nOUm6CUpTOFscwbl2kr B2TU/zNHB+hOifq2+HjSfSSTqRucR17A1I+3i/07OjJ70st91NAEQTcKn+tsgDHZaIn3 nvJGrSYbKCUfEQ0iguT8PkaDhg94EIUUfpKc4KsI2P5sz6V9av6z+JKHBkPnGMQLvOZD ZPag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3JUtAQSBvnjsHhi7rzPs7uiH357XflzdvnRYKkxs2FA=; b=nfActznCqQjAqmlGNQF6azaKvsnmoNXzsaqEOsjajd12bS+bpbHN/JTOHB8cOThGKp q6fJbzdwEtCsizW+Nvum47627NMrST1vWpS2N+2NJJ1a7OVtlZ/6cnKoLMDJZURtF3AK xnQbu4FP0mtAk3OyBWY0g/jWaroayfPUX0PYNnSZML7E3cgzUeXJnCs6F58+52bDnaVP pFIuwYSA67ULVaMFQCXf190A6tO7wuEbJ6sEkmhrrHy9n5IMoxa3QZ6U2FO0XmmcdXBP rqnLU5CetDzYnEwMC9dgB8rUSgoT7Zi5fhzzlqUBY8UJOlkClrhRIc0c7C3EMFx9mzp2 AgBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=CzhGkfS7; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f65-v6si18949601pff.276.2018.10.08.08.40.02; Mon, 08 Oct 2018 08:40:17 -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=fail header.i=@gmail.com header.s=20161025 header.b=CzhGkfS7; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727652AbeJHWvD (ORCPT + 99 others); Mon, 8 Oct 2018 18:51:03 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:41272 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727279AbeJHWvB (ORCPT ); Mon, 8 Oct 2018 18:51:01 -0400 Received: by mail-lf1-f66.google.com with SMTP id q39-v6so14243760lfi.8; Mon, 08 Oct 2018 08:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3JUtAQSBvnjsHhi7rzPs7uiH357XflzdvnRYKkxs2FA=; b=CzhGkfS7sr5utty3opPM2ISYy6qslUxUacgK4yonPZMisnVW/2p06EECzsZ6L6A6ge j1LZwxJ87zLj4x4drX29pz0GFEoRH9lmWMtmhodJA3cpRljnpiRiIiw8+LWo1kkpsIM1 Es4cOtZKAhycJjYIyh/J33Wa6hYqz8Uz9J1i+u2TEqhTFOl+gDPJ1qIVWENXDVwpoQLD i3FJWWMkKCf7bOHUQGxhTqMnhSud8GudfNKu1l68D0Z1V1gt3ggGHdACKdX+2SbB/kFM 2R+TeAd1bS9/cbLIMf2/vK/2eGMKv6siiRmZdajG4T9Vcxduq0ZpiJ0CktKWQkWDBHGQ Jxvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=3JUtAQSBvnjsHhi7rzPs7uiH357XflzdvnRYKkxs2FA=; b=r0fKiVyDUnbooM1RkVukkRUf7MrhKKhRZPymalHoh1nmDb4IjcTujy74ZZ8KVaVYww a3n9Ex+PIidCzpwdSbONt7LoxkErTPPHuJzdH1qxkqNM1k/y9dsWqoVmZx8WXUBTvh+n 2PObC9V5nRDhYFQdk1DGPGXHOadL2itYQRMIgkhoiZnIsDDtv9egG+t74/FC79rfGci0 hnxQa9A/JIDHGXM9p4VrR/yJl0EDuboIgmXvRCvBC2VGcPZrw32VphLgTU/jarM7fFNR NoxtH0ljKaoegD+Q21YO6rY0QOpA9gAWan6wacMDrAL+3/YCEVHVm3vqctHWhQbNjvE8 n2Zg== X-Gm-Message-State: ABuFfoj1l36MmD/ApysTweniLjockRUVPC4yepnipyGk+thRCyMBlg6I RrF4Q4BKxCzttp+DtkQkK1c= X-Received: by 2002:a19:f817:: with SMTP id a23-v6mr7202228lff.67.1539013120560; Mon, 08 Oct 2018 08:38:40 -0700 (PDT) Received: from xi.terra (c-74bee655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.190.116]) by smtp.gmail.com with ESMTPSA id u70-v6sm3542882lff.60.2018.10.08.08.38.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Oct 2018 08:38:39 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.91) (envelope-from ) id 1g9XcG-00033u-2x; Mon, 08 Oct 2018 17:38:40 +0200 Date: Mon, 8 Oct 2018 17:38:40 +0200 From: Johan Hovold To: "H. Peter Anvin" Cc: linux-kernel@vger.kernel.org, Tobias Klausmann , Greg Kroah-Hartman , Jiri Slaby , Al Viro , Richard Henderson , Ivan Kokshaysky , Matt Turner , Thomas Gleixner , Kate Stewart , Philippe Ombredanne , Eugene Syromiatnikov , linux-alpha@vger.kernel.org, linux-serial@vger.kernel.org, Johan Hovold , Alan Cox , stable@vger.kernel.org Subject: Re: [PATCH stable v2 1/2] arch/alpha, termios: implement BOTHER, IBSHIFT and termios2 Message-ID: <20181008153840.GD3332@localhost> References: <20181008040620.1248277-1-hpa@zytor.com> <20181008040620.1248277-2-hpa@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181008040620.1248277-2-hpa@zytor.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 07, 2018 at 09:06:19PM -0700, H. Peter Anvin wrote: > From: "H. Peter Anvin (Intel)" > > Alpha has had c_ispeed and c_ospeed, but still set speeds in c_cflags > using arbitrary flags. Because BOTHER is not defined, the general > Linux code doesn't allow setting arbitrary baud rates, and because > CBAUDEX == 0, we can have an array overrun of the baud_rate[] table in > drivers/tty/tty_baudrate.c if (c_cflags & CBAUD) == 037. > > Resolve both problems by #defining BOTHER to 037 on Alpha. > > However, userspace still needs to know if setting BOTHER is actually > safe given legacy kernels (does anyone actually care about that on > Alpha anymore?), so enable the TCGETS2/TCSETS*2 ioctls on Alpha, even > though they use the same structure. Define struct termios2 just for > compatibility; it is the exact same structure as struct termios. In a > future patchset, this will be cleaned up so the uapi headers are > usable from libc. Is this really needed? By defining BOTHER (and IBSHIFT which you forgot to mention here) you are enabling arbitrary rates also through TCSETS on alpha, right? Johan