<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/serial_core.h, branch v4.14.87</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14.87</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14.87'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-08-03T05:50:39Z</updated>
<entry>
<title>serial: core: Make sure compiler barfs for 16-byte earlycon names</title>
<updated>2018-08-03T05:50:39Z</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2018-03-23T17:58:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=62079c8371aaa08f072a3e41628e753f9696d6df'/>
<id>urn:sha1:62079c8371aaa08f072a3e41628e753f9696d6df</id>
<content type='text'>
[ Upstream commit c1c734cb1f54b062f7e67ffc9656d82f5b412b9c ]

As part of bringup I ended up wanting to call an earlycon driver by a
name that was exactly 16-bytes big, specifically "qcom_geni_serial".

Unfortunately, when I tried this I found that things compiled just
fine.  They just didn't work.

Specifically the compiler felt perfectly justified in initting the
".name" field of "struct earlycon_id" with the full 16-bytes and just
skipping the '\0'.  Needless to say, that behavior didn't seem ideal,
but I guess someone must have allowed it for a reason.

One way to fix this is to shorten the name field to 15 bytes and then
add an extra byte after that nobody touches.  This should always be
initted to 0 and we're golden.

There are, of course, other ways to fix this too.  We could audit all
the users of the "name" field and make them stop at both null
termination or at 16 bytes.  We could also just make the name field
much bigger so that we're not likely to run into this.  ...but both
seem like we'll just hit the bug again.

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>earlycon: Use a pointer table to fix __earlycon_table stride</title>
<updated>2018-05-01T19:58:24Z</updated>
<author>
<name>Daniel Kurtz</name>
<email>djkurtz@chromium.org</email>
</author>
<published>2018-04-06T23:21:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3a5465d0b61d91d9185570be027cf5e166af3d59'/>
<id>urn:sha1:3a5465d0b61d91d9185570be027cf5e166af3d59</id>
<content type='text'>
commit dd709e72cb934eefd44de8d9969097173fbf45dc upstream.

Commit 99492c39f39f ("earlycon: Fix __earlycon_table stride") tried to fix
__earlycon_table stride by forcing the earlycon_id struct alignment to 32
and asking the linker to 32-byte align the __earlycon_table symbol.  This
fix was based on commit 07fca0e57fca92 ("tracing: Properly align linker
defined symbols") which tried a similar fix for the tracing subsystem.

However, this fix doesn't quite work because there is no guarantee that
gcc will place structures packed into an array format.  In fact, gcc 4.9
chooses to 64-byte align these structs by inserting additional padding
between the entries because it has no clue that they are supposed to be in
an array.  If we are unlucky, the linker will assign symbol
"__earlycon_table" to a 32-byte aligned address which does not correspond
to the 64-byte aligned contents of section "__earlycon_table".

To address this same problem, the fix to the tracing system was
subsequently re-implemented using a more robust table of pointers approach
by commits:
 3d56e331b653 ("tracing: Replace syscall_meta_data struct array with pointer array")
 654986462939 ("tracepoints: Fix section alignment using pointer array")
 e4a9ea5ee7c8 ("tracing: Replace trace_event struct array with pointer array")

Let's use this same "array of pointers to structs" approach for
EARLYCON_TABLE.

Fixes: 99492c39f39f ("earlycon: Fix __earlycon_table stride")
Signed-off-by: Daniel Kurtz &lt;djkurtz@chromium.org&gt;
Suggested-by: Aaron Durbin &lt;adurbin@chromium.org&gt;
Reviewed-by: Rob Herring &lt;robh@kernel.org&gt;
Tested-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>serial: core: remove unneeded irq_wake flag</title>
<updated>2017-08-28T18:51:20Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2017-08-13T14:47:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=aef3ad103a686f21b746977d4ed21cc1af36f589'/>
<id>urn:sha1:aef3ad103a686f21b746977d4ed21cc1af36f589</id>
<content type='text'>
There is no need to duplicate a flag which IRQ core takes care of.

Replace custom flag by IRQ core API that retrieves its state.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: core: move UPF_NO_TXEN_TEST to quirks and rename</title>
<updated>2017-07-30T14:44:22Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2017-07-25T17:39:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c7ac15ce89242e3c25fcc49fa4d00028285fab05'/>
<id>urn:sha1:c7ac15ce89242e3c25fcc49fa4d00028285fab05</id>
<content type='text'>
First 16 bits in the flags field are user-visible except
UPF_NO_TXEN_TEST. To keep it clean we introduce internal quirks and move
UPF_NO_TXEN_TEST to them. Rename the constant to UPQ_NO_TXEN_TEST to
distinguish with port flags. Users are converted accordingly.

The quirks field might be extended later to hold the additional ones.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: 8250: Add flag so drivers can avoid THRE probe</title>
<updated>2017-05-18T14:19:16Z</updated>
<author>
<name>Joel Stanley</name>
<email>joel@jms.id.au</email>
</author>
<published>2017-05-02T07:45:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ea5244e2af3b4813bf3d90ba6a6481d1a3c33d15'/>
<id>urn:sha1:ea5244e2af3b4813bf3d90ba6a6481d1a3c33d15</id>
<content type='text'>
The probing of THRE irq behaviour assumes the other end will be reading
bytes out of the buffer in order to probe the port at driver init. In
some cases the other end cannot be relied upon to read these bytes, so
provide a flag for them to skip this step.

Bit 19 was chosen as the flags are a int and the top bits are taken.

Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: core: constify struct uart_port {name} field</title>
<updated>2017-04-08T16:51:57Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2017-03-31T18:35:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2e94d5ae5da1d2e798045a53b5e234a42b090908'/>
<id>urn:sha1:2e94d5ae5da1d2e798045a53b5e234a42b090908</id>
<content type='text'>
Don't allow modifications of port name. It's serial core's business only.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial_core: Add name field to uart_port struct</title>
<updated>2017-03-31T14:56:10Z</updated>
<author>
<name>Vignesh R</name>
<email>vigneshr@ti.com</email>
</author>
<published>2017-03-24T05:27:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f7048b15900f36fe21398fba94777b8aab3b376d'/>
<id>urn:sha1:f7048b15900f36fe21398fba94777b8aab3b376d</id>
<content type='text'>
Introduce a field to store name of uart_port that can be used to easily
identify UART port instances on a system that has more than one UART
instance. The name is of the form ttyXN(eg. ttyS0, ttyAMA0,..) where N
is number that particular UART instance.
This field will be useful when printing debug info for a particular port
or in register IRQs with unique IRQ name. Port name is populated during
uart_add_one_port().

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: do not accept sysrq characters via serial port</title>
<updated>2017-01-12T10:51:24Z</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2016-12-22T07:31:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=732dbf3a6104a3abfcfcd066dcaf89e5054ce009'/>
<id>urn:sha1:732dbf3a6104a3abfcfcd066dcaf89e5054ce009</id>
<content type='text'>
many embedded boards have a disconnected TTL level serial which can
generate some garbage that can lead to spurious false sysrq detects.

Signed-off-by: John Crispin &lt;john@phrozen.org&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>linux: drop __bitwise__ everywhere</title>
<updated>2016-12-15T22:13:41Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2016-12-11T04:34:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9efeccacd3a486128d3add611dd4cefb5b60a58c'/>
<id>urn:sha1:9efeccacd3a486128d3add611dd4cefb5b60a58c</id>
<content type='text'>
__bitwise__ used to mean "yes, please enable sparse checks
unconditionally", but now that we dropped __CHECK_ENDIAN__
__bitwise is exactly the same.
There aren't many users, replace it by __bitwise everywhere.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Stefan Schmidt &lt;stefan@osg.samsung.com&gt;
Acked-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Akced-by: Lee Duncan &lt;lduncan@suse.com&gt;
</content>
</entry>
<entry>
<title>serial: 8250: Expose set_ldisc function</title>
<updated>2016-11-16T09:59:38Z</updated>
<author>
<name>Ed Blake</name>
<email>ed.blake@imgtec.com</email>
</author>
<published>2016-11-10T18:07:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=db405a8f8bf70daf57ed88808a2bf9c5fe308c70'/>
<id>urn:sha1:db405a8f8bf70daf57ed88808a2bf9c5fe308c70</id>
<content type='text'>
Expose set_ldisc() function so that it can be overridden with a
platform specific implementation.

Signed-off-by: Ed Blake &lt;ed.blake@imgtec.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
